Jump to content

Script help.


Recommended Posts

So far this is what I got.

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

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

WinActive ( "Bleach: Last Horizon 2.0 Alpha [, ""] )

Controlclick ( Bleach: Last Horizon 2.0 Alpha", "", 65535 [, left [, 1 [, 521 [, 577 ]]]] )

ControlGetText ( Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000)

So from the looks of it, it will detect the window when it's up?

Anyway what I am looking for is help one if commands.

Such as if x then mouseclick type things.

Is it simple?

Link to comment
Share on other sites

Okay i read some of Comi's guide and now I'm here

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

If ControlGetText ( Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000) Then MouseClick ( "left" [, 521, 577[, 1 [, 1 ]]]

Everytime i try to run it I get this error about unterminated string

Link to comment
Share on other sites

Winwaitactive ( "Bleach: Last Horizon 2.0 Alpha", "")
If ControlGetText ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000) Then MouseClick ( "left" , 521, 577, 1 , 1)

square brackets means that parameter is optional

Link to comment
Share on other sites

Winwaitactive ( "Bleach: Last Horizon 2.0 Alpha", "")
If ControlGetText ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000) Then MouseClick ( "left" , 521, 577, 1 , 1)

square brackets means that parameter is optional

Okay cool thanks.

Anyway here I am now

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

If ControlGetText ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000) Then MouseClick ( "left" , 521, 577, 1 , 1)

If ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then Mouseclick ( "Left" , 451, 586, 1 , 1)

If ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement", 1000) Then MouseClick ( "left" , 493, 577, 1 , 1)

How do I make this keep doing it non stop?

Link to comment
Share on other sites

Okay cool thanks.

How do I make this keep doing it non stop?

While 1
      ;<== your func heare
Wend

look at the help file

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

you need a loop, search in the help file

Okay next question, there is a 33% randomizer on this. So should I compile all 3 of the If/then in 1 line or it's fine the way it is?

EDIT: Like this?

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

If ControlGetText ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000) Then MouseClick ( "left" , 521, 577, 1 , 1)

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then Mouseclick ( "Left" , 451, 586, 1 , 1)

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement", 1000) Then MouseClick ( "left" , 493, 577, 1 , 1)EndIf

Edited by Aasem
Link to comment
Share on other sites

Okay next question, there is a 33% randomizer on this. So should I compile all 3 of the If/then in 1 line or it's fine the way it is?

EDIT: Like this?

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

If ControlGetText ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000) Then MouseClick ( "left" , 521, 577, 1 , 1)

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then Mouseclick ( "Left" , 451, 586, 1 , 1)

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement", 1000) Then MouseClick ( "left" , 493, 577, 1 , 1)EndIf

How do you compile 3 If/Then's? Anyway, that should work fine, unless you typed the Title/Text wrong. And just press F5 ( Or Alt+F5 [ Beta ] ) To run your script for testing...
Link to comment
Share on other sites

How do you compile 3 If/Then's? Anyway, that should work fine, unless you typed the Title/Text wrong. And just press F5 ( Or Alt+F5 [ Beta ] ) To run your script for testing...

Okay I took your advice and this came up

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Marquest Coleman\Desktop\BOOOOOO\newtest.au3"

C:\Documents and Settings\Marquest Coleman\Desktop\BOOOOOO\newtest.au3 (3) : ==> "Else" statement with no matching "If" statement.:

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then Mouseclick ( "Left" , 451, 586, 1 , 1)

>Exit code: 1 Time: 0.229

I have a matching if with every else. Look

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

If ControlGetText ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000) Then MouseClick ( "left" , 521, 577, 1 , 1)

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then Mouseclick ( "Left" , 451, 586, 1 , 1)

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement", 1000) Then MouseClick ( "left" , 493, 577, 1 , 1) EndIf

Link to comment
Share on other sites

i think that its better to try it like this or simular

only sugestion

WinActivate("Bleach: Last Horizon 2.0 Alpha")
WinWaitActive("Bleach: Last Horizon 2.0 Alpha")
While 1
    If WinActive( "Bleach: Last Horizon 2.0 Alpha") Then
        $text = WinGetText("Bleach: Last Horizon 2.0 Alpha")
        Select
            Case StringInStr($var,"Shadow Copy's Action: dodges right")
                MouseClick ( "left" , 521, 577, 1 , 1)
            Case StringInStr($var,"Shadow Copy's Action: dodges left")
                Mouseclick ( "Left" , 451, 586, 1 , 1)
            Case StringInStr($var,"Shadow Copy's Action: no movement")
                MouseClick ( "left" , 493, 577, 1 , 1)
        EndSelect
    EndIf
    Sleep(100)
WEnd

edited:

Oi I just tried that, it didn't seem to work. It brought the game up to attention but it does nothing else.

tolded y simular, try it like this

(im not shure what r y trying todo with 'if ControlGetText' do y whant to see if there is text on controll, does control text change? or win text?)

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

Anyway instead of detecting the text then clicking it just clicks in one spot here is the code

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

While 1

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

MouseClick ( "left" , 521, 577, 1 , 40)

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then M

ouseclick ( "Left" , 451, 586, 1 , 40)

Else

ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement", 1000)

MouseClick ( "left" , 493, 577, 1 , 40)

Sleep ( 4000)

EndIf

WEnd

Link to comment
Share on other sites

i think that its better to try it like this or simular

only sugestion

WinActivate("Bleach: Last Horizon 2.0 Alpha")
WinWaitActive("Bleach: Last Horizon 2.0 Alpha")
While 1
    If WinActive( "Bleach: Last Horizon 2.0 Alpha") Then
        $text = WinGetText("Bleach: Last Horizon 2.0 Alpha")
        Select
            Case StringInStr($var,"Shadow Copy's Action: dodges right")
                MouseClick ( "left" , 521, 577, 1 , 1)
            Case StringInStr($var,"Shadow Copy's Action: dodges left")
                Mouseclick ( "Left" , 451, 586, 1 , 1)
            Case StringInStr($var,"Shadow Copy's Action: no movement")
                MouseClick ( "left" , 493, 577, 1 , 1)
        EndSelect
    EndIf
    Sleep(100)
WEnd

edited:

Oi I just tried that, it didn't seem to work. It brought the game up to attention but it does nothing else.

tolded y simular, try it like this

(im not shure what r y trying todo with 'if ControlGetText' do y whant to see if there is text on controll, does control text change? or win text?)

There is a text box and after you complete it command another one of the shadow copys are added with a 33% chance randomizer.

It doesn't matter which text tho

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...