Jump to content

Bug/error Or just misscoded


NizonRox
 Share

Recommended Posts

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 by NizonRox
Link to comment
Share on other sites

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 by corgano

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Link to comment
Share on other sites

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 game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

  • Moderators

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. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...