Jump to content

Error Message, but script functions normally


BenKress
 Share

Recommended Posts

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.

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...