Author Topic: _SCREENPRINT text$ Question  (Read 4632 times)

0 Members and 1 Guest are viewing this topic.

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
_SCREENPRINT text$ Question
« on: October 04, 2021, 07:00:06 pm »
I have referred to the Wiki regarding _SCREENPRINT text$ and wanted to know if there was any way to allow _SCREENPRINT to accept the equivalent of     [Ctrl] + {+}     to enlarge the focused window (when this action is allowed).

As an example, when from QB64 I open NotePad it comes up with the default tiny text size (I do not wish to use say 200% windows scaling for my High DPI Display) and as always with NotePad I need to do    [Ctrl] + {+}    to enlarge the text to a more pleasant size.

Further to this can _SCREENPRINT in general be able to work with any key-combinations eg    [Alt] + [3] 
  and for that matter key scan codes and the such in general?

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
Re: _SCREENPRINT text$ Question
« Reply #1 on: October 04, 2021, 07:47:08 pm »
If you are on a Windows computer, look into using "SENDKEYS"

DECLARE DYNAMIC LIBRARY "user32"
    SUB SENDKEYS ALIAS keybd_event (BYVAL bVk AS LONG, BYVAL bScan AS LONG, BYVAL dwFlags AS LONG, BYVAL dwExtraInfo AS LONG)
END DECLARE

CONST KEYEVENTF_KEYUP = &H2
CONST VK_SHIFT = &H10 'Shift key
CONST VK_CTRL = &H11 ' Ctrl key
CONST VK_ALT = &H12 ' Alt key

SENDKEYS VK_CTRL, 0, 0, 0 ' Ctrl
SENDKEYS &H2B, 0, 0, 0 ' +
SENDKEYS &H2B, 0, KEYEVENTF_KEYUP, 0 ' Release +
SENDKEYS VK_CTRL, 0, KEYEVENTF_KEYUP, 0 ' Release Ctrl


I haven't used ctrl + + before, so I can't attest to the code working, but in theory, it should.

For Alt + 3...

SENDKEYS VK_ALT, 0, 0, 0 ' Alt
SENDKEYS &H33, 0, 0, 0 ' 3
SENDKEYS &H33, 0, KEYEVENTF_KEYUP, 0 ' Release 3
SENDKEYS VK_ALT, 0, KEYEVENTF_KEYUP, 0 ' Release Alt
_DELAY .2

To get the &H hexadecimal codes, just look up the ascii value for the key press, and use an online  decimal to hexadecimal converter.

I hope this helps,

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
Re: _SCREENPRINT text$ Question
« Reply #2 on: October 04, 2021, 08:45:50 pm »
@Pete

Thanks for your quick reply.

As per my program below - it does not seem to work - I am hoping that there is a simple omission/code problem that I have not considered (e.g. "SENDKEYS focus" not being for right window or something?)



