MikeShevchik Posted May 9, 2010 Share Posted May 9, 2010 Send a line of text ot whaterve program is open, Ive tried the following: Send("{SHIFTDOWN}t{SHIFTUP}his{SPACE}is{SPACE}a{SPACE}test") But nothig is typed into the text box on a form Link to comment Share on other sites More sharing options...
Developers Jos Posted May 9, 2010 Developers Share Posted May 9, 2010 (edited) Works fine here.... are you sure the intended program has the focus at the time your script runs? Edited May 9, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MikeShevchik Posted May 9, 2010 Author Share Posted May 9, 2010 Here are the steps I take to run the script 1) start notepad 2) click on the Autoit sript I want to run Nothing is typed into notepad Link to comment Share on other sites More sharing options...
hawky358 Posted May 9, 2010 Share Posted May 9, 2010 The Send() command "sends" to the active window i.e. it simulates typing on the keyboard so you have to activate the window first Opt("WinTitleMatchMode", 2) WinActivate("Note") Send("{SHIFTDOWN}t{SHIFTUP}his{SPACE}is{SPACE}a{SPACE}test") Link to comment Share on other sites More sharing options...
hawky358 Posted May 9, 2010 Share Posted May 9, 2010 Also I don't know if you have a reason for typing the shifts etc. but you can just use Send("This is a test") Link to comment Share on other sites More sharing options...
MikeShevchik Posted May 9, 2010 Author Share Posted May 9, 2010 What I want to do is be able to goto any web page position the cursor and the run a scritpt, in order to be able to fill in the blanks on lets say a name and address. I dont know in advance what web page is active or what browser that may be active. Link to comment Share on other sites More sharing options...
hawky358 Posted May 9, 2010 Share Posted May 9, 2010 (edited) Rather use a hotkey then. Have the script run in the background and when you select the box you press the appropriate hotkey. Just don't make the hotkey conflict with another program's hotkey ex: (the hotkey is Ctrl+1) HotKeySet ("^1","type") while 1 sleep(15) WEnd Func type() Send("This is a test") EndFunc Edited May 9, 2010 by hawky358 Link to comment Share on other sites More sharing options...
MikeShevchik Posted May 9, 2010 Author Share Posted May 9, 2010 Thanks I'll try this 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