cash Posted September 13, 2013 Posted September 13, 2013 hi all, i just learn how to use autoit so i made scripts for facebook flashgame using imagesearch and pixelsearch i dont know hot to put only in 1 file this is example of few script Script 1 #include <ImageSearch.au3> HotKeySet("+1", "Start") HotKeySet("!1", "_Exit") $X = 0 $Y = 0 While 1 Sleep(4000) WEnd Func Start() Sleep(4000) While 1 $Search = _ImageSearch('cast.png', 0, $X, $Y, 0) If $Search = 1 Then MouseMove($X, $Y, 10) Sleep(4000) MouseClick("Left") MouseMove(10, 200, 1) Sleep(4000) EndIf WEnd Sleep(4000) EndFunc Sleep(4000) Func _Exit() Exit EndFunc Script 2 #include <ImageSearch.au3> HotKeySet("+2", "Start") HotKeySet("!2", "_Exit") $X1 = 0 $Y1 = 0 While 1 Sleep(3000) WEnd Func Start() While 1 $Search1 = _ImageSearch('strike.png', 0, $X1, $Y1, 0) If $Search1 = 1 Then MouseMove($X1, $Y1, 10) MouseClick("Left") MouseMove(10, 200, 10) EndIf WEnd EndFunc Func _Exit() Exit EndFunc Script 3 #include <ImageSearch.au3> HotKeySet("+6", "Start") HotKeySet("!6", "_Exit") While 1 Sleep(100) WEnd Func Start() Sleep(100) While 1 $Search5 = PixelSearch(0, 0, 1440, 900, 0x3A9B28) If IsArray($Search5) = True Then MouseMove($Search5[0], $Search5[1], 10) Sleep(100) MouseClick("Left") MouseMove(10, 200, 10) Sleep(100) EndIf WEnd Sleep(100) EndFunc Sleep(100) Func _Exit() Exit EndFunc so how to join them in 1 script when i run all 7 script at flash game it got lag because use big memory thx alot
TheSaint Posted September 13, 2013 Posted September 13, 2013 Welcome to the forum cash. You need to read the rules, especially about Game Automation, which is not allowed in any variation what-so-ever. Hope to see you around with questions unrelated to this. This topic has been reported and will no doubt be locked by a MOD shortly. Cheers. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
Moderators Melba23 Posted September 13, 2013 Moderators Posted September 13, 2013 cash,Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now (there is also a link at bottom right of each page) - 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
Recommended Posts