Code: QB64: [Select]
  1.     SUB SENDKEYS ALIAS keybd_event (BYVAL bVk AS LONG, BYVAL bScan AS LONG, BYVAL dwFlags AS LONG, BYVAL dwExtraInfo AS LONG)
  2.  
  3. CONST KEYEVENTF_KEYUP = &H2
  4. CONST VK_SHIFT = &H10 'Shift key
  5. CONST VK_CTRL = &H11 ' Ctrl key
  6. CONST VK_ALT = &H12 ' Alt key
  7.  
  8.  
  9. NotePad:
  10. 'Code Examples:
  11. 'Example: Printing text into a Windows text editor (Notepad) and copying to the clipboard. May not work on all systems.
  12.  
  13. DEFLNG A-Z
  14. SCREEN _NEWIMAGE(640, 480, 32)
  15. PRINT "OPENing and MAXIMIZING Notepad in 5 seconds..."; : _DELAY 5
  16. SHELL _DONTWAIT "START /MAX NotePad.exe"  'opens Notepad file "untitled.txt"
  17. 'detect notepad open and maximized
  18. 'condition: 80% or more of the screen is white
  19. DO                     'read the desktop screen image for maximized window
  20.     s = _SCREENIMAGE
  21.     _SOURCE s
  22.     z = 0
  23.     FOR y = 0 TO _HEIGHT(s) - 1   'scan for large white area
  24.         FOR x = 0 TO _WIDTH(s) - 1
  25.             c = POINT(x, y)
  26.             IF c = _RGB32(255, 255, 255) THEN z = z + 1
  27.         NEXT
  28.     NEXT
  29.     IF z / (_HEIGHT(s) * _WIDTH(s)) > 0.8 THEN EXIT DO 'when 80% of screen is white
  30.     _FREEIMAGE s   'free desktop image
  31.     _LIMIT 1       'scans 1 loop per second
  32.     PRINT ".";
  33. PRINT "NOTEPAD detected as OPEN and MAXIMIZED"
  34. _SCREENPRINT "HELLO WORLD"
  35. _SCREENPRINT CHR$(8) + CHR$(8) + CHR$(8) + CHR$(8) + CHR$(8) 'backspace 5 characters
  36. _SCREENPRINT "QB64!"
  37.  
  38. gosub Ctrl_Plus:
  39. gosub Ctrl_Plus:
  40. gosub Ctrl_Plus:
  41. gosub Ctrl_Plus:
  42. gosub Ctrl_Plus:
  43.  
  44. _SCREENPRINT CHR$(1) 'CTRL + A select all
  45. _SCREENPRINT CHR$(3) 'CTRL + C copy to clipboard
  46. _CLIPBOARD$ = "QB64 ROCKS!"
  47. _SCREENPRINT CHR$(22) 'CTRL + V paste from clipboard
  48.  
  49.  
  50.  
  51. Ctrl_Plus:
  52. SENDKEYS VK_CTRL, 0, 0, 0 ' Ctrl
  53. SENDKEYS &H2B, 0, 0, 0 ' +
  54. SENDKEYS &H2B, 0, KEYEVENTF_KEYUP, 0 ' Release +
  55. SENDKEYS VK_CTRL, 0, KEYEVENTF_KEYUP, 0 ' Release Ctrl
  56.  
  57.  


The main code part came from the IDE Help screen (_SCREENPRINT) example  and apart from your SENDKEYS stuff I just inserted   GOSUB Ctrl_Plus    five times to replicate      [Ctrl] + {+} .


Hope you can spot the error in my ways.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
Re: _SCREENPRINT text$ Question
« Reply #3 on: October 04, 2021, 09:11:43 pm »
Appears it needs to be a Windows virtual code. Try &HBB


Yep, just tested it. Works on my system...

Code: QB64: [Select]
  1.     SUB SENDKEYS ALIAS keybd_event (BYVAL bVk AS LONG, BYVAL bScan AS LONG, BYVAL dwFlags AS LONG, BYVAL dwExtraInfo AS LONG)
  2.  
  3. CONST KEYEVENTF_KEYUP = &H2
  4. CONST VK_SHIFT = &H10 'Shift key
  5. CONST VK_CTRL = &H11 ' Ctrl key
  6. CONST VK_ALT = &H12 ' Alt key
  7.  
  8.  
  9. NotePad:
  10. 'Code Examples:
  11. 'Example: Printing text into a Windows text editor (Notepad) and copying to the clipboard. May not work on all systems.
  12.  
  13. DEFLNG A-Z
  14. SCREEN _NEWIMAGE(640, 480, 32)
  15. PRINT "OPENing and MAXIMIZING Notepad in 5 seconds...";: _DELAY 5
  16. SHELL _DONTWAIT "START /MAX NotePad.exe" 'opens Notepad file "untitled.txt"
  17. 'detect notepad open and maximized
  18. 'condition: 80% or more of the screen is white
  19. DO 'read the desktop screen image for maximized window
  20.     s = _SCREENIMAGE
  21.     _SOURCE s
  22.     z = 0
  23.     FOR y = 0 TO _HEIGHT(s) - 1 'scan for large white area
  24.         FOR x = 0 TO _WIDTH(s) - 1
  25.             c = POINT(x, y)
  26.             IF c = _RGB32(255, 255, 255) THEN z = z + 1
  27.         NEXT
  28.     NEXT
  29.     IF z / (_HEIGHT(s) * _WIDTH(s)) > 0.8 THEN EXIT DO 'when 80% of screen is white
  30.     _FREEIMAGE s 'free desktop image
  31.     _LIMIT 1 'scans 1 loop per second
  32.     PRINT ".";
  33. PRINT "NOTEPAD detected as OPEN and MAXIMIZED"
  34. _SCREENPRINT "HELLO WORLD"
  35. _SCREENPRINT CHR$(8) + CHR$(8) + CHR$(8) + CHR$(8) + CHR$(8) 'backspace 5 characters
  36. _SCREENPRINT "QB64!"
  37.  
  38. GOSUB Ctrl_Plus
  39. GOSUB Ctrl_Plus
  40. GOSUB Ctrl_Plus
  41. GOSUB Ctrl_Plus
  42. GOSUB Ctrl_Plus
  43.  
  44. _SCREENPRINT CHR$(1) 'CTRL + A select all
  45. _SCREENPRINT CHR$(3) 'CTRL + C copy to clipboard
  46. _CLIPBOARD$ = "QB64 ROCKS!"
  47. _SCREENPRINT CHR$(22) 'CTRL + V paste from clipboard
  48.  
  49.  
  50.  
  51. Ctrl_Plus:
  52.  
  53. SENDKEYS VK_CTRL, 0, 0, 0 ' Ctrl
  54. SENDKEYS &HBB, 0, 0, 0 ' +
  55. SENDKEYS &HBB, 0, KEYEVENTF_KEYUP, 0 ' Release +
  56. SENDKEYS VK_CTRL, 0, KEYEVENTF_KEYUP, 0 ' Release Ctrl
  57.  

