Jump to content

Fickle

Members
  • Posts

    3
  • Joined

  • Last visited

Fickle's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Whenever I use imagesearch, it functions perfectly and detects anything like it should, however, when i use imagesearcharea(), it only works for the desktop, meaning my wallpaper and whatever is on it. So detecting open windows does not work for me, is this normal?
  2. Just for clarification, can multiple Else statements be done? For instance (i took this from the help file): If $var > 0 Then MsgBox(4096,"", "Value is positive.") ElseIf $var < 0 Then MsgBox(4096,"", "Value is negative.") Else If StringIsXDigit ($var) Then MsgBox(4096,"", "Value might be hexadecimal!") Else MsgBox(4096,"", "Value is either a string or is zero.");<----instead of ending it here, could it continue indefinitely ;by continuously adding if else ? EndIf EndIf The help file says that Switch case would be the best if i wanted to compare 1 expression against multiple values, however, I am confused as to how a switch case works which is why im more inclined to use a if then else statement. If multiple else statements cannot be done, could someone kindly explain how switch case works? Or point me to an easier to understand help file as I am new.
  3. I just started testing this (autoit) out today, but I want to make a script that will run a loop 20 times, sleep for about 20 seconds, then run the loop again. I have no experience in scripting, coding, or anything of the sort and so I am rather lost. So far, what i have is this: $i = 0 While $i < 21 Send ("{Enter}") Sleep (600) Send ("{Enter}") Sleep (1000) Send ("{Enter}") Sleep (600) Send ("{Enter}") Sleep (600) Send ("{Enter}") Sleep (1000) Send ("2000000") $i = $i + 1 WEnd Sleep (20000) $i = 0 While $i < 21 Send ("{Enter}") Sleep (600) Send ("{Enter}") Sleep (1000) Send ("{Enter}") Sleep (600) Send ("{Enter}") Sleep (600) Send ("{Enter}") Sleep (1000) Send ("2000000") $i = $i + 1 WEnd I am currently trying to make this an infinite loop, however I am clueless as to what I should do from here. Any help would be much appreciated. Furthermore, if there is a more efficient method than this, please let me know.
×
×
  • Create New...