Jump to content

Recommended Posts

Posted

So, im having alittle fun with autoit making it more and more complicated then i fell over a error that i cant seem to fix all by my self

 

MouseClick ( "LEFT", 984, 206, 1, 1)
   Sleep(500)
   Local $shiny = WinGetText("[CLASS:Chrome]", "Shiny")
   Local $dark = WinGetText("[CLASS:Chrome]", "Dark")
   Local $mystic  = WinGetText("[CLASS:Chrome]", "Mystic")
   Local $ancient  = WinGetText("[CLASS:Chrome]", "Ancient")
   if $shiny > Shiny Then
      Exit 0
   EndIf
   if $dark > Dark Then
      Exit 0
   EndIf
   If $mystic > Mystic Then
      Exit 0
   EndIf
   If $ancient > Ancient Then
      Exit 0
   EndIf
Posted

I Found out my self but ive run into another error.

When it doesent find Shiny or Dark or Mystic or Ancient then it stops and tells me

If $Shiny > Shiny then

If $Shiny > ^ERROR

Error: Error Parsing Function Call.

Posted

NizonRox,

If you are trying to compare text with your IF functions, then the text needs to be within quotes:

MouseClick ( "LEFT", 984, 206, 1, 1)
   Sleep(500)
   Local $shiny = WinGetText("[CLASS:Chrome]", "Shiny")
   Local $dark = WinGetText("[CLASS:Chrome]", "Dark")
   Local $mystic  = WinGetText("[CLASS:Chrome]", "Mystic")
   Local $ancient  = WinGetText("[CLASS:Chrome]", "Ancient")
   if $shiny > "Shiny" Then
      Exit 0
   EndIf
   if $dark > "Dark" Then
      Exit 0
   EndIf
   If $mystic > "Mystic" Then
      Exit 0
   EndIf
   If $ancient > "Ancient" Then
      Exit 0
   EndIf

That will get rid of the error, though since I don't know what you are trying to do with it, I don't know if it will function as you want it to.

  • Moderators
Posted

NizonRox,

Go and read those Forum rules (there is also a link at bottom right of each page) - twice is quite enough. :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:

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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