masterperas Posted March 14, 2007 Share Posted March 14, 2007 I made a little script that opens an ie browser. While waiting for the window to show up i show a little labe saying something to the effect of "Wait please..." Problem is sometime the script pauses on its on, show the little labe is stuck in the screen. I dont want it to be the user that has to go to the taskbar icon and unpause the script. Anyone know how i can totally avoid the script pausing? or detect the script pause event, and override it to just continue processing? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 14, 2007 Moderators Share Posted March 14, 2007 Opt('TrayMenuMode', 1) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
rambo3889 Posted March 14, 2007 Share Posted March 14, 2007 I would use Smoke_N's metode but here is another function which can be used, break() My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 14, 2007 Moderators Share Posted March 14, 2007 (edited) I would use Smoke_N's metode but here is another function which can be used, break()That's a good point, that actually would be easier if you are only wanting to do it periodically throughout your script... Edited March 14, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
masterperas Posted March 14, 2007 Author Share Posted March 14, 2007 Opt('TrayMenuMode', 1)first of all thank you for your quick replyfrom my investigation what that does is remove the default options from the menu. my question is wether its stops the script from pausing for any strange reason Link to comment Share on other sites More sharing options...
SadBunny Posted March 14, 2007 Share Posted March 14, 2007 (edited) first of all thank you for your quick replyfrom my investigation what that does is remove the default options from the menu. my question is wether its stops the script from pausing for any strange reasonWhat sort of strange reasons? Sorry, completely misread your initial post. You mean your script is actually paused itself, not waiting on some stalled connection or something? Meaning, if you unpause it through the systraay autoit icon, you see it continue in some way? Edited March 14, 2007 by SadBunny Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
masterperas Posted March 15, 2007 Author Share Posted March 15, 2007 What sort of strange reasons? Sorry, completely misread your initial post. You mean your script is actually paused itself, not waiting on some stalled connection or something? Meaning, if you unpause it through the systraay autoit icon, you see it continue in some way?i wasnt able to identify the reason it does that, but fact is the script is pausing and if the user clicks the unpasue on the systray it will continue working Link to comment Share on other sites More sharing options...
kjmarket Posted March 15, 2007 Share Posted March 15, 2007 You need to post your code if anyone is to tell you wh it is pausing. Pink Floyd - The Wall Link to comment Share on other sites More sharing options...
masterperas Posted March 15, 2007 Author Share Posted March 15, 2007 (edited) here is the source if you think it can help expandcollapse popup#include <IE.au3> #include <GUIConstants.au3> ;Remove Tray Icon #NoTrayIcon ;Server Port $port = "8080" ;Service Name $service = "Tomcat5"; ;Mensagens $msgAguarde = "Por favor aguarde..." $msgErroGeral = "Ocorreu um erro que impediu que o SCoT Iniciasse. Por favor contacte um Administrador." $msgErroServicoIndisponivel = "Serviço Indisponível, por favor reinicie a máquina." $msgErroServicoStartPend = "Serviço Indisponível, por favor tente de novo. Se o problema persistir por favor reinicie a máquina." ;;PATH SCoT $pathSCoT = "C:/Tomcat/server/webapps/SCoTLocal" $pathTmpFile = $pathSCoT & "/logArranque.txt" ;;POPUP INICIAL GUICreate("SCOT", 125, 40,-1,-1,$WS_POPUP,$WS_EX_TOPMOST); will create a dialog box that when displayed is centered Opt("GUICoordMode",2) $widthCell=125 GUICtrlCreateLabel ($msgAguarde, 20, 15, $widthCell); first cell 70 width GUISetState (@SW_SHOW) ; will display an empty dialog box GUISetState (@SW_LOCK) ; will display an empty dialog box ;Query service for status RunWait(@ComSpec & " /c " & "sc query " & $service & " > " & $pathTmpFile, "", @SW_HIDE) $file = FileOpen($pathTmpFile, 0) If $file = -1 Then MsgBox(0, "Alerta", $msgErroGeral) Exit EndIf $line = FileReadLine($file,4) If $line = " STATE : 3 STOP_PENDING " Then GUIDelete() MsgBox(32, "SCoT", $msgErroServicoIndisponivel) Exit ElseIf $line = " STATE : 1 STOPPED " Then GUIDelete() MsgBox(32, "SCoT", $msgErroServicoIndisponivel) Exit ElseIf $line = " STATE : 1 START_PENDING " Then GUIDelete() MsgBox(32, "SCoT", $msgErroServicoStartPend) Exit EndIf ;Abrir o IE e o SCoT $oIE = _IECreate ("about:blank",0,0) _IEPropertySet ( $oIE , "height", "50" ) _IEPropertySet ( $oIE , "width", "100" ) _IEPropertySet ( $oIE ,"resizable","true") _IEPropertySet ( $oIE ,"statusbar","false") _IEPropertySet ( $oIE ,"addressbar","false") _IEPropertySet ( $oIE ,"menubar","false") _IENavigate ($oIE, "http://localhost:" & $port & "/SCoTLocal/SCoT.html") _IELoadWait ($oIE) GUIDelete() _IEQuit($oIE) Edited March 15, 2007 by masterperas Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 15, 2007 Moderators Share Posted March 15, 2007 There's no way to test this, but the only 2 places I can see where you'd have this issue is RunWait() and _IELoadWait(), those would pause for whatever period of time it took for them to finish completing their task. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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