Jump to content

Recommended Posts

Posted

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]")

Posted

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.

Posted

Found this also helped by putting in a winwait

WinWait ("Untitled - Notepad", "", 2)

ControlSetText("Save As", "" ,"[CLASS:Edit; INSTANCE:1]", "Chocolate.csv", 1)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...