arcker Posted February 23, 2006 Share Posted February 23, 2006 i would like to be able to stdout a script i've sought in the help without results i want to be able to send information to $result when $result=(;run autoitscript) i've tried with return in the script, but when return is called, the script is stopped any ideas ? thx -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
GaryFrost Posted February 23, 2006 Share Posted February 23, 2006 i would like to be able to stdout a scripti've sought in the help without resultsi want to be able to send information to $result when$result=(;run autoitscript)i've tried with return in the script, but when return is called, the script is stoppedany ideas ?thx Are You looking for an Exit Code?If so look in the Help for Exit in KeywordsThat will still stop the script 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...
arcker Posted February 23, 2006 Author Share Posted February 23, 2006 yes but i need to get some information about the exit code -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
GaryFrost Posted February 23, 2006 Share Posted February 23, 2006 yes but i need to get some information about the exit code would help if you gave an example of the script your attempting for example: $ExitCode = RunWait(@SystemDir & "\winver.exe") MsgBox(0,"Exit Code", $ExitCode) Now in the RunWait, could be a script that you have compiled and may have different exit codes depending on what happens. 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...
arcker Posted February 23, 2006 Author Share Posted February 23, 2006 ok, i want to launch another script the ping the machine until no error when no error, i want to have the exit code of the exit, to set on the main script that the server i good now $message=run(;autoitexe scriptping.au3 /$server) when $message = 0 then guictrlsetdata($genreralstatus,"good") -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
GaryFrost Posted February 23, 2006 Share Posted February 23, 2006 (edited) ok, i want to launch another script the ping the machine until no error when no error, i want to have the exit code of the exit, to set on the main script that the server i good now $message=run(;autoitexe scriptping.au3 /$server) when $message = 0 then guictrlsetdata($genreralstatus,"good") i suspect your going to need either a runwait or put the other script in the main script in a while statement i.e. examples $var = Ping("www.AutoItScript.com",250) While @error $var = Ping("www.AutoItScript.com",250) WEnd MsgBox(0,"Ping", "It's there") $var = Ping("gafrostnoping.com",250) While @error MsgBox(0,"Ping", "It's not there") $var = Ping("gafrostnoping.com",250) WEnd Edited February 23, 2006 by gafrost 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...
arcker Posted February 23, 2006 Author Share Posted February 23, 2006 euh no sorry, i've already done this, alot what i want, in my main script, is to ping several servers (no problem here) when there is an error on one server, this launch another script to test continuisly the server with problem, but don't stop the main script but the main script muste know when the test is finished, so the script -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
ChrisL Posted February 23, 2006 Share Posted February 23, 2006 (edited) Can you adapt this, it pings 20 machines at once and the main script just waits, I know it's not exactly what you want to do but you could adapt the principle. #include <array.au3> AdlibEnable("Adlib", 1000) Dim $Foo[21], $aResult Global $Return For $a = 1 to 20 $NewTempFile = @sec & Int (Random () * 1000000) & ".Au3" $IP = '"100.100.100.' & $a & '"' FileWriteLine ($NewTempFile,'$Result = Ping ('& $IP & ')') FileWriteLine ($NewTempFile,'ConsoleWrite (' & $IP & '"|" & $Result )') FileWriteLine ($NewTempFile,'Sleep (5000)') $Foo[$a] = Run(@AutoItExe & ' /AutoIt3ExecuteScript ' & $NewTempFile,@scriptdir, @SW_show, 7) Sleep (50) Next While 1 $Complete = StringSplit ($Return, "-") If Ubound ($Complete) > 20 then exitloop _ArrayDisplay ($Complete,"Title") Sleep (1000) Wend Func Adlib () For $i = 1 to Ubound ($Foo) - 1 If @error then exitloop $line = StdoutRead($foo[$i],"",true) If $Line <> 0 then $line = StdoutRead($foo[$i]) $Return = $Return & $Line & "-" EndIf Next EndFunc Edited February 23, 2006 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire 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