Valuater Posted November 9, 2008 Share Posted November 9, 2008 (edited) I just cant find it... probably something dumb...... and I will have to pay the price of ridicule... Any ways.... NO CLICKING... needed 1 Place your mouse over "Auto Click" it will turn green - On 2 Place your mouse over "Auto Move" ( no clicking) it will turn green ... you can move the GUI for 4 seconds 3 Place your mouse over "Auto Click" it will turn Blue - Off ... now comes the problem, "Auto Move" will be activated (turn green) ...why????? expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> Global $Hover = 0, $Pause = 200 $Main = GUICreate("T-90", 330, 180, -1, -1, $WS_POPUP) $exit = GUICtrlCreateLabel("EXIT", 295, 4, 25, 12) $AutoClick = GUICtrlCreateLabel(" AUTO_CLICK", 99, 3, 70, 14) GUICtrlSetBkColor(-1, 0x4876FF) $AutoMove = GUICtrlCreateLabel(" AUTO_MOVE", 199, 3, 70, 14, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetBkColor(-1, 0x4876FF) GUISetState() While 1 If $Hover Then Sleep($Pause * 10) ToolTip("") $inf = GUIGetCursorInfo($Main) $msg = $inf[4] Else $msg = GUIGetMsg() $inf = GUIGetCursorInfo($Main) If $inf[4] = $AutoClick Then $msg = $AutoClick EndIf Switch $msg Case $exit, -3 Exit Case $AutoClick If $Hover = 0 Then $Hover = 1 GUICtrlSetBkColor($AutoClick, 0x00ff00) ; Green Else $Hover = 0 GUICtrlSetBkColor($AutoClick, 0x4876FF) ;FF0000) ; red Sleep(1000) ;ContinueLoop EndIf Case $AutoMove GUICtrlSetBkColor($AutoMove, 0x00ff00) ; Green $info = 'If MouseDown(""left"") And Sleep(' & $Pause * 20 & ') And MouseUp(""left"") = 1 Then Exit' RunWait(@AutoItExe & ' /AutoIt3ExecuteLine ' & '"' & $info & '"') GUICtrlSetBkColor($AutoMove, 0x4876FF) ;FF0000) ; red Sleep(1000) EndSwitch WEnd thx 8) Edited November 9, 2008 by Valuater Link to comment Share on other sites More sharing options...
ResNullius Posted November 9, 2008 Share Posted November 9, 2008 It's definitely related to the code executed by RunWait(@AutoItExe & ' /AutoIt3ExecuteLine ' & '"' & $info & '"') just can't figure out why yet. Link to comment Share on other sites More sharing options...
Valuater Posted November 9, 2008 Author Share Posted November 9, 2008 It's definitely related to the code executed by RunWait(@AutoItExe & ' /AutoIt3ExecuteLine ' & '"' & $info & '"') just can't figure out why yet. But, the strange part is "Case $AutoMove" shouldn't even receive a message!!!...??? 8) Link to comment Share on other sites More sharing options...
rover Posted November 9, 2008 Share Posted November 9, 2008 Hi Valuater not the first time I've seen glitchiness from GuiGetMsg() if I disabled a button just after pressing it, that caused problems with GuiGetMsg() (I recall that the problem has since been fixed) Case $AutoMove Opt("GUIOnEventMode", 1) GUICtrlSetBkColor($AutoMove, 0x00ff00) ; Green $info = 'If MouseDown(""left"") And Sleep(' & $Pause * 20 & ') And MouseUp(""left"") = 1 Then Exit' RunWait(@AutoItExe & ' /AutoIt3ExecuteLine ' & '"' & $info & '"', @ScriptDir, @SW_HIDE) Opt("GUIOnEventMode", 0) GUICtrlSetBkColor($AutoMove, 0x4876FF) ;FF0000) ; red Sleep(1000) I see fascists... Link to comment Share on other sites More sharing options...
Valuater Posted November 9, 2008 Author Share Posted November 9, 2008 Hi Valuater not the first time I've seen glitchiness from GuiGetMsg() if I disabled a button just after pressing it, that caused problems with GuiGetMsg() (I recall that the problem has since been fixed) Case $AutoMove Opt("GUIOnEventMode", 1) GUICtrlSetBkColor($AutoMove, 0x00ff00) ; Green $info = 'If MouseDown(""left"") And Sleep(' & $Pause * 20 & ') And MouseUp(""left"") = 1 Then Exit' RunWait(@AutoItExe & ' /AutoIt3ExecuteLine ' & '"' & $info & '"', @ScriptDir, @SW_HIDE) Opt("GUIOnEventMode", 0) GUICtrlSetBkColor($AutoMove, 0x4876FF) ;FF0000) ; red Sleep(1000) Cool! Ya know, I'm not the kind guy who needs to know "why". But with this add-on you gave me, I can just move forward... Thanks For the dev's maybe you might want to look into this... thx 8) Link to comment Share on other sites More sharing options...
rover Posted November 9, 2008 Share Posted November 9, 2008 (edited) Cool!Ya know, I'm not the kind guy who needs to know "why". But with this add-on you gave me, I can just move forward... ThanksFor the dev's maybe you might want to look into this...thx8)no problemturning on and off the message polling resets GuiGetMsg()to eliminate the message bounce.I don't know why that happensbut I have experienced it before in v3.2.8.1Edit: poor wording corrected Edited November 9, 2008 by rover I see fascists... 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