lopolop Posted January 10, 2007 Share Posted January 10, 2007 ok i cant figure out what to do.. so i have a normal GUI that works good, if i hit Ext, File>Exit, or A Exit button it works, then if i hit start it all goes well.. but when i hit start i disable all buttons except for one.. i enable, and then run a loop, my GUI becomes unresponisve.. so then i add like If $Msg = $GUI_Button Then Exit, still nothing happens, i dont under stand why it doesnt work.. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 10, 2007 Developers Share Posted January 10, 2007 I think its line 60 that is causing the problem .. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
McGod Posted January 10, 2007 Share Posted January 10, 2007 I think its line 60 that is causing the problem .. 60's fine, its like 142 thats the real problem. Could be the magic ball is acting up tho [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
Paulie Posted January 11, 2007 Share Posted January 11, 2007 Well, the entire syntax is wrong for the first 14 lines, but i must say your formatting is beautiful. (Just in case you don't get it, we need to see your code... ) Link to comment Share on other sites More sharing options...
lopolop Posted January 11, 2007 Author Share Posted January 11, 2007 yeah i no.. lol sorry ill post it once i get home >.< Link to comment Share on other sites More sharing options...
lopolop Posted January 12, 2007 Author Share Posted January 12, 2007 ok here is some code.. While 1 $Msg = GUIGetMsg() ; ##"Exit"## If $Msg = $GUI_EVENT_CLOSE Then Exit If $Msg = $GUI_Func_Exit Then Exit If $Msg = $GUI_Menu_File_Exit Then Exit ; ########## If $Msg = $GUI_Func_Start Then Start() EndIf If $Msg = $GUI_Func_Stop Then Exit WEnd ;Ok so now i hit $GUI_Func_Start... Func Start() Disable() GUICtrlSetData($GUI_Status, "Running") While 1 Sleep(.05) If _IsPressed(10, $dll) Then $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), $AIMCOLOR, 15) If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) EndIf EndIf If $Msg = $GUI_EVENT_CLOSE Then Exit If $Msg = $GUI_Func_Stop Then Exit WEnd EndFunc Func Disable() GUICtrlSetState($GUI_Func_Start, $GUI_DISABLE) GUICtrlSetState($GUI_Func_Exit, $GUI_DISABLE) GUICtrlSetState($GUI_Func_Stop, $GUI_ENABLE) EndFunc ;Now $GUI_Func_Stop wont work... Link to comment Share on other sites More sharing options...
Developers Jos Posted January 12, 2007 Developers Share Posted January 12, 2007 you are not reading the message queue in the Start() function.. put a " $Msg = GUIGetMsg()" in the loop .. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
lopolop Posted January 12, 2007 Author Share Posted January 12, 2007 ooo i see ok thanks.. i didnt realize that the $msg didnt work for that function.. Link to comment Share on other sites More sharing options...
Helge Posted January 12, 2007 Share Posted January 12, 2007 ooo i see ok thanks.. i didnt realize that the $msg didnt work for that function..Do you actually understand ? GUIGetMsg is in an entirely different loop and since it isn't called in the active loopthen you can't expect AutoIt to update $msg automagically for you. 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