Jump to content

Recommended Posts

Posted (edited)

Hi is that any body here that know a easy way to have center the file open dialog ?

I can not find a solution of this.

Code:

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

$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

Edited by Borje
Posted
  Quote

I can not find a solution of this.

Where you search for it? try here on forum :)

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted (edited)

Alternative method to what you might find here on the forum:

#include <GuiConstants.au3>

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

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

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

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

Thanks MrCreator

I have test this but when i run this example I have this error:

Incorrect number of parameters in function call.

on this:

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

Posted

  Borje said:

Thanks MrCreator

I have test this but when i run this example I have this error:

Incorrect number of parameters in function call.

on this:

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

your script is working properly i have tested it...

[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

Posted

Hi Piyush

When I run I have this error:

C:\Documents and Settings\Borje\Skrivbord\Center fileopen.au3 (6) : ==> Incorrect number of parameters in function call.:

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

$var = ^ ERROR

>Exit code: 1 Time: 0.447

Posted

  Borje said:

Hi Piyush

When I run I have this error:

C:\Documents and Settings\Borje\Skrivbord\Center fileopen.au3 (6) : ==> Incorrect number of parameters in function call.:

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

$var = ^ ERROR

>Exit code: 1 Time: 0.447

What AutoIt version you are using?

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted
  Borje said:

I use version 3.2.10

The last is 3.3.0.0. The last parameter was not there yet back in 3.2x.

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

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...