someone Posted July 14, 2007 Share Posted July 14, 2007 This code seems to work but it may be breaking more then it fixes... the point of it is to have your GUI loop enclosed in a function that you set a hotkey to when entering your loop... try this out but beyond what I said before thats all I can come up with... expandcollapse popup#include <GuiConstants.au3> #Include <Misc.au3> Opt("TrayIconDebug", 1) GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Loop = GuiCtrlCreateButton("Run Loop", 160, 260, 80, 40) GuiCtrlCreateGroup("", 30, 20, 340, 230) _MainGUI() Func _MainGUI() GuiSetState() HotKeySet("{PAUSE}") ToolTip("") ;clears the tooltip While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect If $msg = $Loop Then _Looptime() WEnd EndFunc Func _Looptime() HotKeySet("{PAUSE}", "_MainGUI") While 1 ToolTip("running loop", 0, 0) sleep(10) ; this is equal to a very big loop, I mean that this part represent +-1000 lines of script. Run("notepad") Sleep(500) Sleep(500) Sleep(500) Sleep(500) Sleep(500) Sleep(500) Sleep(500) WinClose("Untitled") WEnd MsgBox(0, "", "exiting loop function") EndFunc let us know if that works for you... While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd Link to comment Share on other sites More sharing options...
Dieuz Posted July 15, 2007 Author Share Posted July 15, 2007 (edited) someone and everyone that helped me, Thanks alot! This method is working for me Edited July 15, 2007 by Dieuz 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