Notepad never loses focus, but if modifying your program ever causes it to do so, just add a _SCREENCLICK 100, 100.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
Re: _SCREENPRINT text$ Question
« Reply #4 on: October 04, 2021, 09:35:54 pm »
@Pete

Before your modifications to my code appeared on my screen  - I just changed to as follows

SENDKEYS VK_CTRL, 0, 0, 0 ' Ctrl
SENDKEYS &HBB, 0, 0, 0 ' +
SENDKEYS &HBB, 0, KEYEVENTF_KEYUP, 0 ' Release +
SENDKEYS VK_CTRL, 0, KEYEVENTF_KEYUP, 0 ' Release Ctrl

and having 10 GOSUB CTRL_Plus instead of 5


Of about a dozen trials half worked!!!  Trials #1 and 3 did not 7,8,9 did not - all others worked as expected.

Because only some did not work, I suspect that I may have to play-around with delay/time settings (to make longer).

Just in case - exactly where do I position _screenclick 100,100  (I am hoping that I do not need to adjust delay/time settings to fix up not working cases)


Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
Re: _SCREENPRINT text$ Question
« Reply #5 on: October 04, 2021, 09:45:33 pm »
Put a _DELAY .2 at the end of the SENDKEY gousb routine...

Code: QB64: [Select]
  1.     SUB SENDKEYS ALIAS keybd_event (BYVAL bVk AS LONG, BYVAL bScan AS LONG, BYVAL dwFlags AS LONG, BYVAL dwExtraInfo AS LONG)
  2.  
  3. CONST KEYEVENTF_KEYUP = &H2
  4. CONST VK_SHIFT = &H10 'Shift key
  5. CONST VK_CTRL = &H11 ' Ctrl key
  6. CONST VK_ALT = &H12 ' Alt key
  7.  
  8.  
  9. NotePad:
  10. 'Code Examples:
  11. 'Example: Printing text into a Windows text editor (Notepad) and copying to the clipboard. May not work on all systems.
  12.  
  13. DEFLNG A-Z
  14. SCREEN _NEWIMAGE(640, 480, 32)
  15. PRINT "OPENing and MAXIMIZING Notepad in 5 seconds...";: _DELAY 5
  16. SHELL _DONTWAIT "START /MAX NotePad.exe" 'opens Notepad file "untitled.txt"
  17. 'detect notepad open and maximized
  18. 'condition: 80% or more of the screen is white
  19. DO 'read the desktop screen image for maximized window
  20.     s = _SCREENIMAGE
  21.     _SOURCE s
  22.     z = 0
  23.     FOR y = 0 TO _HEIGHT(s) - 1 'scan for large white area
  24.         FOR x = 0 TO _WIDTH(s) - 1
  25.             c = POINT(x, y)
  26.             IF c = _RGB32(255, 255, 255) THEN z = z + 1
  27.         NEXT
  28.     NEXT
  29.     IF z / (_HEIGHT(s) * _WIDTH(s)) > 0.8 THEN EXIT DO 'when 80% of screen is white
  30.     _FREEIMAGE s 'free desktop image
  31.     _LIMIT 1 'scans 1 loop per second
  32.     PRINT ".";
  33. PRINT "NOTEPAD detected as OPEN and MAXIMIZED"
  34. _SCREENPRINT "HELLO WORLD"
  35. _SCREENPRINT CHR$(8) + CHR$(8) + CHR$(8) + CHR$(8) + CHR$(8) 'backspace 5 characters
  36. _SCREENPRINT "QB64!"
  37.  
  38. FOR i = 1 TO 10
  39.     GOSUB Ctrl_Plus
  40.  
  41. _SCREENPRINT CHR$(1) 'CTRL + A select all
  42. _SCREENPRINT CHR$(3) 'CTRL + C copy to clipboard
  43. _CLIPBOARD$ = "QB64 ROCKS!"
  44. _SCREENPRINT CHR$(22) 'CTRL + V paste from clipboard
  45.  
  46.  
  47.  
  48. Ctrl_Plus:
  49.  
  50. SENDKEYS VK_CTRL, 0, 0, 0 ' Ctrl
  51. SENDKEYS &HBB, 0, 0, 0 ' +
  52. SENDKEYS &HBB, 0, KEYEVENTF_KEYUP, 0 ' Release +
  53. SENDKEYS VK_CTRL, 0, KEYEVENTF_KEYUP, 0 ' Release Ctrl
  54. _DELAY 0.33
  55.  

