Fuzy Posted October 18, 2017 Share Posted October 18, 2017 (edited) How do i make i so that $Start calls Func Autobuff and loop it till pressed again? (newbie here) expandcollapse popupInetGet ( "https://i.imgur.com/2yicWdk.jpg", "Database/Image/Background") $Form1 = GUICreate("Form1", 347, 434, 192, 124) $Pic1 = GUICtrlCreatePic("Database/Image/Background", 0, 0, 346, 433) $hk1 = GUICtrlCreateInput("1", 8, 24, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $hk2 = GUICtrlCreateInput("2", 8, 56, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $hk3 = GUICtrlCreateInput("3", 8, 88, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $hk4 = GUICtrlCreateInput("4", 8, 120, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $hk5 = GUICtrlCreateInput("5", 8, 152, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $hk6 = GUICtrlCreateInput("6", 8, 184, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $hk7 = GUICtrlCreateInput("7", 8, 216, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $hk8 = GUICtrlCreateInput("8", 8, 248, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $hk9 = GUICtrlCreateInput("9", 8, 280, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $hk10 = GUICtrlCreateInput("0", 8, 312, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $cd = GUICtrlCreateInput("20", 10, 392, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $Start = GUICtrlCreateInput("=", 232, 24, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $Game = GUICtrlCreateInput("9Dragons", 232, 392, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) GUISetState(@SW_SHOW) ;Atobuff Start------------------------------------------------------------------------------ Func Autobuff() Send("{$hk1 Down}") Sleep("$cd") Send("{$hk1 up}") Sleep 2000 ;Spacer-------------------------------------------------------------------------------------- Send("{$hk2 Down}") Sleep("$cd") Send("{$hk2 up}") Sleep 2000 ;Spacer-------------------------------------------------------------------------------------- Send("{$hk3 Down}") Sleep("$cd") Send("{$hk3 up}") Sleep 2000 ;Spacer-------------------------------------------------------------------------------------- Send("{$hk4 Down}") Sleep("$cd") Send("{$hk4 up}") Sleep 2000 ;Spacer-------------------------------------------------------------------------------------- Send("{$hk5 Down}") Sleep("$cd") Send("{$hk5 up}") Sleep 2000 ;Spacer-------------------------------------------------------------------------------------- Send("{$hk6 Down}") Sleep("$cd") Send("{$hk6 up}") Sleep 2000 ;Spacer-------------------------------------------------------------------------------------- Send("{$hk7 Down}") Sleep("$cd") Send("{$hk7 up}") Sleep 2000 ;Spacer-------------------------------------------------------------------------------------- Send("{$hk8 Down}") Sleep("$cd") Send("{$hk8 up}") Sleep 2000 ;Spacer-------------------------------------------------------------------------------------- Send("{$hk9 Down}") Sleep("$cd") Send("{$hk9 up}") Sleep 2000 ;Spacer-------------------------------------------------------------------------------------- Send("{$hk10 Down}") Sleep("$cd") Send("{$hk10 up}") Sleep 2000 EndFunc ;==>Autobuff------------------------------------------------------------------------- ;Atobuff End While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited October 18, 2017 by Melba23 Added code tags Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 18, 2017 Moderators Share Posted October 18, 2017 Fuzy, Welcome to the AutoIt forums. Quote $Game = GUICtrlCreateInput("9Dragons", Is this a script to automate a game? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Fuzy Posted October 18, 2017 Author Share Posted October 18, 2017 Yea, i play on 2 computers, kinda pain in the ass to keep buffing myself. ;X Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 18, 2017 Moderators Share Posted October 18, 2017 Fuzy, Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts