So you say that using a timer, is the same as using a sleep in a loop, because it will block the loop?
I made a test, try each code and you'll see that it isn't the same :
PHP Code:
; loop with a Sleep in it
Global $i
While 1
$i+=1
ToolTip("Number : " & $i,5,0)
Sleep(5000)
WEnd
; loop using a timer in it
Global $i, $begin
$begin = TimerInit()
While 1
$i+=1
ToolTip("Number : " & $i,5,0)
If TimerDiff($begin) >= 5000 Then
; your function to lunch after waiting 28 secs
$begin = TimerInit()
EndIf
Sleep(10) ; to avoid a UC overloaded
WEnd
So you say that using a timer, is the same as using a sleep in a loop, because it will block the loop?
I made a test, try each code and you'll see that it isn't the same :
PHP Code:
; loop with a Sleep in it
Global $i
While 1
$i+=1
ToolTip("Number : " & $i,5,0)
Sleep(5000)
WEnd
; loop using a timer in it
Global $i, $begin
$begin = TimerInit()
While 1
$i+=1
ToolTip("Number : " & $i,5,0)
If TimerDiff($begin) >= 5000 Then
; your function to lunch after waiting 28 secs
$begin = TimerInit()
EndIf
Sleep(10) ; to avoid a UC overloaded
WEnd
Not really , That's not what i mean. What am saying is when your in a loop , your script will be frozen.
Ah I see... Well, is multi-threading meaning manage multiple-loops in the same time? If then, I heard that AutoIt wasn't able to do that. You can imitate a little bit with AdlibRegister, but never went so far...
I've never used AutoIT, but is there an option for multithreading? Because that's what you would need then!
mhmmmmm,
To make this as simple as possible , your script wouldnt exactly stop , it would just be frozen.
For instance : You have a GUI , and your script has a loop in it , if you run your script and the loop starts , the buttons in your GUI wouldnt respond , they would just stay there frozen until your loop stops .Just incase you're wondering, There are workarounds for this.
Quote:
Originally Posted by itachi26
Ah I see... Well, is multi-threading meaning manage multiple-loops in the same time? If then, I heard that AutoIt wasn't able to do that. You can imitate a little bit with AdlibRegister, but never went so far...
That is correct , Multithreading can be done with Adlib.
how can MouseClick in login screen and detect login id text box and give it sting
I don't think thats possible, but i made a work around for it;
Code:
Local $clientF = FileSelectFolder("Conquer Folder.", "X:\Conquer Online 2.0")
Local $client = FileOpenDialog("", $clientF &"\", "Executeables (*.exe)", 1,"conquer.exe")
Local $user = InputBox("Username","Enter Your Username:","")
$user1 = " blacknull " & $user
$space = " "
Local $pass = InputBox("Password","Enter Your Password:", "","*")
ShellExecute($client, $user1 & $space & $pass)
This code will simply run the Conquer.exe with blacknull and username/password parameters which will put the username and pass right where they belong the moment the client starts up.
[GUIDE] How to create Scripts/bots with AutoIT 09/22/2010 - Tutorials - 6 Replies for all who want to learn something or create bots for browsergames, mmorpgs and other games
download Autoit here:
http://www.autoitscript.com/cgi-bin/getfile.pl?au toit3/autoit-v3-setup.exe
Now run the Scite Script Editor
this is where you type in your code, let check your code if errors are in it and compile it to executable exe file.
the first thing you need are the coordinates of your mouse to find locations on the screen, like skill buttons, status bars, or just positions which...
(GUIDE)How to create own scripts/bots with AutoIt 11/19/2008 - Rappelz - 4 Replies for all who want to learn something or create bots for browsergames, mmorpgs and other games
download Autoit here:
http://www.autoitscript.com/cgi-bin/getfile.pl?au toit3/autoit-v3-setup.exe
Now run the Scite Script Editor
this is where you type in your code, let check your code if errors are in it and compile it to executable exe file.
the first thing you need are the coordinates of your mouse to find locations on the screen, like skill buttons, status bars, or just positions which...
learning how to create/write Bots/Macros 01/28/2006 - Conquer Online 2 - 8 Replies Well I know that this is kind of off topic and a lot of people have been flamed by asking questions. I've tried a search and couldnt really find anything in english that i could actually read.
Does anyone know any good sites or anything that a beginner could start learning how to create/write programs for bots and stuff like that? I'm learning how to write programs in VisualBasic at school but dont really know much. If anyone could supply any sites and stuff it would be awesome. thanks in...