As for the _SCREENCLICK, use it only if you place focus back on your QB64 program, directly before the statement that requires Notepad to be back in focus. Use a slight delay after it, too.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
Re: _SCREENPRINT text$ Question
« Reply #6 on: October 04, 2021, 10:22:35 pm »
@Pete



Success



For trials #1 to #10 the only issue was with #5 (where I accidently held the F5 key down too long - causing many instances of the program to run (which I did not want to happen)).

So apart from multiple instances of the exact same program (which I never want) - everything worked perfectly for me.


I have noticed with the last few monthly updates of 21H1 that timings for keyboard is very "touchy" - in the earlier days, to do a screen capture (windows) I had to simultaneously press [win key] + [Fn] + [PtSc]  and now if I am too slow to release I get this silly snipping tool (I think) save to Clipboard. Previously I never had a problem with the F5 key (in QB64 IDE general) causing multiple instances of the exact same program to launch)


Code: QB64: [Select]
  1.     SUB SENDKEYS ALIAS keybd_event (BYVAL bVk AS LONG, BYVAL bScan AS LONG, BYVAL dwFlags AS LONG, BYVAL dwExtraInfo AS LONG)
  2.  
  3. CONST KEYEVENTF_KEYUP = &H2
  4. CONST VK_SHIFT = &H10 'Shift key
  5. CONST VK_CTRL = &H11 ' Ctrl key
  6. CONST VK_ALT = &H12 ' Alt key
  7.  
  8.  
  9. NotePad:
  10. 'Code Examples:
  11. 'Example: Printing text into a Windows text editor (Notepad) and copying to the clipboard. May not work on all systems.
  12.  
  13. DEFLNG A-Z
  14. SCREEN _NEWIMAGE(640, 480, 32)
  15. PRINT "OPENing and MAXIMIZING Notepad in 5 seconds..."; : _DELAY 5
  16.  
  17. _screenclick 100,100                                                                   '*******************
  18. _delay .5                                                                              '*******************
  19.  
  20. SHELL _DONTWAIT "START /MAX NotePad.exe"  'opens Notepad file "untitled.txt"
  21. 'detect notepad open and maximized
  22. 'condition: 80% or more of the screen is white
  23. DO                     'read the desktop screen image for maximized window
  24.     s = _SCREENIMAGE
  25.     _SOURCE s
  26.     z = 0
  27.     FOR y = 0 TO _HEIGHT(s) - 1   'scan for large white area
  28.         FOR x = 0 TO _WIDTH(s) - 1
  29.             c = POINT(x, y)
  30.             IF c = _RGB32(255, 255, 255) THEN z = z + 1
  31.         NEXT
  32.     NEXT
  33.     IF z / (_HEIGHT(s) * _WIDTH(s)) > 0.8 THEN EXIT DO 'when 80% of screen is white
  34.     _FREEIMAGE s   'free desktop image
  35.     _LIMIT 1       'scans 1 loop per second
  36.     PRINT ".";
  37. PRINT "NOTEPAD detected as OPEN and MAXIMIZED"
  38. _SCREENPRINT "HELLO WORLD"
  39. _SCREENPRINT CHR$(8) + CHR$(8) + CHR$(8) + CHR$(8) + CHR$(8) 'backspace 5 characters
  40. _SCREENPRINT "QB64!"
  41.  
  42. for i%=1 to 10                                                                         '*********************
  43.     gosub Ctrl_Plus:                                                                   '*********************
  44. next                                                                                   '*********************
  45.  
  46. _SCREENPRINT CHR$(1) 'CTRL + A select all
  47. _SCREENPRINT CHR$(3) 'CTRL + C copy to clipboard
  48. _CLIPBOARD$ = "QB64 ROCKS!"
  49. _SCREENPRINT CHR$(22) 'CTRL + V paste from clipboard
  50.  
  51.  
  52.  
  53. Ctrl_Plus:
  54. 'SENDKEYS VK_CTRL, 0, 0, 0 ' Ctrl
  55. 'SENDKEYS &H2B, 0, 0, 0 ' +
  56. 'SENDKEYS &H2B, 0, KEYEVENTF_KEYUP, 0 ' Release +
  57. 'SENDKEYS VK_CTRL, 0, KEYEVENTF_KEYUP, 0 ' Release Ctrl
  58. SENDKEYS VK_CTRL, 0, 0, 0 ' Ctrl
  59. SENDKEYS &HBB, 0, 0, 0 ' +                                                             '********************
  60. SENDKEYS &HBB, 0, KEYEVENTF_KEYUP, 0 ' Release +                                       '********************
  61. SENDKEYS VK_CTRL, 0, KEYEVENTF_KEYUP, 0 ' Release Ctrl
  62.  
  63. _delay .2'4                                                                            '********************
  64.  


