
Reptos
Active Members-
Posts
24 -
Joined
-
Last visited
Everything posted by Reptos
-
Returning To If Not $Error - From @error?
Reptos replied to Reptos's topic in AutoIt General Help and Support
Yes making a simple program for it -
Hello again! I'm trying to figure out how i return to the If not @error Part of this script if it doesn't find the pixel. Basically the script searches for a pixel and if it finds it it clicks it then its the loop. If it doesn't it refreshes the page and then ( BLAH ) ? ??? I need it to refresh the page and then re-try the first part of the script again. Here is my attempt Script : While 1 WinActivate("ourWorld") Sleep(4000) $cords = PixelSearch(845, 222,1000, 292,0xF0D826) ; mp If Not (@error) Then MouseClick("Left",$cords[0],$cords[1],1,1) ExitLoop EndIf If (@error) Then MouseClick("Left",77, 43) ; refresh button Sleep(950) MouseClick("Left",692, 238) ; return to menu Loop If Not (@error)
-
Jos you're those type of people that think they are Mr know it all. I came here to get help. I'm new at all of this literally. You stated " are are not showing any initiative " please choose your words wisely because that did not make any since. Maybe you need to "Start Reading" and learn how to type correctly. Now my intention was not to come here and argue it was simply to come and learn things that i did not know. Some people have certain learning deference's, you may learn quicker than i do that is why i keep asking for help maybe on the same topic. I'm done arguing with you for now have a great day!
-
The error im getting now is if $result[0]="0" then return 0 if $result^ ERROR ; step 1 add the contents of the ImageSearch UDF and execute anything that's not contained inside a function #include <ImageSearch.au3> ; step 2 Set the hotkey HotKeySet("{ENTER}", "start") ; Step 3 Start the While loop ; Step 6 There is no step 6 because you're stuck inside the While loop $x = 0 $y = 0 While 1 Sleep(1) WEnd ; Function called by the HotKey Func start() ; Step 1 Start the While loop While 1 ; Step 2 Wait for the windows titled "ourWorld" to be the active window - You may never leave this step if the window never becomes active WinActivate("ourWorld") ; Step 3 Search for the image "gift.bmp" and assign the return to $result $result = _ImageSearch("gift.BMP", 1, $x, $y, 100) ; Step 4 Check to see if $result is -1 If $result = 1 Then ; Step 5 If $result = -1 then click the left mouse button at $x and $y MouseClick("Left", $x, $y, 1, 10) EndIf ; step 6 Go back to step 1 forever. WEnd EndFunc ;==>start
-
Thank you for actually taking to time to explain! I think i got it now
-
Obviously i don't understand so why ask me... That is kinda why i'm here FOR HELP! Come'on Jos use your brain.
-
Jos, Why don't you help me understand instead of always trying to be a smart ass?
-
This is the whole Script : #include <ImageSearch.au3> HotKeySet("{ENTER}","start") While 1 Sleep(1) WEnd $x = 0 $y = 0 Func start() While 1 WinActivate("ourWorld") $result = _ImageSearch("gift.BMP",1,$x,$y,100) If $result = 1 Then MouseClick("Left",$x,$y,1,10) EndIf WEnd EndFunc
-
Sorry "C:\Users\Owner\Desktop\Autoit Stuff\Ourworld\BMP\nestin.au3" (17) : ==> Variable used without being declared.: $result = _ImageSearch("gift.bmp",1,$x,$y,100) $result = _ImageSearch("gift.bmp",1,^ ERROR >Exit code: 1 Time: 2.769
-
$result = _ImageSearch("gift.bmp",1,$x,$y,100) $result = _ImageSearch("gift.bmp",1,^ ERROR
-
Okay so i did $x = 0 $y = 0 Still having same error
-
Why is it giving me and error when i do the ImageSearch, The bmp is in the same location as the Script so why is it doing this? Error Below $result = _ImageSearch('gift.bmp',1,$x,$y,100) $result = _ImageSearch('gift.bmp',1,^ ERRORScript Below #include <ImageSearch.au3> HotKeySet("{ENTER}","start") While 1 Sleep(1) WEnd Func start() While 1 $result = _ImageSearch('gift.bmp',1,$x,$y,100) If $result = 1 Then MouseClick("Left",$x,$y,1,10) EndIf WEnd EndFunc
-
Yup perfect! Now what would i do for it to repeat back to the top after the whole script is done
-
How would i do another Pixel Search after this instead of it re doing the first one? Like once it has found this one i want it to do another one? While 1 $cords = PixelSearch(564, 188,710, 350,0x380030) If Not (@error) Then MouseClick("Left",$cords[0],$cords[1],1,1) ExitLoop EndIf WEnd
-
Where do i put another pixel search after that?
-
Yup that works! Thanks
-
How should i go about repeating this section if@error? I want it to try again if it can not find the PixelSearch then move on to the next Search. While 1 $cords = PixelSearch(564, 188,710, 350,0x380030) If Not (@error) Then MouseClick("Left",$cords[0],$cords[1],1,1) EndIf If (@error) Then ?????? EndIf
-
No one is going to come back here... So i just opened a new one
-
Hello! I'm in need of help. I'm trying to figure out how to make someone choose the amount of times a script loops instead of just being on infinite loop with While 1? After it looped the chosen amount of times i want it to run another function and then loop back to the 1st function. Func $stay MouseClick("Left",304,203) EndFunc If $Input1 = +1> Then $Stay Func $Input1 while 1 = +1 loop = $Stay Also How would i go about them putting their username into a textbox and then it typing it into the position where i have the send command?
-
Ahh, I get what you're saying. I did do research on the topic but i couldn't find out how to do it how i wanted it so i thought i'd come here.
-
Thanks! It worked but could you show me how to do something via skype? My skype is ChipinOw
-
This is my first thread? I just signed up lol.
-
Hello! I'm kinda new to autoit so i'd like to know how to do something. I have a bot that i want to have a input box to choose the amount of numbers the script loops. After the total amount of loop's have been done i want it to do another script once and then loop back to the first script? How is this done?