Guest Luzifer2004 Posted September 20, 2006 Share Posted September 20, 2006 just tested some conditions myself but need some help anyway. my aim is something like that: run notepad check weather notepad have focus write a sentence 10000 times ^^ (for loop) check in every loop weather notepad have focus or something else just opened if notepad have focus -> simply go on if not -> activate notepad again heres my code that activates the window after each word. so i avoided the conditions but the program is slower. AutoItSetOption("SendKeyDelay", 100) msgbox (64, "tut", "es geht los") Run("notepad.exe") WinWaitActive("Unbenannt - Editor") for $i=1 to 100000 Send("ich ") WinActivate("Unbenannt - Editor") Send("bin ") WinActivate("Unbenannt - Editor") Send("der ") WinActivate("Unbenannt - Editor") Send("beste ") WinActivate("Unbenannt - Editor") Send("hier ") WinActivate("Unbenannt - Editor") Next msgbox (0, "tut", "ende") can someone write what code i have to build in? thx for help, sorry for grammar and short, incomplete sentences (german and lack of time^^) Link to comment Share on other sites More sharing options...
dabus Posted September 20, 2006 Share Posted September 20, 2006 Why don't you use ControlSend -- that's saver than send (at least I think so). 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