NizonRox Posted November 14, 2013 Share Posted November 14, 2013 (edited) I made the code Look for the words Shiny, Dark, Mysitc and Ancient... And if it was found then it would stop script and bring up a msg box. But that error accurs MouseClick ( "LEFT", 1017, 176, 1, 1) Sleep(500) Local $shiny = WinGetText("[ACTIVE]", "Shiny") if $shiny > "Shiny" Then Exit MsgBox ( 0, "Shiny Pokemon Found!", "You Have found a Shiny Pokemon") Local $dark = WinGetText("[ACTIVE]", "Dark") if $dark > "Dark" Then Exit MsgBox ( 0, "Dark Pokemon Found!", "You Have found a Dark Pokemon") Local $mystic = WinGetText("[ACTIVE]", "Mystic") If $mystic > "Mystic" Then Exit MsgBox ( 0, "Mystic Pokemon Found!", "You Have found a Mystic Pokemon") Local $ancient = WinGetText("[ACTIVE]", "Ancient") If $ancient > "Ancient" Then Exit MsgBox ( 0, "Ancient Pokemon Found!", "You Have found a Ancient Pokemon") Error :Variable Used Without Being delared. Edited November 14, 2013 by NizonRox Link to comment Share on other sites More sharing options...
corgano Posted November 14, 2013 Share Posted November 14, 2013 (edited) If it's for or about gaming, it is (sadly )against the rules to discuss But as a tip, in SciTE -> tools there is autoit window info. It will show you info about windows / controls, and will also show you what text autoit can see with the WinGetText function (in the visible text tab). The page you're looking at in the chrome window aren't simple controls like labels and inputs, but a lot of complicated stuff rendered from the HTML by the browser, and is hard to get at. This is why the _IE functions were made. _IEBodyReadHTML() will get you the html of the page, and you can use stringregexp() to find patterns in it. Consult the help file! The examples are awesome and will help you a lot Edited November 14, 2013 by corgano 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
NizonRox Posted November 14, 2013 Author Share Posted November 14, 2013 (edited) So, how do i make it look for thouse 4 words? Edited November 14, 2013 by NizonRox Link to comment Share on other sites More sharing options...
kaotkbliss Posted November 15, 2013 Share Posted November 15, 2013 sigh, nearly every line in that code is wrong, especially the one about rule #1 bullet point 4. Best go read it. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
NizonRox Posted November 15, 2013 Author Share Posted November 15, 2013 sigh, nearly every line in that code is wrong, especially the one about rule #1 bullet point 4. Best go read it. I dont understand, but if you can get me a link to this rule then id like to read it Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 15, 2013 Moderators Share Posted November 15, 2013 NizonRox,Welcome to the AutoIt forum. The Forum rules are here - there is also a link at bottom right of each page. 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. 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