Jump to content
Sign in to follow this  
NizonRox

(HELP IM NEW) error parsing function call

Recommended Posts

NizonRox

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

Share this post


Link to post
Share on other sites
NizonRox

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.

Share this post


Link to post
Share on other sites
LordBoling

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.

Share this post


Link to post
Share on other sites
NizonRox

I got it working, Thx :)

Share this post


Link to post
Share on other sites
Melba23

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:

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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×