Many thanks

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
Re: _SCREENPRINT text$ Question
« Reply #7 on: October 04, 2021, 10:34:52 pm »
You're welcome. Yeah, Windows f'updates seldom do us any favors, although after 10+years of missing the obvious, they finally applied a wrap search to Notepad.

BTW - What type of project are you building with these functions? Just curious.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
Re: _SCREENPRINT text$ Question
« Reply #8 on: October 04, 2021, 11:12:22 pm »
@Pete


I am attempting to develop techniques whereby "EVERYTHING" is redirected (on my windows 10 x64 Pro) - and starting with KEYBOARD (hopefully expand to include mouse/touchpad movements) etc.

So rather than for me repeating essentially similar keystrokes numerous times over - the "grand plan" is to "outsource" the "repetitive stuff" to another QB64 program which via pre-defined simple rules, "churns out" the required output at which point I simply include into my Main Program.

Case in point - currently in my topic on 128bit math - where I do a comparison of _SINGLE _DOUBLE and _FLOAT to determine my so-called QB64 Number Space - I have (in my program) something like

message$ = " 1000 + 1":c!=1000! + 1!: c#=1000# + 1#: c## = 1000## + 1##......

As @SMcNeill detected (rightfully) a typo (another one also I since found) - I am looking at better ways to achieve the exact same result.

So the plan is to (somewhere) type

Message$ = "1000 + 1"

