Sign in to follow this  
Followers 0
Aasem

Look at my script

40 posts in this topic

Okay so here it is.

WinActivate ( "Bleach: Last Horizon 2.0 Alpha", "")

WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "")

Send ( "{NUMPAD5}" )

WinWaitActive ( "Shadow Sparring", "")

Send ( "{Enter}" )

If WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then

Send ( "{NUMPAD9}" )

ElseIf

WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then

Send ( "{NUMPAD7}" )

Else

WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.")

Send ( "{NUMPAD8}" )

It work's like that. I tried to add a look with While 1 and WEnd but it doesn't work when I do that. Do I need to add them to a specific place or do I need to use a different loop?

Share this post


Link to post
Share on other sites



what's a look ? XD


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Nice try...

Global $Paused, $Active

HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{F9}", "ShowMe")

;;;; Body of program would go here ;;;;
While 1
    While $Active
        WinActivate("Bleach: Last Horizon 2.0 Alpha", "")
        WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "")
        Send("{NUMPAD5}")
        WinWaitActive("Shadow Sparring", "")
        Send("{Enter}")

        If WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then
            Send("{NUMPAD9}")
        ElseIf WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then
            Send("{NUMPAD7}")
        Else
            WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.")
            Send("{NUMPAD8}")
        EndIf
        Sleep(10)
    WEnd
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc   ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Func ShowMe()
    $Active = Not $Active
EndFunc   ;==>ShowMe

*** NOT TESTED

EDITED****

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

I wanted you to look at it and help me with it. Whenever I add a While 1 WEnd it stops working.

Share this post


Link to post
Share on other sites

Errr Thanks Val but it didn't work. Nor did I understand what you did.

Share this post


Link to post
Share on other sites

Errr Thanks Val but it didn't work. Nor did I understand what you did.

I edited it, try it again

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Errr still doesn't work. Mine script works, but I just need to add a loop to it.

Share this post


Link to post
Share on other sites

Well, I can't test this so, here is my last effort, just what you asked for

While 1
    WinActivate("Bleach: Last Horizon 2.0 Alpha", "")
    WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "")
    Send("{NUMPAD5}")
    WinWaitActive("Shadow Sparring", "")
    Send("{Enter}")

    If WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then
        Send("{NUMPAD9}")
    ElseIf WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then
        Send("{NUMPAD7}")
    Else
        WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.")
        Send("{NUMPAD8}")
    EndIf
    Sleep(10)
WEnd

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Well, I can't test this so, here is my last effort, just what you asked for

~~code~~

8)

If I got it right, this would be better : :D

WinActivate("Bleach: Last Horizon 2.0 Alpha", "")
    WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "")
    Send("{NUMPAD5}")
    WinWaitActive("Shadow Sparring", "")
    Send("{Enter}")
    
While 1
    If WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then
        Send("{NUMPAD9}")
    ElseIf WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then
        Send("{NUMPAD7}")
    Else
        WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.")
        Send("{NUMPAD8}")
    EndIf
    Sleep(10)
WEnd

Share this post


Link to post
Share on other sites

If I got it right, this would be better : :D

WinActivate("Bleach: Last Horizon 2.0 Alpha", "")
    WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "")
    Send("{NUMPAD5}")
    WinWaitActive("Shadow Sparring", "")
    Send("{Enter}")
    
While 1
    If WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then
        Send("{NUMPAD9}")
    ElseIf WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then
        Send("{NUMPAD7}")
    Else
        WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.")
        Send("{NUMPAD8}")
    EndIf
    Sleep(10)
WEnd
That's what I did originally with hotKeys already set, he said it didn't work... dunno... :D

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

If I got it right, this would be better : :D

WinActivate("Bleach: Last Horizon 2.0 Alpha", "")
    WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "")
    Send("{NUMPAD5}")
    WinWaitActive("Shadow Sparring", "")
    Send("{Enter}")
    
While 1
    If WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then
        Send("{NUMPAD9}")
    ElseIf WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then
        Send("{NUMPAD7}")
    Else
        WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.")
        Send("{NUMPAD8}")
    EndIf
    Sleep(10)
WEnd
For some reason yours doesn't send the other ones depending on which Shadow copy text comes up. It automiatcally assumes all of them are dodges right and then presses numpad 9.

Share this post


Link to post
Share on other sites

That's what I did originally with hotKeys already set, he said it didn't work... dunno... :D

8)

He probably never pressed the hotkey xD

Share this post


Link to post
Share on other sites

He probably never pressed the hotkey xD

I honestly don't understand where pressing the hotkey would come in. It's for the ReadMe, Termination and pause. That doesn't stop the script from not working... does it?

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

I honestly don't understand where pressing the hotkey would come in. It's for the ReadMe, Termination and pause. That doesn't stop the script from not working... does it?

You need to press F9 if you want something to happen else it will just loop and do nothing forever xD Edited by Zisly

Share this post


Link to post
Share on other sites

It's for the ReadMe

No, It's how the program can be started AND stopped....

it says "ShowMe"

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

It's for the ReadMe

No, It's how the program can be started AND stopped....

it says "ShowMe"

8)

Okay I tried it. Maybe there is something wrong with my else code. Whenever a While/WEnd is added to it, it only does the first IF no matter of the text detection.

Share this post


Link to post
Share on other sites

Okay I tried it. Maybe there is something wrong with my else code. Whenever a While/WEnd is added to it, it only does the first IF no matter of the text detection.

Add the while loop and post the code and I'll tell you what you did wrong before Valuater xD

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

WinActivate ( "Bleach: Last Horizon 2.0 Alpha", "")

WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "")

Send ( "{NUMPAD5}" )

WinWaitActive ( "Shadow Sparring", "")

Send ( "{Enter}" )

While 1

If WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right") Then

Send ( "{NUMPAD9}" )

ElseIf

WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left.") Then

Send ( "{NUMPAD7}" )

Else

WinWaitActive ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement.")

Send ( "{NUMPAD8}" )

EndIf

WEnd

EDIT: Only dodge right works for some reason the other ones don't. and sorry for taking long.

That's it,

Edited by Aasem

Share this post


Link to post
Share on other sites

Ummm Bump?

Share this post


Link to post
Share on other sites

Maybe:

WinActivate("Bleach: Last Horizon 2.0 Alpha", "")
WinWaitActive("Bleach: Last Horizon 2.0 Alpha", "")
Send("{NUMPAD5}")
WinWaitActive("Shadow Sparring", "")
Send("{Enter}")

SendKeepActive("Bleach: Last")
While 1
    If WinExists("Bleach: Last", "dodges right") Then Send("{NUMPAD9}")
    If WinExists("Bleach: Last", "dodges left") Then Send("{NUMPAD7}")
    If WinExists("Bleach: Last", "no movement") Then Send("{NUMPAD8}")
    Sleep(9)
WEnd


[size="1"][font="Arial"].[u].[/u][/font][/size]

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