Chonilo

double rate

6 posts in this topic

Hi, i wrote this script (yeah, I know I make so much mistakes, cause I'm a beginner):
 

HotKeySet("{F1}" , "start")
HotKeySet("{END}" , "koniec")
WinActivate("")

$tytul = ""
$lapka = WinGetHandle($tytul)

While 1
Sleep(100)
WEnd
Func koniec()
   Exit
EndFunc
Func start()
        MouseClick("",902, 312)
        Sleep(100)
        Send("^a")
        Sleep(100)
        Send("{BACKSPACE}")
        Sleep(100)
        Send(500000)
        Sleep(100)
        Send("{ENTER}")
        Sleep(6000)
    While 1
$pixel = PixelSearch( 581, 177, 591, 191, 0xFF0000)

If @error then
    ExitLoop
EndIf
    If Not @error Then
    MouseClick("",902, 312)
    Sleep(100)
    Send("^a")
    Sleep(100)
    Send("{BACKSPACE}")
    Sleep(100)
    Send(1000000)
    Sleep(100)
    Send("{ENTER}")
    Sleep(5000)
    EndIf
    If @error then
    ExitLoop
EndIf
    If Not @error Then
    MouseClick("",902, 312)
    Sleep(100)
    Send("^a")
    Sleep(100)
    Send("{BACKSPACE}")
    Sleep(100)
    Send(2000000)
    Sleep(100)
    Send("{ENTER}")
    Sleep(5000)
    EndIf
    If @error then
    ExitLoop
EndIf
    If Not @error Then
    MouseClick("",902, 312)
    Sleep(100)
    Send("^a")
    Sleep(100)
    Send("{BACKSPACE}")
    Sleep(100)
    Send("4000000")
    Sleep(100)
    Send("{ENTER}")
    Sleep(5000)
    EndIf
    If @error then
    ExitLoop
EndIf
    If Not @error Then
    MouseClick("",902, 312)
    Sleep(100)
    Send("^a")
    Sleep(100)
    Send("{BACKSPACE}")
    Sleep(100)
    Send(8000000)
    Sleep(100)
    Send("{ENTER}")
    Sleep(5000)
    EndIf
    If @error then
    ExitLoop
EndIf
    If Not @error Then
    MouseClick("",902, 312)
    Sleep(100)
    Send("^a")
    Sleep(100)
    Send("{BACKSPACE}")
    Sleep(100)
    Send(16000000)
    Sleep(100)
    Send("{ENTER}")
    Sleep(5000)
    EndIf
    If @error then
    ExitLoop
EndIf
    If Not @error Then
    MouseClick("",902, 312)
    Sleep(100)
    Send("^a")
    Sleep(100)
    Send("{BACKSPACE}")
    Sleep(100)
    Send(32000000)
    Sleep(100)
    Send("{ENTER}")
    Sleep(5000)
    EndIf
    If @error then
    ExitLoop
EndIf
    If Not @error Then
    MouseClick("",902, 312)
    Sleep(100)
    Send("^a")
    Sleep(100)
    Send("{BACKSPACE}")
    Sleep(100)
    Send(64000000)
    Sleep(100)
    Send("{ENTER}")
    Sleep(5000)
    EndIf
    If @error then
    ExitLoop
EndIf
    If Not @error Then
    MouseClick("",902, 312)
    Sleep(100)
    Send("^a")
    Sleep(100)
    Send("{BACKSPACE}")
    Sleep(100)
    Send(128000000)
    Sleep(100)
    Send("{ENTER}")
    Sleep(5000)
    EndIf
    If @error then
    ExitLoop
EndIf
    If Not @error Then
    MouseClick("",902, 312)
    Sleep(100)
    Send("^a")
    Sleep(100)
    Send("{BACKSPACE}")
    Sleep(100)
    Send(256000000)
    Sleep(100)
    Send("{ENTER}")
    Sleep(5000)
EndIf
WEnd
EndFunc

I work with him from midnight :/ 
I want to, this program'll functioning with this parameters(I think about Func start):
Paste a value five hundred thousend(I can;t enter a normal numbers) and if error doesn't exist this program multiplies value two times, to the maximum(256 million's)500(i can't enter  and if error exist back to beginning of the function and repeat. In the ned of the script if error doesn't exist(after value two hundred fifty six million's ) it back to the beginning and repeat. Program'll still working before i press END

Can You help me? How can I do that? 
I thankful for the answers ;)

Share this post


Link to post
Share on other sites



Not sure what the question really is here, but it's for me pretty unclear what you are trying to automate with this script.
So what about explaining what it is you are trying to do first?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

initially value=500 000

1. Script in Func start click at

MouseClick("",902, 312)

selecting all, send backspace to erase everything is checked and send a value 500 000 

2. Script searching a pixel,

$pixel = PixelSearch( 581, 177, 591, 191, 0xFF0000)

and if script found this pixel then doubles a value and do the same as in point 1. but with doubled value <== repeat until value >256 000 000, if this think happened, script do the same as in the case not finding pixel(explained below) 

but if script not found this pixel then scripts returns to the top of Func start and work with initially value
 

My skills in English language is not big, sorry for that :/


 

 

 

 

Share this post


Link to post
Share on other sites

Sounds very much you are trying to automate some sort of game. 
Please read our forum rules to ensure you stick with the set rules.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Oh, You have right Jos. I want to automatic some games I writing this for earning a experienced in AutoIT, but it still breaking the rules. Then I have one option now, learning more about AutoIT to do it by myself. 
 

In that case I'm sorry for thetrouble to answering me, but thanks, somegow it's motivate me to learn more aout that script laguage

Share this post


Link to post
Share on other sites

@Chonilo as you have come to realize, we do not support game automation on this forum. Please read through our forum rules before you post again. Hope to see you again with a legitimate question.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.