olo Posted April 10, 2013 Share Posted April 10, 2013 Hey Noob here but im trying to do the following; Run notepad put some text in then attempt to save as. But when I want to save as I want to have a predefined name and file extension in the scipt. i.e. Save as: Chocolate.csv, or ihatechess.txt Can anyone help? ; Run Notepad Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("This is some text.") WinClose("Untitled - Notepad") ;WinWaitActive("Notepad", "Save") Send("y") [Here I want to control the save as box. e.g. SAVE AS: Chocolate.csv] ;WinWaitClose("[CLASS:Notepad]") Link to comment Share on other sites More sharing options...
FireFox Posted April 10, 2013 Share Posted April 10, 2013 Hi, Maybe this: ControlSetText("Notepad", "Save", "[CLASS:Edit; INSTANCE:1]", "Chocolate.csv", 1) Br, FireFox. Link to comment Share on other sites More sharing options...
olo Posted April 10, 2013 Author Share Posted April 10, 2013 Hi i tried that but still wont work. Link to comment Share on other sites More sharing options...
olo Posted April 10, 2013 Author Share Posted April 10, 2013 got it firefox. it was Send("{BACKSPACE}chocolate.csv") Link to comment Share on other sites More sharing options...
FireFox Posted April 10, 2013 Share Posted April 10, 2013 Well then : ControlSetText("[TITLE:Save as;CLASS:#32770]", "[CLASS:Edit; INSTANCE:1]", "{BACKSPACE}Chocolate.csv") Change the title to whatever it is, I don't know the English one. Br, FireFox. Link to comment Share on other sites More sharing options...
olo Posted April 10, 2013 Author Share Posted April 10, 2013 Found this also helped by putting in a winwait WinWait ("Untitled - Notepad", "", 2) ControlSetText("Save As", "" ,"[CLASS:Edit; INSTANCE:1]", "Chocolate.csv", 1) Link to comment Share on other sites More sharing options...
FireFox Posted April 10, 2013 Share Posted April 10, 2013 (edited) of course. btw, please use [autoit][/autoit] tags to post your code Edited April 10, 2013 by FireFox olo 1 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