How to create your own bots/macros with AutoIt

10/10/2012 18:26 itachi26#136
Hum, I don't understand.

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 
10/10/2012 21:55 SaM.ThE.MaN#137
Quote:
Originally Posted by itachi26 View Post
Hum, I don't understand.

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.
10/13/2012 00:47 I don't have a username#138
Quote:
Originally Posted by SaM.ThE.MaN View Post
Not really , That's not what i mean. What am saying is when your in a loop , your script will be frozen.
I've never used AutoIT, but is there an option for multithreading? Because that's what you would need then!
10/13/2012 09:09 itachi26#139
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...
10/13/2012 09:16 SaM.ThE.MaN#140
Quote:
Originally Posted by I don't have a username View Post
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 View Post
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.
10/15/2012 09:55 topsropvp#141
nice tut bud
01/12/2013 22:56 ace_heart#142
how can MouseClick in login screen and detect login id text box and give it sting
01/18/2013 03:27 A7MED7SSEINKAME#143
that's very nice good work
01/27/2013 21:31 m7mdxlife#144
Quote:
Originally Posted by ace_heart View Post
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.