Mazdryk Posted April 15, 2014 Share Posted April 15, 2014 (edited) MY script is below. Basically I do not want Func _fight2 to interrupt or insert itself in Func _Bash If I hit the hotkey for it before the other ends. Is there a command to let only one function run at a time? Func _Bash() HotKeySet("{F4}") $Swap = PixelSearch(800, 1037, 800, 1037, $color1,1, 1, $wgh) ;#1CD If (IsArray($Swap) = 1) Then MouseClick ("LEFT") Sleep (150) Send ("{0}") Sleep (500) else MouseClick ("LEFT") Sleep (200) Send ("{1}") Sleep (1000) endif HotKeySet("{F4}","_Bash") EndFunc Func _Fight2() HotKeySet("{F8}") $Swap = PixelSearch(800, 1037, 800, 1037, $color1,1, 1, $wgh) ;#1CD If (IsArray($Swap) = 1) Then MouseClick ("LEFT") Sleep (150) Send ("{2}") Sleep (500) else MouseClick ("LEFT") Sleep (200) Send ("{2}") Sleep (1000) endif HotKeySet("{F8}","_Fight2") EndFunc Edited April 15, 2014 by Melba23 Added code tags Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 15, 2014 Moderators Share Posted April 15, 2014 Mazdryk,When you last posted a gamebot script I warned you what would happen - so take a week off to read the Forum rules (there is also a link at bottom right of each page) and understand that we enforce them rigidly. Thread locked. M23P.S. And if you do return, learn that when you post code you should use Code tags - see here how to do it. Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. Draygoes 1 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