Jump to content



Photo

Disable/Enable using same hot key


  • Please log in to reply
3 replies to this topic

#1 toothyXdip

toothyXdip

    Wayfarer

  • Active Members
  • Pip
  • 72 posts

Posted 07 November 2007 - 09:54 PM

(ac script at bottem)
ok im just working on making my ac a little better and i thought you shouldnt be able to click diff speeds when you are in the clicking process.
My problem it will disable the other 2 radios when i start it and keep the selected one enabled but when i press the hot key again the acing stops but the other 2 are still disabled.

And yes i did try to get this to work before i posted i tried setting up an else in the if tried having a func that enables them and checks if they are disabled ive tried a lot of stuff so yeah...i probably just did the write thing just in the wrong way.

(and im trying something write now that i thought of so i might get it to work)
nope that did work i tried a different way of doing the check state if state then change state...still same problem >.<

And im not asking for a script im asking for you to give me and Idea of what i need to do

AutoIt         
Global $F10OnOff HotKeySet('{F10}', '_Sendleftclick') #include <GUIConstants.au3> $main = GUICreate("Toothydip Ac", 230, 300) GUISetBkColor(0x0000ff) $user = GUICtrlCreateDummy() GUICtrlSetOnEvent ($GUI_EVENT_CLOSE, 'onclick') $group = XSkinGroup("Speed Setting", 40, 80, 130, 130, $SS_CENTER) GUISetFont(16, "", "", "Alien Encounters") ;Labels------------------------------------------- $title = GUICtrlCreateLabel("Toothydip" & @CRLF & "AutoClicker", 40, 40) guisetfont(9) ; Buttons & Checkboxes---------------------------- $fast_speed_checkbox = GUICtrlCreateRadio("  Fast Speed", 50, 100,90,20) $medium_speed_checkbox = GUICtrlCreateRadio("  Medium Speed", 50, 130,110,20) $slow_speed_checkbox = GUICtrlCreateRadio("  Slow Speed", 50, 160,90,20) ; Color Sets ------------------------------------- guictrlsetcolor($title, 0x000000) $clicksetting_helper = 0 $defalt_delay = 10 $speed_setting = 0 GUISetState(@SW_SHOW) While True     $msg = GUIGetMsg()     Sleep(10)     $clicksetting_helper = $clicksetting_helper + $speed_setting     If (($clicksetting_helper * $defalt_delay) / 500) >= 1 Then         Sendleftclick()         $clicksetting_helper = 0         EndIf     Switch $msg         Case $GUI_EVENT_CLOSE             OnExit()     EndSwitch WEnd ; Functions ------------------------------------- Func OnExit()    Exit EndFunc Func onclick()     GUICtrlSendToDummy($user) EndFunc Func Sendleftclick()     If $F10OnOff Then MouseClick("Left") EndFunc Func _Sendleftclick()     $F10OnOff = Not $F10OnOff     If _IsChecked($fast_speed_checkbox) Then         $speed_setting = 50     GUICtrlSetState($medium_speed_checkbox, $GUI_DISABLE)     GUICtrlSetState($slow_speed_checkbox, $GUI_DISABLE)         ElseIf _IsChecked($medium_speed_checkbox) Then         $speed_setting = 30     GUICtrlSetState($fast_speed_checkbox, $GUI_DISABLE)     GUICtrlSetState($slow_speed_checkbox, $GUI_DISABLE)         ElseIf _IsChecked($slow_speed_checkbox) Then         $speed_setting = 10     GUICtrlSetState($medium_speed_checkbox, $GUI_DISABLE)     GUICtrlSetState($fast_speed_checkbox, $GUI_DISABLE) EndIf EndFunc Func _IsChecked($control)     Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED EndFunc Func XSkinGroup($text, $Pleft, $Ptop, $Pwidth, $Pheight, $color)     $color = 0Xffffff     Local $XS_n, $PControl     If StringInStr(@OSTYPE, "WIN32_NT") Then         $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties")         DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)     EndIf     $PControl = GUICtrlCreateGroup($text, $Pleft, $Ptop, $Pwidth, $Pheight)     ;GUICtrlSetBkColor($PControl, $color1)     GUICtrlSetColor($PControl, $color)     If StringInStr(@OSTYPE, "WIN32_NT") And IsArray($XS_n) Then         DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0])     EndIf     Return $PControl EndFunc   ;==>XSkinGroup

Edited by toothyXdip, 07 November 2007 - 10:35 PM.

---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝





#2 Nahuel

Nahuel

    To Err is human, to Arr is pirate.

  • Active Members
  • PipPipPipPipPipPip
  • 1,841 posts

