Sign in to follow this  
Followers 0
Qual-IT London

exitcodes

5 posts in this topic

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")

Share this post


Link to post
Share on other sites



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")

i could just use this i suppose

@echo off

:one

start /wait screen1.exe

if errorlevel 3 goto end

if errorlevel 2 goto two

:two

start /wait screen2.exe

if errorlevel 3 goto end

if errorlevel 2 goto three

if errorlevel 1 goto one

:three

start /wait screen3.exe

if errorlevel 3 goto end

if errorlevel 2 goto four

if errorlevel 1 goto two

:four

start /wait screen4.exe

if errorlevel 3 goto end

if errorlevel 2 goto five

if errorlevel 1 goto three

:five

start /wait screen5.exe

if errorlevel 3 goto end

if errorlevel 2 goto six

if errorlevel 1 goto four

:six

start /wait screen6.exe

if errorlevel 3 goto end

if errorlevel 2 goto seven

if errorlevel 1 goto five

:seven

start /wait screen7.exe

if errorlevel 3 goto end

if errorlevel 2 goto six

if errorlevel 1 goto end

:end

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

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???

Share this post


Link to post
Share on other sites

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 .. :)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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