arcker Posted February 21, 2006 Share Posted February 21, 2006 (edited) ok, i've another problem : here is an example while 1 ;ping the machine if @error then _erreurtest ;and continue loop without waiting else ;continue with the next machine endif wend func _erreurtest(machine) while 1 ;testmachine until no error wend endfunc any ideas ? Edited February 21, 2006 by arcker -- 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...
pecloe Posted February 21, 2006 Share Posted February 21, 2006 in my limited experience and from what i've read the main script stops until the func ends. perhaps you will have to launch another script, just a thought. Link to comment Share on other sites More sharing options...
Nuffilein805 Posted February 21, 2006 Share Posted February 21, 2006 try adlibenable ("_erreurtest") and adlibdisable () this should fit your needs my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
ChrisL Posted February 21, 2006 Share Posted February 21, 2006 try adlibenable ("_erreurtest")and adlibdisable ()this should fit your needsAs far as I'm aware... doesn't the main script wait for the adlib to finish.You could have the testing function as a seperate application which writes to a file.or something like this for running a single command on a lineFunc AutoItExecute($Cmd) Run(@AutoItExe & ' /AutoIt3ExecuteLine "' & $Cmd & '"')EndFuncOr write several lines to a temp file in autoIT code and run itRun(@AutoItExe & ' /AutoIt3ExecuteScript ' & @tempdir & '\temp.au3') [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...
Nuffilein805 Posted February 21, 2006 Share Posted February 21, 2006 well, i'm not sure, as far as i know adlib doesn't stop the script he could do a 2nd exe as well, but i think he doesn't want it my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
ChrisL Posted February 21, 2006 Share Posted February 21, 2006 well, i'm not sure, as far as i know adlib doesn't stop the script he could do a 2nd exe as well, but i think he doesn't want it If you try the below, you will only ever get one message box at a time, if it could run the 2 together you would expect that with the MAin message box up and OK not clicked that the Adlib message would keep popping up, but it doesn't which is why I think the main script stops while adlib is running and vice versa, so if the main script is waiting for a reply the adlib doesn't run until after the reply AdlibEnable ( "adlib" , 500 ) For $i = 1 to 5 MsgBox (0,"Main", "Main Script") Sleep (500) Next Func Adlib() MsgBox (0,"Adlib", "Adlib Message") EndFunc [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...
Nuffilein805 Posted February 21, 2006 Share Posted February 21, 2006 ok adlib really stops the script after the timeout you can give! but i got 1 more suggestion: store the non-pingable machines to a variable and run your test after every ip is pinged so you won't loose the time to ping the others best way would be a 2nd script where you just run the ping for this machine you can pass the ip via a hidden window/gui controlsettext - controlgettext just another idea if you need more specific help just ask my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
ChrisL Posted February 21, 2006 Share Posted February 21, 2006 Just to confirm the help file says.. Remarks Every 250 ms (or time ms) the specified "function" is called--typically to check for unforeseen errors. For example, you could use adlib in a script which causes an error window to pop up unpredictably. The adlib function should be kept simple as it is executed often and during this time the main script is paused. Also, the time parameter should be used carefully to avoid CPU load. [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...
arcker Posted February 22, 2006 Author Share Posted February 22, 2006 yes, the main script waits for adlib ending i will try to create a second script, or gui hidden, or shown why not. so i will try when "ping error", call the second function maybe i can try with different guys in the same script ? no it will not change anything i think -- 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...
arcker Posted February 22, 2006 Author Share Posted February 22, 2006 grrrr too boring, because i've to work with multiple guis and how to retrieve information of another guy (i've tried with return, it works, but stop the function,that it normal !) so, i want to retrieve information $retrieve=run(script) if $retrieve="no more error" then ;change serveur status message -- 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 22, 2006 Share Posted February 22, 2006 Here is my possible solution to your problem, you don't have to create the second application the way I dohttp://www.autoitscript.com/forum/index.php?showtopic=22048 [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