Jump to content

Windows Save as Dialog


Recommended Posts

Hey guys im new at AutoIt and have a doubt about how to operate the Save As and Open dialog boxes that appear in Windows applications.

For an easier explanation my current test is to create a Notepad text and Save it in a specific location using the Save as Dialog. I wanted to know how to manipulate the ComboBox and SysListView32, specifically how to select an option and click (thus emulating the human action).

Any help would be greatly appreciated :D

Thanks for the attention

P.S: Hi to all the community and a special thanks to AutoIt devs!

Link to comment
Share on other sites

you can Use Autoit Help file for examples.

Initiates a Open File Dialog

Local $message = "Hold down Ctrl or Shift to choose multiple files."

Local $var = FileOpenDialog($message, @WindowsDir & "", "Images (*.jpg;*.bmp)", 1 + 4)

If @error Then
MsgBox(4096, "", "No File(s) chosen")
Else
$var = StringReplace($var, "|", @CRLF)
MsgBox(4096, "", "You chose " & $var)
EndIf


; Multiple filter group
$message = "Hold down Ctrl or Shift to choose multiple files."

$var = FileOpenDialog($message, @WindowsDir & "", "Images (*.jpg;*.bmp)|Videos (*.avi;*.mpg)", 1 + 4)

If @error Then
MsgBox(4096, "", "No File(s) chosen")
Else
$var = StringReplace($var, "|", @CRLF)
MsgBox(4096, "", "You chose " & $var)
EndIf

Initiates a Save File Dialog.

Local $MyDocsFolder = "::{450D8FBA-AD25-11D0-98A8-0800361B1103}"

Local $var = FileSaveDialog("Choose a name.", $MyDocsFolder, "Scripts (*.aut;*.au3)", 2)
; option 2 = dialog remains until valid path/file selected

If @error Then
    MsgBox(4096, "", "Save cancelled.")
Else
    MsgBox(4096, "", "You chose " & $var)
EndIf


; Multiple filter group
$var = FileSaveDialog("Choose a name.", $MyDocsFolder, "Scripts (*.aut;*.au3)|Text files (*.ini;*.txt)", 2)
; option 2 = dialog remains until valid path/file selected

If @error Then
    MsgBox(4096, "", "Save cancelled.")
Else
    MsgBox(4096, "", "You chose " & $var)
EndIf

Edited by Danyfirex
Link to comment
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
 Share

  • Recently Browsing   0 members

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