Sign in to follow this  
Followers 0
dainiusb

[Solved]Am I doing this right?

17 posts in this topic

#1 ·  Posted (edited)

Func Beginning ()
    SoundPlay( "beginning.mp3", 1)
While $second == 0x302722
    Do
    Sleep(2000)
    Until $second <> 0x302722
WEnd
Call("Waiting")
EndFunc

Is this correct and will it call 'Waiting' function?

SOLVED

Edited by dainiusb

Share this post


Link to post
Share on other sites



yes, under certain circumstances.


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

Okay but it's strange that script just can't pass through it. I'm going to try with diff colors.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

So just Waiting() instead of Call("Waiting")? ahaha ;D

But doesn't work anyways :/ Something is wrong. It used to work fine but when I turned everything into functions so the code is more flexible it stopped working :/

Edited by dainiusb

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

colors ???

 

you should better post the entire code. i see no colors

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

yes. that i meant with "certain circumstances" ;)

the rest is guessing at this point.

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

$second = PixelGetColor( 465, 367 )

isn't this obvious :P

Edited by dainiusb

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

so you should simply add that to your function. just a suggestion ..... AutoIt does not guess.

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

I did but same problem.

Share this post


Link to post
Share on other sites

did it wrong


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Something like that. Don't blame me for mess. That's how I do it lol.

HotKeySet( "{F10}", "Quit" )

$second = PixelGetColor( 465, 367 )
$third = PixelGetColor( 465, 387 )
$fourth = PixelGetColor( 465, 407 )
$fifth = PixelGetColor( 465, 427 )

$one = PixelGetColor( 633, 579 )
$two = PixelGetColor( 633, 579 )

Call("Beginning")

Func Beginning ()
    SoundPlay( "beginning.mp3", 1)
While $second == 0x302722
    Do
    Sleep(2000)
    Until $second <> 0x302722
WEnd
Call("Waiting")
EndFunc

Func Waiting ()
    SoundPlay( "waiting.mp3", 1)
While $second <> 0x302722 And $third == 0x302722
    Do
    Sleep(4000)
    MouseClick( "left", 304, 828, 1)
    Send("Please wait.{Enter}")
Until $third <> 0x302722 Or $second == 0x302722
WEnd
Call("Putting")
EndFunc

Func Putting ()
While 1
    Sleep(3000)
    if $third = 0x302722 Then
        ContinueLoop
    ElseIf $fifth <> 0x302722 Then
        Call("Put1")
    ElseIf $third <> 0x302722 Then
        Call("Put")
        EndIf
    Wend
    EndFunc

Func Quit ()
    Exit
EndFunc

Func Put ()
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(347, 437)
    MouseUp( "left" )
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(787, 469)
    MouseUp( "left" )
    MouseClick( "left", 561, 683, 1)
EndFunc

Func Put1 ()
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(347, 437)
    MouseUp( "left" )
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(787, 469)
    MouseUp( "left" )
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(347, 437)
    MouseUp( "left" )
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(347, 469)
    MouseUp( "left" )
    MouseClick( "left", 561, 683, 1)
EndFunc

Func Put2 ()
    Sleep(3000)
    if $third = 0x302722 Then
        MouseClick( "left", 929, 731, 1)
    ElseIf $fifth <> 0x302722 Then
        Call("Put1")
    ElseIf $third <> 0x302722 Then
        Call("Put")
        EndIf
    EndFunc

    Func During ()
        While $one <> 0x098BC3 Or $two <> 0xE56E56
            Do
        MouseClick( "left", 929, 731, 1)
        Call("Putting1")
    MouseClick( "left", 929, 731, 1)
    Until $one == 0x098BC3 Or $two == 0xE56E56
    WEnd
    Call("After")
    EndFunc

    Func After ()
        Sleep(3000)
        MouseClick( "left", 192, 460, 1)
        Call("Beginning")
    EndFunc

    Func Put3 ()
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(347, 437)
    MouseUp( "left" )
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(787, 469)
    MouseUp( "left" )
EndFunc

Func Put4 ()
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(347, 437)
    MouseUp( "left" )
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(787, 469)
    MouseUp( "left" )
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(347, 437)
    MouseUp( "left" )
    MouseMove(465, 367)
    MouseDown( "left" )
    MouseMove(347, 469)
    MouseUp( "left" )
EndFunc

Func Putting1 ()
While 1
    Sleep(3000)
    if $third = 0x302722 Then
        ContinueLoop
    ElseIf $fifth <> 0x302722 Then
        Call("Put4")
    ElseIf $third <> 0x302722 Then
        Call("Put3")
        EndIf
    Wend
    EndFunc
Edited by dainiusb

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

no you didn't put it in the function like i told you

 

put it after behind the sleep  (copy, not move !)

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

no you didn't put it in the function like i told you

 

put it after behind the sleep  (copy, not move !)

I didn't in this code but I did in my pc. By the way tried and works. Thanks. Haven't used AutoIt for a while ;)

Edited by dainiusb

Share this post


Link to post
Share on other sites

see ya :)


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0