and re-direct activity to somewhere that then recreates the "full line" message$ = .... (5 lines above), which maybe puts it into an $INCLUDE file ...  So you can see the advantage for me to just type Message$ = "1000 + 1". I wanted everything to be explicitly coded (eg c!=1000! c#=1000#   rather than  saying c##=1000## c#=c## c!=c## to make my analysis for the QB64 Number Space more robust). There are many thousands of such message$ lines I want to check out (looking for so-called "transition points") so it would be nice to minimize typo's.

I can see the potential of redirecting from a file/program instead of from keyboard only in a number of my projects.

Of course there may be other techniques (than using re-directs) - this approach looks more "fun" with far ranging implications.

Hope this gives you a bit of an idea of "why?"

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • Steve’s QB64 Archive Forum
Re: _SCREENPRINT text$ Question
« Reply #9 on: October 04, 2021, 11:12:31 pm »
Another point of interest:

CTRL + A to Z can often be replicated by using CHR$(1) to CHR$(26).

For example, CTRL-G is CHR$(7).

These were the old terminal control codes, and nearly everything out there still carries support for them even today. You might be able to simply do _SCREENPRINT CHR$(3) for a CTRL-C (copy), for example.  Last I checked, it still worked in notepad and Word and such.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
Re: _SCREENPRINT text$ Question
« Reply #10 on: October 04, 2021, 11:23:24 pm »
@SMcNeill

Thanks - yes re-   Ctrl  A-Z    (chr$(1) - chr$(26)) as is mentioned in the Wiki for _SCREENPRINT.


I have yet to "discover" for myself what I could do with all of them (in _SCREENPRINT). Also of interest (not tried yet) - what about maybe Ctrl via Chr$(27) - chr$(31) of course ran out of letters?

So a few common ones     Ctrl A,  Ctrl C      I have tried (and they work for me in say NotePad).


Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • Steve’s QB64 Archive Forum
Re: _SCREENPRINT text$ Question
« Reply #11 on: October 04, 2021, 11:43:08 pm »
@SMcNeill

Thanks - yes re-   Ctrl  A-Z    (chr$(1) - chr$(26)) as is mentioned in the Wiki for _SCREENPRINT.


I have yet to "discover" for myself what I could do with all of them (in _SCREENPRINT). Also of interest (not tried yet) - what about maybe Ctrl via Chr$(27) - chr$(31) of course ran out of letters?

So a few common ones     Ctrl A,  Ctrl C      I have tried (and they work for me in say NotePad).

27 to 31 were database or file codes:

27 = Escape
28 = File Separator
29 = Group Separator
30 = Record Separator
31 = Unit Separator
127 = Delete (our other special ANSI terminal code)

And those can be manually pressed via combinations like CTRL-A to CTRL-Z, but I don't remember them all off the top of my head.

CTRL + ^ is one.
CTRL + [, and CTRL + ] are two more, I think.
CTRL +? as well...
_ and \  for the others?

But I don't remember the order now, off the top of my head.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
Re: _SCREENPRINT text$ Question
« Reply #12 on: October 04, 2021, 11:44:21 pm »
@Richard We do so similar stuff. I work with a lot of html projects, and use QB64 routines with templates to create pages, rather than hard code them. It saves a ton of time. The SENDKEY stuff I learned so I could also incorporate other software, such as image software, into my projects. Essentially my QB64 routines can automate all the commonly used key presses to crop, resize and save images. Fun stuff.

Best wishes with your routines!

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • Steve’s QB64 Archive Forum
Re: _SCREENPRINT text$ Question
« Reply #13 on: October 04, 2021, 11:51:09 pm »
And CTRL + @ is CHR$(0) for NULL, if you need it.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
Re: _SCREENPRINT text$ Question
« Reply #14 on: October 05, 2021, 12:27:44 am »
@Pete @SMcNeill Thanks

So I have a "useable" system via @Pete SENDKEYS stuff  and look forward to expanding into mouse/touchpad movements.

Application of mouse stuff includes when ever I have to restart Windows it takes a while for me to reconfigure my "Mission Control" style live desktop "Task View" equivalent - which includes things like Task Manager, Process Monitor, Downloads folder, etc that I need to resize very tiny. I only have one display (3200 x 1800) and I do not Windows scale beyond 100%. It is amazing how little "non-overlapping" room I have left with say half a dozen "essential' apps (e.g. Task Manager) - and usually I cannot do the Ctrl - thing to make tiny. Also I cannot size down beyond certain limits for each app (Windows apps "hoard" a lot of display real estate even when manually sized down (often only need the equivalent of one fairly short text line, or a graph 1cm x 1cm). I am as an on-going project to write QB64 code to "replace" any window apps in regards to this - ending up (work in progress) with a custom bar (at top of screen) 100 pixels high with the "essential" "need to know" info. (which Task Scheduler loads up automatically for me as well as other things).

So any pointers on stuff (eg like SENDKEYS for keyboard) for mouse/touchpad/pointer would be appreciated for future use by me.