Posted 08 November 2007 - 12:46 AM

AutoIt         
Global $F10OnOff Global $Disabled=False HotKeySet('{F10}', '_Sendleftclick') #include <GUIConstants.au3> $main = GUICreate("Toothydip Ac", 230, 300) GUISetBkColor(0x0000ff) $user = GUICtrlCreateDummy() GUICtrlSetOnEvent ($GUI_EVENT_CLOSE, 'onclick') $group = XSkinGroup("Speed Setting", 40, 80, 130, 130, $SS_CENTER) GUISetFont(16, "", "", "Alien Encounters") ;Labels------------------------------------------- $title = GUICtrlCreateLabel("Toothydip" & @CRLF & "AutoClicker", 40, 40) guisetfont(9) ; Buttons & Checkboxes---------------------------- $fast_speed_checkbox = GUICtrlCreateRadio("  Fast Speed", 50, 100,90,20) $medium_speed_checkbox = GUICtrlCreateRadio("  Medium Speed", 50, 130,110,20) $slow_speed_checkbox = GUICtrlCreateRadio("  Slow Speed", 50, 160,90,20) ; Color Sets ------------------------------------- guictrlsetcolor($title, 0x000000) $clicksetting_helper = 0 $defalt_delay = 10 $speed_setting = 0 GUISetState(@SW_SHOW) While True     $msg = GUIGetMsg()     Sleep(10)     $clicksetting_helper = $clicksetting_helper + $speed_setting     If (($clicksetting_helper * $defalt_delay) / 500) >= 1 Then         Sendleftclick()         $clicksetting_helper = 0         EndIf     Switch $msg         Case $GUI_EVENT_CLOSE             OnExit()     EndSwitch WEnd ; Functions ------------------------------------- Func OnExit()    Exit EndFunc Func onclick()     GUICtrlSendToDummy($user) EndFunc Func Sendleftclick()     If $F10OnOff Then MouseClick("Left") EndFunc Func _Sendleftclick()     $F10OnOff = Not $F10OnOff     If $Disabled Then         GUICtrlSetState($fast_speed_checkbox, $GUI_ENABLE)         GUICtrlSetState($medium_speed_checkbox, $GUI_ENABLE)         GUICtrlSetState($slow_speed_checkbox, $GUI_ENABLE)         $Disabled = Not $Disabled         Return     EndIf     If _IsChecked($fast_speed_checkbox) Then         $speed_setting = 50         GUICtrlSetState($medium_speed_checkbox, $GUI_DISABLE)         GUICtrlSetState($slow_speed_checkbox, $GUI_DISABLE)         $Disabled=True         ElseIf _IsChecked($medium_speed_checkbox) Then             $speed_setting = 30             GUICtrlSetState($fast_speed_checkbox, $GUI_DISABLE)             GUICtrlSetState($slow_speed_checkbox, $GUI_DISABLE)             $Disabled=True         ElseIf _IsChecked($slow_speed_checkbox) Then             $speed_setting = 10             GUICtrlSetState($medium_speed_checkbox, $GUI_DISABLE)             GUICtrlSetState($fast_speed_checkbox, $GUI_DISABLE)             $Disabled=True     EndIf         EndFunc Func _IsChecked($control)     Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED EndFunc Func XSkinGroup($text, $Pleft, $Ptop, $Pwidth, $Pheight, $color)     $color = 0Xffffff     Local $XS_n, $PControl     If StringInStr(@OSTYPE, "WIN32_NT") Then         $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties")         DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)     EndIf     $PControl = GUICtrlCreateGroup($text, $Pleft, $Ptop, $Pwidth, $Pheight)     ;GUICtrlSetBkColor($PControl, $color1)     GUICtrlSetColor($PControl, $color)     If StringInStr(@OSTYPE, "WIN32_NT") And IsArray($XS_n) Then         DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0])     EndIf     Return $PControl EndFunc   ;==>XSkinGroup


#3 toothyXdip

toothyXdip

    Wayfarer

  • Active Members
  • Pip
  • 72 posts

Posted 08 November 2007 - 02:02 AM

thanks bro =)

HOLY SHIZZ 34,727 POST VIEWS almost as much as the sticky

Edited by toothyXdip, 08 November 2007 - 11:36 PM.

---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

#4 Al Jones

Al Jones

    Seeker

  • Active Members
  • 8 posts

Posted 13 January 2008 - 02:39 PM

thanks bro =)

HOLY SHIZZ 34,727 POST VIEWS almost as much as the sticky


I believe it; for some reason there isn't anything directly pointing to how to enable / disable a GUI control - I've spent the better part of an hour looking - and of course, now that I've found it, it's obvious!

//al




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users