BlazeLondon Posted March 5, 2006 Share Posted March 5, 2006 i've got 7 screens with back and next buttons on them, back exits with code 1 next exits with code 2 then i create this setup.au3 file to load the screens and allow back and forward only problem is i cant read the exit codes, i get unknown macro @exitcode when i run this Runwait ("screen1.exe") Runwait ("screen2.exe") if @exitcode = 0 Then exit if @exitcode = 1 Then Runwait ("screen1.exe") if @exitcode = 2 Then Runwait ("screen3.exe") Link to comment Share on other sites More sharing options...
BlazeLondon Posted March 5, 2006 Author Share Posted March 5, 2006 i've got 7 screens with back and next buttons on them, back exits with code 1 next exits with code 2then i create this setup.au3 file to load the screens and allow back and forwardonly problem is i cant read the exit codes, i get unknown macro @exitcode when i run thisRunwait ("screen1.exe")Runwait ("screen2.exe")if @exitcode = 0 Then exitif @exitcode = 1 Then Runwait ("screen1.exe")if @exitcode = 2 Then Runwait ("screen3.exe")i could just use this i suppose@echo off:onestart /wait screen1.exeif errorlevel 3 goto endif errorlevel 2 goto two:twostart /wait screen2.exeif errorlevel 3 goto endif errorlevel 2 goto threeif errorlevel 1 goto one:threestart /wait screen3.exeif errorlevel 3 goto endif errorlevel 2 goto fourif errorlevel 1 goto two:fourstart /wait screen4.exeif errorlevel 3 goto endif errorlevel 2 goto fiveif errorlevel 1 goto three:fivestart /wait screen5.exeif errorlevel 3 goto endif errorlevel 2 goto sixif errorlevel 1 goto four:sixstart /wait screen6.exeif errorlevel 3 goto endif errorlevel 2 goto sevenif errorlevel 1 goto five:sevenstart /wait screen7.exeif errorlevel 3 goto endif errorlevel 2 goto sixif errorlevel 1 goto end:end Link to comment Share on other sites More sharing options...
GaryFrost Posted March 5, 2006 Share Posted March 5, 2006 i've got 7 screens with back and next buttons on them, back exits with code 1 next exits with code 2 then i create this setup.au3 file to load the screens and allow back and forward only problem is i cant read the exit codes, i get unknown macro @exitcode when i run this Runwait ("screen1.exe") Runwait ("screen2.exe") if @exitcode = 0 Then exit if @exitcode = 1 Then Runwait ("screen1.exe") if @exitcode = 2 Then Runwait ("screen3.exe") Example: $val = Runwait ("screen1.exe") if $val = 0 then exit $val = Runwait ("screen2.exe") if $val = 0 then exit elseif $val = 1 then $val = Runwait("screen1.exe") elseif $val = 2 then $val = Runwait("screen3.exe endif SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
druiddk Posted May 19, 2006 Share Posted May 19, 2006 Sorry to rip up in this thread but I just faced the same problem as Qual-IT London and did it the same way as him. I solved my problem reading this thread but why is it not possible to directly use if @exitcode = 1 then blah??? Link to comment Share on other sites More sharing options...
Developers Jos Posted May 19, 2006 Developers Share Posted May 19, 2006 Sorry to rip up in this thread but I just faced the same problem as Qual-IT London and did it the same way as him.I solved my problem reading this thread but why is it not possible to directly use if @exitcode = 1 then blah???@ExitCode is used internally to be able to check inside Function OnAutoItExit () what the value is as defined by Exit().Check for "Func OnAutoItExit()" for more info .. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now