Jump to content

Why is the AutoIT repeating the TT twice at the same time


 Share

Recommended Posts

HotKeySet("{PAUSE}","Escape")

Dim $GetHealth, $Color, $kills

$GameWinTitle = "Nostale"

WinActivate($GameWinTitle, "")

WinWaitActive($GameWinTitle, "", 5)

$Color = 0x00AA00; Health Color

$kills = 0

While 1

$SearchResult = PixelSearch(313, 130, 313, 131, $Color, 20)

If @error Then

Send("{T}")

Sleep("15000")

Send("{T}")

Sleep("100")

Else

Sleep("100")

Send("{SPACE}")

Sleep(100)

Send("{2}")

Sleep(100)

Send("{3}")

Sleep(1000)

Send("{4}")

Sleep(1000)

Send("{3}")

Sleep(1000)

Send("{5}")

Sleep(1000)

Send("{3}")

Sleep(100)

$kills = $kills + 1

EndIf

WEnd

Func Escape()

Exit 0

EndFunc

-----------------------------------------------------------------------------------------------------------

can anyone fix it by making it not repeating the "T" twice pls?

1. The "T" somtimes is not repeated

2.Only certain times it repeats the "T"

Link to comment
Share on other sites

how can i fix the problem?

I already open the window.

Then The Autoit automaticly goes to the window and it works for awhile but the Twice repeated "T" at the same time sometimes interupts the activity. I only need "T" for one at a time.

Edited by dlshoong
Link to comment
Share on other sites

Send("{T}")

Sleep("15000")

Send("{T}")

Sleep("100")

----------------------------------

for the first loop it only types ;

1. "T" for once

2.then sleep for 15000

3.then type "T" again

4.sleeps again

2nd loops onward,this might happen;

1. "T" for twice (which can also be represented by "TT")

2.then sleep for 15000

i cant really thing what infected the repeat in 2nd loops onwards.

anyone can help?

Link to comment
Share on other sites

yes.i had tried

I found out that theres no difference between existence of quotes

Send("T")

Sleep("15000")

Send("T")

Sleep("100")

You missed what he did. He removed the braces {} .... when sending text, the braces are not required. Suggestion....instead of "Send" which sends to the active window....use controlsend which is sent directly to the window in question, no matter the state (though unreliable if minimized.)

; ControlSend ( "title", "text", controlID, "string" [, flag]  )  




ControlSend($GameWinTitle, "", "", "T",1)
Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

how can i get The ControlID?

My program format is Nostale.dat and this program can only be start through Internet Explorer

i was unable to get the control is,its empty in the search

ControlID is not exactly required....and if you're using IE, ugh...COM time. Good luck.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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...