daslick Posted June 10, 2009 Share Posted June 10, 2009 Like I said in the description, the program pauses when I click on the file menu. Not a technical pause, like if I click "pause autoit script", but it lags up. any ideas? Link to comment Share on other sites More sharing options...
Andreik Posted June 10, 2009 Share Posted June 10, 2009 Like I said in the description, the program pauses when I click on the file menu. Not a technical pause, like if I click "pause autoit script", but it lags up. any ideas? Look, I think that the script already do that(check what happen when you press FILE menu): $GUI = GUICreate("TEST") $MENU = GUICtrlCreateMenu("FILE") $ITEM1 = GUICtrlCreateMenuItem("OPEN",$MENU) $ITEM2 = GUICtrlCreateMenuItem("SAVE",$MENU) $ITEM3 = GUICtrlCreateMenuItem("CLOSE",$MENU) $NUM_TEST = GUICtrlCreateInput("",200,200,50,20) GUISetState() $COUNT = 0 While 1 If GUIGetMsg() = -3 Then Exit $COUNT += 1 GUICtrlSetData($NUM_TEST,$COUNT) Sleep(20) WEnd When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Valuater Posted June 10, 2009 Share Posted June 10, 2009 Like I said in the description, the program pauses when I click on the file menu. Not a technical pause, like if I click "pause autoit script", but it lags up.any ideas?We need to see your code and understand the direction you want to go...Before we can bring out the crystal ball!!8) Link to comment Share on other sites More sharing options...
daslick Posted June 10, 2009 Author Share Posted June 10, 2009 (edited) Thanks Andreik, thanks exactly the problem. My code is around 800 lines, so can we fix the code that he posted? If we find a solution to it then I'll be able to adapt it for my own script. EDIT: The only difference is that mine is OnEventMode. #include <GUIConstantsEx.au3> $GUI = GUICreate("Test") Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "End") $MENU = GUICtrlCreateMenu("File") $ITEM1 = GUICtrlCreateMenuItem("OPEN",$MENU) $ITEM2 = GUICtrlCreateMenuItem("SAVE",$MENU) $ITEM3 = GUICtrlCreateMenuItem("CLOSE",$MENU) $NUM_TEST = GUICtrlCreateInput("",200,200,50,20) GUISetState() $COUNT = 0 While 1 $COUNT += 1 GUICtrlSetData($NUM_TEST,$COUNT) Sleep(20) WEnd Func End() Exit EndFunc Edited June 10, 2009 by daslick Link to comment Share on other sites More sharing options...
martin Posted June 10, 2009 Share Posted June 10, 2009 Thanks Andreik, thanks exactly the problem. My code is around 800 lines, so can we fix the code that he posted? If we find a solution to it then I'll be able to adapt it for my own script. EDIT: The only difference is that mine is OnEventMode. #include <GUIConstantsEx.au3> $GUI = GUICreate("Test") Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "End") $MENU = GUICtrlCreateMenu("File") $ITEM1 = GUICtrlCreateMenuItem("OPEN",$MENU) $ITEM2 = GUICtrlCreateMenuItem("SAVE",$MENU) $ITEM3 = GUICtrlCreateMenuItem("CLOSE",$MENU) $NUM_TEST = GUICtrlCreateInput("",200,200,50,20) GUISetState() $COUNT = 0 While 1 $COUNT += 1 GUICtrlSetData($NUM_TEST,$COUNT) Sleep(20) WEnd Func End() Exit EndFunc Like this? #include <GUIConstantsEx.au3> #include <timers.au3> $GUI = GUICreate("Test") Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "End") $MENU = GUICtrlCreateMenu("File") $ITEM1 = GUICtrlCreateMenuItem("OPEN",$MENU) $ITEM2 = GUICtrlCreateMenuItem("SAVE",$MENU) $ITEM3 = GUICtrlCreateMenuItem("CLOSE",$MENU) $NUM_TEST = GUICtrlCreateInput("",200,200,50,20) GUISetState() $COUNT = 0 _Timer_SetTimer($gui,25,"countup") While 1 Sleep(20) WEnd Func End() Exit EndFunc Func CountUp($a,$b,$c,$d) $COUNT += 1 GUICtrlSetData($NUM_TEST,$COUNT) EndFunc Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
daslick Posted June 10, 2009 Author Share Posted June 10, 2009 YES! I tried the exact same thing with AdlibEnable. Thank 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