@Pete - sorry to have crashed your computer twice! (I did not mean that to happen)
@Pete @SpriggsySpriggs @SMcNeill Sorry - I think you are on a different "wavelength" from me - this may be because I have not explained myself very well and/or the example provided is not clear and detailed enough.
I think that
@Pete saying that "NotePad is not a QB64 program" sums up the situation (and those words may echo in my mind for the next 25 years). I gather that because NotePad is not a program created by QB64, then now it cannot be truely focused on (I hope I am very wrong with this statement). So far, to date, SENDKEYS seems to be able to focus onto NotePad (i.e. via my QB64 program I can get to do some simple things such as Ctrl+ to enlarge the text) - rather than me being at the keyboard performing those same keystrokes.
If I may restate my program requirements (with a very silly example to hopefully clarify better).
Solely by virtue of my QB64 program alone (i.e. once launched I am not present at the keyboard)....
- open up a QB64 Program window (NOTHING ever to occupying the top 100 scan lines of display)
- for 10 seconds display mouse coordinates (if mouse cursor is over the program window - so if a cat played with the mouse during this time, it is reflected in displayed mouse movements)
- switch over to NotePad (idealy NOT MAXIMIZED - however if this cannot work I would allow it to be MAXIMIZED)
- for 10 seconds display mouse co-ordinates (if mouse cursor is over the non-maximized NotePad window) - i.e. now the co-ords displayed are only with regard to NotePad
- do some SENDKEYS magic ( Ctrl + ) to enlarge the NotePad text area - NOTHING ELSE (so therefore no changes to untitled.txt)
- if mouse is truely "focused" to NotePad - my QB64 program should be able to re-locate the mouse cursor to the Top Right Hand Corner of NotePad (which I would have established experimentally the co-ords of same before hand) and CLOSE NotePad (without me being at keyboard).
Assuming the above can be achieved, then eventually other things such as the color at a certain pixel of NotePad, actually write into NotePad the co-ords where the mouse cursor was at the time in NotePad (or better output to a separate file), minimize the NotePad window, etc could be done I hope.
@Pete regarding your demo program (although not doing the mouse thing as outlined above) - there were problems of no response after the first set of switching "focus" from Program window to NotePad Window. Also having _CLIPBOARD$ = "" made programs a bit more robust (in my case not displaying edits of my program onto the Program Window display).
With regards to the un-conventional TRANSPARENT window overlay (which I call a BLACKBOARD) - I discovered that I cannot even manually operate the mouse "click through" the BLACKBOARD to close NotePad (when NotePad is not on top) - so I do not have a potentially useable system as previously stated. So maybe all this TRANSPARENT stuff only relates to QB64 programs only ???
@SMcNeill I have never used PowerShell before (have used QB64 SHELL cmd stuff tons of time) - could you provide QB64 code example how to use PowerShell please?