Skoezzi Posted December 19, 2005 Share Posted December 19, 2005 I got following code: Send("#r") WinWaitActive("Run") Send("notepad.exe{Enter}") WinWaitActive("Untitled -") Send("Today's time/date is {F5}") It works till he has to open notepad.exe. What do i do wrong? Always when I try to send text to a inputfield, my script pauses. Can anybody help me? Link to comment Share on other sites More sharing options...
Bert Posted December 19, 2005 Share Posted December 19, 2005 (edited) run notepad with AutoItSetOption("WinTitleMatchMode", 2) run("notepad") winwait("Notepad") WinActivate("Notepad") send("{F5}") This is one way...I'm sure there are other ways of doing it. Edited December 19, 2005 by vollyman The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
MHz Posted December 19, 2005 Share Posted December 19, 2005 Can anybody help me?Wish I could help but your code works every time . Link to comment Share on other sites More sharing options...
Skoezzi Posted December 19, 2005 Author Share Posted December 19, 2005 Wish I could help but your code works every time .I just can't paste text into a textbox. The rest seems to work only the Send("text") does not work for me. Link to comment Share on other sites More sharing options...
MHz Posted December 19, 2005 Share Posted December 19, 2005 (edited) Are the titles correct for your system ? Try this example: Opt('TrayIconDebug', 1) Send("#r") WinWaitActive("Run") Send("notepad.exe{Enter}") Sleep(1000) $title = WinGetTitle('') WinWaitActive($title) Send("Today's time/date is {F5}") MsgBox(0, '', 'Title = ' & $title) Edit: forget the & in code Edited December 19, 2005 by MHz Link to comment Share on other sites More sharing options...
Skoezzi Posted December 19, 2005 Author Share Posted December 19, 2005 (edited) Are the titles correct for your system ? Try this example: Opt('TrayIconDebug', 1) Send("#r") WinWaitActive("Run") Send("notepad.exe{Enter}") Sleep(1000) $title = WinGetTitle('') WinWaitActive($title) Send("Today's time/date is {F5}") MsgBox(0, '', 'Title = ' & $title) Edit: forget the & in codeThis code just opens a Run box. What do you mean with : Are the titles correct for your system? EDIT: It works! It were the titles indeed. Thanks mate! Edited December 19, 2005 by Skoezzi Link to comment Share on other sites More sharing options...
MHz Posted December 19, 2005 Share Posted December 19, 2005 This code just opens a Run box. What do you mean with : Are the titles correct for your system?As for titles, do they match correctly. You are running an English operating system ? Perhaps the sleep was not long enough in last example. Try your original code as set here and if it is stuck on a line then hover your mouse over the system tray icon to see which line is the problem. Opt('TrayIconDebug', 1) Send("#r") WinWaitActive("Run") Send("notepad.exe{Enter}") WinWaitActive("Untitled -") Send("Today's time/date is {F5}") 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