LizzyBigDitch
Technical User
thread99-1769215
I have a similar problem with this demo example.
Dim ReturnValue, I
ReturnValue = Shell("CALC.EXE", 1) ' Run Calculator.
AppActivate ReturnValue ' Activate the Calculator.
For I = 1 To 100 ' Set up counting loop.
SendKeys I & "{+}", True ' Send keystrokes to Calculator
Next I ' to add each value of I.
SendKeys "=", True ' Get grand total.
SendKeys "%{F4}", True ' Send ALT+F4 to close Calculator.
I created a .vbs file and it errors as follows:
Line: 6
Char: 6
Error: expected end of statement
If anyone has the code to do this or something similar I would be very grateful
I have a similar problem with this demo example.
Dim ReturnValue, I
ReturnValue = Shell("CALC.EXE", 1) ' Run Calculator.
AppActivate ReturnValue ' Activate the Calculator.
For I = 1 To 100 ' Set up counting loop.
SendKeys I & "{+}", True ' Send keystrokes to Calculator
Next I ' to add each value of I.
SendKeys "=", True ' Get grand total.
SendKeys "%{F4}", True ' Send ALT+F4 to close Calculator.
I created a .vbs file and it errors as follows:
Line: 6
Char: 6
Error: expected end of statement
If anyone has the code to do this or something similar I would be very grateful