godjacky2 Posted January 30, 2020 Share Posted January 30, 2020 (edited) expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <WinAPISysWin.au3> Opt("GUIOnEventMode", 1) $Form1 = GUICreate("Aukeng", 457, 139, 192, 124, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST,$WS_EX_LAYERED)) GUISetBkColor(0x000000) _WinAPI_SetLayeredWindowAttributes($Form1, 0x000000) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close") $Hook = GUICtrlCreateLabel("Hook: ", 24, 24, 86, 32) GUICtrlSetFont(-1, 18, 800, 0, "Bookman Old Style") GUICtrlSetColor(-1, 0xFFFFFF) $c_h1 = GUICtrlCreateLabel("0", 152, 24, 20, 32) GUICtrlSetFont(-1, 18, 800, 0, "Bookman Old Style") GUICtrlSetColor(-1, 0xFFFFFF) $c_h2 = GUICtrlCreateLabel("0", 232, 24, 20, 32) GUICtrlSetFont(-1, 18, 800, 0, "Bookman Old Style") GUICtrlSetColor(-1, 0xFFFFFF) $c_h3 = GUICtrlCreateLabel("0", 312, 24, 20, 32) GUICtrlSetFont(-1, 18, 800, 0, "Bookman Old Style") GUICtrlSetColor(-1, 0xFFFFFF) $c_h4 = GUICtrlCreateLabel("0", 392, 24, 20, 32) GUICtrlSetFont(-1, 18, 800, 0, "Bookman Old Style") GUICtrlSetColor(-1, 0xFFFFFF) $DS = GUICtrlCreateLabel("DS:", 40, 72, 47, 32) GUICtrlSetFont(-1, 18, 800, 0, "Bookman Old Style") GUICtrlSetColor(-1, 0xFFFFFF) $c_ds1 = GUICtrlCreateLabel("0", 152, 72, 20+20, 32) GUICtrlSetFont(-1, 18, 800, 0, "Bookman Old Style") GUICtrlSetColor(-1, 0xFFFFFF) $c_ds2 = GUICtrlCreateLabel("0", 232, 72, 20+20, 32) GUICtrlSetFont(-1, 18, 800, 0, "Bookman Old Style") GUICtrlSetColor(-1, 0xFFFFFF) $c_ds3 = GUICtrlCreateLabel("0", 312, 72, 20+20, 32) GUICtrlSetFont(-1, 18, 800, 0, "Bookman Old Style") GUICtrlSetColor(-1, 0xFFFFFF) $c_ds4 = GUICtrlCreateLabel("0", 392, 72, 20+20 , 32) GUICtrlSetFont(-1, 18, 800, 0, "Bookman Old Style") GUICtrlSetColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $canmove=False $count_h1=0 $count_h2=0 $count_h3=0 $count_h4=0 $count_ds1=0 $count_ds2=0 $count_ds3=0 $count_ds4=0 $counttime1=0 $counttime2=0 $counttime3=0 $counttime4=0 Const $time=60 $start_ds1=False $start_ds2=False $start_ds3=False $start_ds4=False WinMove("Aukeng","",24, 18) HotKeySet("{/}","Form1_1Close") ;Exit HotKeySet("{m}","canmove") ;Move HotKeySet("{1}","c_h1Click") ;hook count1 HotKeySet("{2}","c_h2Click") ;hook count2 HotKeySet("{3}","c_h3Click") ;hook count3 HotKeySet("{4}","c_h4Click") ;hook count4 HotKeySet("{5}","reset") ;reset HotKeySet("{f1}","c_ds1Click") ;countds HotKeySet("{f2}","c_ds2Click") ;countds HotKeySet("{f3}","c_ds3Click") ;countds HotKeySet("{f4}","c_ds4Click") ;countds While 1 Sleep(100) $sur1=PixelGetColor(145, 959) $sur2=PixelGetColor(255, 959) $sur3=PixelGetColor(365, 959) $sur4=PixelGetColor(475, 959) ToolTip("0x"&Hex($sur2,6),0,0) autocount1() ;do this thing in the same time autocount2() ;do this thing in the same time autocount3() ;do this thing in the same time autocount4() ;do this thing in the same time ;;;;;;;;;;;manmal;;;;;;;;;;;;;; If $start_ds1=True Then $timeleft1=Int($time-(TimerDiff($counttime1)/1000)) GUICtrlSetData($c_ds1,$timeleft1) If $timeleft1=0 Then $start_ds1=False EndIf EndIf If $start_ds2=True Then $timeleft2=Int($time-(TimerDiff($counttime2)/1000)) GUICtrlSetData($c_ds2,$timeleft2) If $timeleft2=0 Then $start_ds2=False EndIf EndIf If $start_ds3=True Then $timeleft3=Int($time-(TimerDiff($counttime3)/1000)) GUICtrlSetData($c_ds3,$timeleft3) If $timeleft3=0 Then $start_ds3=False EndIf EndIf If $start_ds4=True Then $timeleft4=Int($time-(TimerDiff($counttime4)/1000)) GUICtrlSetData($c_ds4,$timeleft4) If $timeleft4=0 Then $start_ds4=False EndIf EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WEnd Func autocount1() c_h1Click() Do sleep(100) $sur1=PixelGetColor(160, 946) ToolTip("0x"&Hex($sur1,6),0,20) If $count_h1=3 Then ExitLoop EndIf Until $sur1 = 0xEDE6E7 c_ds1Click() EndFunc Func autocount2() c_h3Click() Do sleep(100) $sur2=PixelGetColor(270, 946) ToolTip("0x"&Hex($sur2,6),0,20) If $count_h2=3 Then ExitLoop EndIf Until $sur2 = 0xEDE6E7 c_ds2Click() EndFunc Func autocount3() c_h3Click() Do sleep(100) $sur3=PixelGetColor(380, 946) ToolTip("0x"&Hex($sur3,6),0,20) If $count_h3=3 Then ExitLoop EndIf Until $sur3 = 0xEDE6E7 c_ds3Click() EndFunc Func autocount4() c_h4Click() Do sleep(100) $sur4=PixelGetColor(490, 946) ToolTip("0x"&Hex($sur4,6),0,20) If $count_h4=3 Then ExitLoop EndIf Until $sur4 = 0xEDE6E7 c_ds4Click() EndFunc Func c_ds1Click() $counttime1=TimerInit() $start_ds1=True EndFunc Func c_ds2Click() $counttime2=TimerInit() $start_ds2=True EndFunc Func c_ds3Click() $counttime3=TimerInit() $start_ds3=True EndFunc Func c_ds4Click() $counttime4=TimerInit() $start_ds4=True EndFunc Func c_h1Click() if $count_h1 >2 then $count_h1=-1 EndIf $count_h1+=1 GUICtrlSetData($c_h1,$count_h1) EndFunc Func c_h2Click() if $count_h2 >2 then $count_h2=-1 EndIf $count_h2+=1 GUICtrlSetData($c_h2,$count_h2) EndFunc Func c_h3Click() if $count_h3 >2 then $count_h3=-1 EndIf $count_h3+=1 GUICtrlSetData($c_h3,$count_h3) EndFunc Func c_h4Click() if $count_h4 >2 then $count_h4=-1 EndIf $count_h4+=1 GUICtrlSetData($c_h4,$count_h4) EndFunc In autocountN() have 2 events first if the program finds the first color go to the second event. Second, go find the second color. Can I do 4 autocuountN() at the same time? I mean if autocount1() finishes the first event and waits for the second event but program found the first event in the autocuount2() too which means it waits for the second event 2 functions. But this program does is do function1 done 2 events go function2 I want to do all at the same time. Edited January 30, 2020 by Melba23 Added code tags Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 30, 2020 Moderators Share Posted January 30, 2020 godjacky2, This looks like a gamebot? Is that in fact the case? 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
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