Trojan55 Posted September 10, 2013 Share Posted September 10, 2013 Hello guys I'm bored of typing a text then new line sleep... etc... So i decided to make a function of SendSleep(text,sleepms) Here is the code : Func SendSleep($txt,$time) $chr = StringLen($txt) Dim $lol[$chr] Dim $bitz = 0 Do $bitz = $bitz + 1 Send($lol[$bitz]) Sleep($time) Until $bitz = $chr EndFunc SendSleep("Hello",100) Error is : C:UsersSyhsherDocumentsjik.au3 (7) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: Send($lol[$bitz]) Send(^ ERROR Link to comment Share on other sites More sharing options...
Solution michaelslamet Posted September 10, 2013 Solution Share Posted September 10, 2013 Hi Trojan, Try this: Func SendSleep($txt,$time) For $a = 1 to StringLen($txt) Send(StringMid($txt, $a, 1)) Sleep($time) Next EndFunc SendSleep("Hello",100) Is that what you want? Link to comment Share on other sites More sharing options...
Trojan55 Posted September 10, 2013 Author Share Posted September 10, 2013 Yea , Exactly !!! thanks solved!!! 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