Sign in to follow this  
Followers 0
BenKress

Error Message, but script functions normally

4 posts in this topic

I've an extremely simple script to send some keystrokes to a piece of software. I get an Error parsing function call, in line 15 when I run the script. However the code on line 15 executes normally. I normally wouldn't mind as I get the desired result, but I am deploying the script over a large # of users machines, and could do without a mountain of phone calls asking about the message.

; Script to exit POS Express Properly
; Ben Kress 9/20/2010

WinActivate("[CLASS:AfxFrameOrView42]")
WinWaitActive("[CLASS:AfxFrameOrView42]")
Send ("1111")
Sleep (1000)
Send ("{ENTER}")
Send ("3019")
Sleep (1000)
Send ("{ENTER}")
Sleep (1000)
Send ("499")
Sleep (1000)
Send ("{f2}")
Sleep (1000)
Send ("y")
WinWaitClose

Line 15 is where it sends F2.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Welcome to the Forum ! Posted Image

Try WinWaitClose("[CLASS:AfxFrameOrView42]")

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Hi and Welcome to the forums!

Load that script in SciTE and run from there and it will tell you where the error is, and it certainly isn't line 15.

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\Admiral\AutoIt TNG\Från forumet\180.au3" /autoit3dir "C:\Program Files (x86)\AutoIt3" /UserParams

+>20:50:49 Starting AutoIt3Wrapper v.2.0.1.24 Environment(Language:0409 Keyboard:0000041D OS:WIN_7/ CPU:X64 OS:X64)

>Running AU3Check (1.54.19.0) from:C:\Program Files (x86)\AutoIt3

C:\Users\Admiral\AutoIt TNG\Från forumet\180.au3(18,13) : ERROR: syntax error

WinWaitClose

~~~~~~~~~~~~^

C:\Users\Admiral\AutoIt TNG\Från forumet\180.au3 - 1 error(s), 0 warning(s)

!>20:50:49 AU3Check ended.rc:2

>Exit code: 0 Time: 2.528

To fix that, look at WinWaitClose in the helpfile and it will be obvious that you're missing a lot.

Share this post


Link to post
Share on other sites

Thank you both, I got that sorted out and the script runs great.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0