|
You last visited: Today at 16:03
Advertisement
repeat till variable = 1
Discussion on repeat till variable = 1 within the AutoIt forum part of the Coders Den category.
06/07/2014, 20:27
|
#1
|
elite*gold: 0
Join Date: May 2014
Posts: 84
Received Thanks: 6
|
repeat till variable = 1
I need to repeat something untill a variable is 1.
pause (1000)
MouseClick("left",$x,$y,1,10)
$IS = _ImageSearch(@ScriptDir&"\Images\Icon.png",1,$x,$y ,100)
If $IS = 1 Then
so I want it to repeat every 10 sec : MouseClick("left",$x,$y,1,10)
untill it finds the image.
Yes I know this is really easy, but I couldn't find it in the help file.
|
|
|
06/07/2014, 20:56
|
#2
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
Code:
While 1
Sleep(1000)
If _ImageSearch(@ScriptDir & "\Images\Icon.png", 1, $x, $y, 100) Then ExitLoop
MouseClick("left", $x, $y, 1, 10)
WEnd
|
|
|
06/07/2014, 20:58
|
#3
|
elite*gold: 0
Join Date: May 2014
Posts: 84
Received Thanks: 6
|
Quote:
Originally Posted by alpines
Code:
While 1
Sleep(1000)
If _ImageSearch(@ScriptDir & "\Images\Icon.png", 1, $x, $y, 100) Then ExitLoop
MouseClick("left", $x, $y, 1, 10)
WEnd
|
thanks a lot!
Hope that 1 day I'll be as good as you in auto it
|
|
|
06/08/2014, 11:34
|
#4
|
elite*gold: 240
Join Date: Mar 2014
Posts: 374
Received Thanks: 585
|
Quote:
Originally Posted by goldenapple007
thanks a lot!
Hope that 1 day I'll be as good as you in auto it 
|
You can also use a Do Until Function
Code:
Do
$i = pixelsearch ()
Sleep(10)
Until $i = 1
MsgBox (64,$i,$i)
|
|
|
06/08/2014, 12:02
|
#5
|
elite*gold: 0
Join Date: May 2014
Posts: 84
Received Thanks: 6
|
Quote:
Originally Posted by x[Deadline
You can also use a Do Until Function
Code:
Do
$i = pixelsearch ()
Sleep(10)
Until $i = 1
MsgBox (64,$i,$i)
|
tried that already and asked on autoit forums if it would work ...
I got banned for 5 days cus I used the word "game"
|
|
|
06/08/2014, 16:32
|
#6
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,234
Received Thanks: 1,095
|
Quote:
Originally Posted by goldenapple007
tried that already and asked on autoit forums if it would work ...
I got banned for 5 days cus I used the word "game"
|
read the autoit forum rules... no game related threads or scripts allowed there....
|
|
|
06/08/2014, 18:57
|
#7
|
elite*gold: 0
Join Date: May 2014
Posts: 84
Received Thanks: 6
|
Quote:
Originally Posted by fear-x
read the autoit forum rules... no game related threads or scripts allowed there....
|
I know ...
first time I didn't read the rules ...
second time I posted a script that opens a game ( thought that was allowed ...)
|
|
|
06/08/2014, 19:07
|
#8
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
No one's going to blame you for writing a script which opens a game.
ImageSearch is used for botting (mostly) and most games have a ToC which don't allow botting. Therefore it isn't allowed.
|
|
|
06/08/2014, 21:48
|
#9
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,234
Received Thanks: 1,095
|
Quote:
Originally Posted by alpines
No one's going to blame you for writing a script which opens a game.
ImageSearch is used for botting (mostly) and most games have a ToC which don't allow botting. Therefore it isn't allowed.
|
they will *blame* everyone and anyone .. for writing script to open a game hahah.... trust me .. ive had so many retarded occasions with melba there omg ... they think they are grown up.... loooool.. ******* bunch of kids ...
was asking about autoit and multitasking... list all the ways there are to do it in autoit ... but no ... melba goes apeshit on my thread ;D haha...
and i asked for a way to protect autoit .exe properly from the decompiler thats out there.....
and he answered me something... then i said again but i only want to protect the exe because there is a stupid decomper out there and all leechers can decomp .exes easy...
he went ape **** on me again just for saying word "decompiler" hahaha ... kids lol never gonna visit that forum again ever... useless
|
|
|
06/08/2014, 22:29
|
#10
|
elite*gold: 0
Join Date: May 2014
Posts: 84
Received Thanks: 6
|
Quote:
Originally Posted by fear-x
they will *blame* everyone and anyone .. for writing script to open a game hahah.... trust me .. ive had so many retarded occasions with melba there omg ... they think they are grown up.... loooool.. fucking bunch of kids ...
was asking about autoit and multitasking... list all the ways there are to do it in autoit ... but no ... melba goes apeshit on my thread ;D haha...
and i asked for a way to protect autoit .exe properly from the decompiler thats out there.....
and he answered me something... then i said again but i only want to protect the exe because there is a stupid decomper out there and all leechers can decomp .exes easy...
he went ape shit on me again just for saying word "decompiler" hahaha ... kids lol never gonna visit that forum again ever... useless
|
I have the same experience with that forum
Quote:
Originally Posted by alpines
No one's going to blame you for writing a script which opens a game.
ImageSearch is used for botting (mostly) and most games have a ToC which don't allow botting. Therefore it isn't allowed.
|
I was learning how to script .... wanted to learn imagesearch.
So I created a bot to open minecraft.
I bet if I could ask Mojang if this is allowed they would say yes ...
There is no reason to not allow this
|
|
|
06/08/2014, 23:43
|
#11
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
Then get the proof that it is allowed. Without it isn't.
And you don't need ImageSearch for Minecraft.
|
|
|
06/14/2014, 19:55
|
#12
|
elite*gold: 0
Join Date: Mar 2012
Posts: 6
Received Thanks: 0
|
Glad you got your answer. There a lot of different ways to do what you wanted, I for one prefer the do loop, or a for loop. This way if you wanted you can keep track of it and output the current loop iteration if you wanted to in the future.
As for the autoit forums, I even had a guy on the forums try to trick me into saying i was trying to code for a game. i was looking for help on autoit syntax and structure. Simple coding questions. He tried multiple times to trick me into admiting i was making a game script.
Be very careful with those forums, even some of the 10,000+ posters are .... well i'm gonna be friendly and not use that word
|
|
|
 |
Similar Threads
|
[B]YT-Repeat[S]e*g
08/29/2012 - elite*gold Trading - 0 Replies
^
Per Treasure sag ich auch wie ihr ganz einfach wie ihr de facto unlimitiert dasselbe Video schaun könnt ;)
PM
|
Sorry repeat post
11/09/2011 - Rappelz Private Server - 0 Replies
Even with the new E7 client i'm still having trouble with all my skills being unavailable...pets have no skills....and players have no hair!!!!! Can somebody please help me
|
Cost of accessing a casted variable vs. assigning the casted variable? (C#)
01/05/2011 - CO2 Programming - 5 Replies
I know that in unmanaged C++, casting is at compile-time, so it's better to avoid the assignment and simply access it for all instances. However, in C#, I have no idea since I'm pretty new to it.
|
Überprüfen ob Variable Eine Variable ist
10/16/2010 - AutoIt - 26 Replies
Hey leute ich wollte fragen ob/wie man überprüfen kann
ob eine Variable eine Variable ist z.b. so
$k = 1
$i = $k
if $i = VARIABLE Then
msgbox(0,'$i ist eine variable!!','')
endif
PS:Wp releast man nochma TuT (z.b. für metin2??)
|
Quest Repeat.... Help!!..
05/22/2008 - RF Online - 9 Replies
can anyone help me about this hack??!! quest repeat??!!... tnx...
|
All times are GMT +1. The time now is 16:03.
|
|