Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to run a repeat Program
#1
I have pasted below the program I am trying to run. I keep getting an error that states unknown identifier.

Run Notepad:
run "notepad.exe"
Wait for Notepad window max 5 s:
5 "Notepad"
Wait 0.5 s:
0.5
Repeat:
rep
Press keys:
key "Sample: press keys, paste text, input box, message, list;" Y
Create string variable s:
str XxBigTxX
Show input box (s will receive text):
inp XxBigTxX "Type something:"
Paste formatted text:
outp "Input was ''%XxBigTxX'' (paste);[]" XxBigTxX
Press keys:
key "Input was ''" (XxBigTxX
) "'' (keys);" Y
Show message box:
if mes("Delete text?" "" "YN?")='Y'
If Yes, press keys Alt+e+a and A+e+l:
key A{ea} A{el}
Show list:
sel list("Fast[]Normal[]Slow" "Select speed:" "Repeat?")
case 0 ret
case 1 spe
case 2 spe 1000
case 3 spe 5000
#2
What word is highlighted? I can see only one error: in outp statement, you should use %s (for strings), %i (for integers), etc, but not %variable.

Tip: to copy/paste QM text between QM and other programs, use menu Edit -> Other formats -> Copy/Paste escaped.

Code:
Copy      Help
;Run Notepad:
run "notepad.exe"
;Wait for Notepad window max 5 s:
5 "Notepad"
;Wait 0.5 s:
0.5
;Repeat:
rep
,;Press keys:
,key "Sample: press keys, paste text, input box, message, list;" Y
,;Create string variable s:
,str XxBigTxX
,;Show input box (s will receive text):
,inp XxBigTxX "Type something:"
,;Paste formatted text:
,outp "Input was ''%XxBigTxX'' (paste);[]" XxBigTxX ;;error: use %s, not %XxBigTxX
,;Press keys:
,key "Input was ''" (XxBigTxX) "'' (keys);" Y
,;Show message box:
,if mes("Delete text?" "" "YN?")='Y'
,,;If Yes, press keys Alt+e+a and A+e+l:
,,key A{ea} A{el}
,;Show list:
,sel list("Fast[]Normal[]Slow" "Select speed:" "Repeat?")
,,case 0 ret
,,case 1 spe
,,case 2 spe 1000
,,case 3 spe 5000


Forum Jump:


Users browsing this thread: 1 Guest(s)