PcExpert Posted March 29, 2006 Share Posted March 29, 2006 Hello, I woul'd like to make a script that ask the user to put in some text and then type it in, for example notepad. I had a code but it didn't work. This is it: $text = InputBox ("test", "type the text that should be send to notepad")MsgBox(64, "TEST", "This is a test")Sleep(5000)Send("$text")Send("{ENTER}")Sleep(5000) Kind Regards, PcExpert Link to comment Share on other sites More sharing options...
MHz Posted March 29, 2006 Share Posted March 29, 2006 (edited) I don't see any notepad window in your script so added some code to test with. $text = InputBox ("test", "type the text that should be send to notepad") MsgBox(64, "TEST", "This is a test") ;~ Sleep(5000) ;------------------------------- If Not WinExists('Untitled') Then Run('notepad') WinWaitActive('Untitled') EndIf ;-------------------------------- Send($text) Send("{ENTER}") Sleep(5000) Notice that $test has no quotes around it. Edited March 29, 2006 by MHz Link to comment Share on other sites More sharing options...
PcExpert Posted March 29, 2006 Author Share Posted March 29, 2006 Thanks, it works 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