Jump to content
Sign in to follow this  
atzoref

Working with "Save As", "Open" Dialogs

Recommended Posts

atzoref

Hi,

How can control "Save As" and "Open" Dialogs on other GUI by:

1) Set its destination address by wanted address

2) Set a name of file for saving or opening

3) Save or Open

4) Overwrite a file if exist (in "Save As" dialog)

Thanks

Share this post


Link to post
Share on other sites
atzoref

Yes of course

I already have the window details.

But I don't know how to change and set what I wrote.

The address is more problematic cus it not typical edit box, with the filename I almost succeeded but sometimes it is not work properly

and about (3) I don;t know too.

If you have an example of controling on a dialog like this it will be good

Share this post


Link to post
Share on other sites
DicatoroftheUSA

Here is an example of an example.

$sPath=@DocumentsCommonDir
$sFILE=$sPath&'test.txt'
$sApp="notepad.exe"
$sAppTitle="[CLASS:Notepad]"
$sSaveTitle='Save As'
$sSaveInputTitle="Edit1"
Run($sApp)
WinWait($sAppTitle)
send("!fa")
WinWaitActive($sSaveTitle)
ControlSetText($sSaveTitle,"",$sSaveInputTitle,$sFILE)

Share this post


Link to post
Share on other sites
atzoref

Thanks, I will try it.

And what about the "Overwrite" thing, what I should to write so when it popup or not it still will save the file by its name?

Share this post


Link to post
Share on other sites
atzoref

Someone?

How I deal with the "Overwrite" popup?

Thanks.

Share this post


Link to post
Share on other sites
KaFu

Try something like this:

Sleep(3000) ; to give the popup some time
If WinExists("popup") Then
    ControlClick("popup", "", "button1") ; use Au3Info to get the right button index.
EndIf
Edited by KaFu

Share this post


Link to post
Share on other sites
atzoref

Thanks :)

It's works!

You can close this topic.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×