odexed Posted December 25, 2011 Posted December 25, 2011 (edited) help me please. i need to make a simple script which starts notepad and open a new file. I trying it: Run("notepad.exe") Send("^o") Send("{ENTER}") but it just prints letter "o" in notepad. is it problem in my system? how can i do this? P.S. autoit v.3.3.8.0 Edited December 25, 2011 by odexed
mjoshi Posted December 25, 2011 Posted December 25, 2011 Try this: Run("notepad.exe") Send("{CTRLDOWN}") Send("o") Send("{CTRLUP}") Send("{ENTER}")
kylomas Posted December 25, 2011 Posted December 25, 2011 odexed, After starting NotePad (or whatever) you want to make sure that it has focus. kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
odexed Posted December 25, 2011 Author Posted December 25, 2011 Try this: Run("notepad.exe") Send("{CTRLDOWN}") Send("o") Send("{CTRLUP}") Send("{ENTER}") it also doesn't work. window is active and focus sets after run it seems there is some problem with my windows 7
Zedna Posted December 25, 2011 Posted December 25, 2011 Run("notepad.exe") WinWaitActive("[CLASS:Notepad]") Send("^o") Send("{ENTER}") Resources UDF ResourcesEx UDF AutoIt Forum Search
odexed Posted December 26, 2011 Author Posted December 26, 2011 (edited) When i press Ctrl+O on the keyboard manually it's ok Edited December 26, 2011 by odexed
Zedna Posted December 26, 2011 Posted December 26, 2011 (edited) Look hereTry to switch keyboard layout to english and see if problem remains.In Notepad you can use WinMenuSelectItem() instead of Send() Edited December 26, 2011 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
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