Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
example
#1
I am just learning this qm2 program and I need a example of the following:
bring up notepad
once note pad is up write 'now is time for all good men"

I need to see the code that does this
very simple for those in the know

Thank you
#2
Here is how I do that. Note: the names have been changed to protect the innocent-- :wink:

Code:
Copy      Help
run "C:\Program Files\ConTEXT\ConTEXT.exe"
0 WA "ConTEXT"
key "now is time for all good men"

the "0 WA" is a command that tells QM to "wait until active" than keep going.
#3
That does not work for me ?????
David Starmer
#4
Sorry. You just need to replace "C:\Program Files\ConTEXT\ConTEXT.exe" with the path to your notepad (it's somewhere in the "windows" directory structure). And replace "ConTEXT" with "Notepad".
#5
I initally did those two things....Did not work....notepad came up fine....but key command did nit put the text into notepad.
Dave
#6
Maybe notepad starts inactive? Then use act command.

Code:
Copy      Help
run "notepad"
0.5
act "Notepad"
key "now is time for all good men"

Or maybe some error message is displayed in QM output pane?

If key really does not work, what about outp (paste)?

Code:
Copy      Help
run "notepad"
0.5
act "Notepad"
outp "now is time for all good men"
#7
if you were to open it manually, and just started typing without clicking "into" or creating a new document, would it appear in Notepad? What I'm getting at here is that the document area may not be "active". And you may need to click into the area in order to "set" the cursor position.
#8
cool site
thanks


Forum Jump:


Users browsing this thread: 1 Guest(s)