dlshoong Posted October 11, 2006 Share Posted October 11, 2006 HotKeySet("{PAUSE}","Escape")Dim $GetHealth, $Color, $kills$GameWinTitle = "Nostale"WinActivate($GameWinTitle, "")WinWaitActive($GameWinTitle, "", 5)$Color = 0x00AA00; Health Color$kills = 0While 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 WEndFunc Escape()Exit 0EndFunc-----------------------------------------------------------------------------------------------------------can anyone fix it by making it not repeating the "T" twice pls?1. The "T" somtimes is not repeated2.Only certain times it repeats the "T" Link to comment Share on other sites More sharing options...
jpm Posted October 11, 2006 Share Posted October 11, 2006 Certainly the window to which the Send is expexted is not active after the 15 seconds Link to comment Share on other sites More sharing options...
dlshoong Posted October 11, 2006 Author Share Posted October 11, 2006 (edited) 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 October 11, 2006 by dlshoong Link to comment Share on other sites More sharing options...
nobby Posted October 11, 2006 Share Posted October 11, 2006 Any reason you put the T between {} Send("TT") will send the letter T twice CheersNobby Link to comment Share on other sites More sharing options...
dlshoong Posted October 11, 2006 Author Share Posted October 11, 2006 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 More sharing options...
dlshoong Posted October 11, 2006 Author Share Posted October 11, 2006 Certainly the window to which the Send is expexted is not active after the 15 secondshow can i make it active the whole time? Link to comment Share on other sites More sharing options...
xcal Posted October 11, 2006 Share Posted October 11, 2006 (edited) Don't use quotes in sleep(). Edit - nm, that doesn't seem to matter. Btw, have you tried just... Send("T") Sleep("15000") Send("T") Sleep("100") ? Edited October 11, 2006 by xcal How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
dlshoong Posted October 11, 2006 Author Share Posted October 11, 2006 yes.i had tried I found out that theres no difference between existence of quotes Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 11, 2006 Share Posted October 11, 2006 (edited) 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 October 11, 2006 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
dlshoong Posted October 11, 2006 Author Share Posted October 11, 2006 (edited) 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 Edited October 11, 2006 by dlshoong Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 11, 2006 Share Posted October 11, 2006 how can i get The ControlID?My program format is Nostale.dat and this program can only be start through Internet Exploreri was unable to get the control is,its empty in the searchControlID 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 More sharing options...
dlshoong Posted October 11, 2006 Author Share Posted October 11, 2006 anyway to control MouseClick same as ControlSend? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now