Sign in to follow this  
Followers 0
wolfbartels

FileOpenDialog position

9 posts in this topic

Hi,

is there a way FileOpenDialog (and FileSaveDialog) to open some place else as always top left?

Thanks for any hint.

Share this post


Link to post
Share on other sites



Hi,

is there a way FileOpenDialog (and FileSaveDialog) to open some place else as always top left?

Thanks for any hint.

you could make your own open/save dialog and display anywhere, or i think you could do it with dll calls, but probably the easiest way would be an adlib function that looks for the presence of your open/save dialog and uses WinMove() to put it wherever you like.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Hello,

A quick and dirty work around would be something along these lines. (Un-tested)

$title = "Some Unique Title/Text"
$fileOpen = FileOpenDialog($title, "C:\Windows", "All Files (*.*)")
WinSetState($title, "", @SW_HIDE)
WinMove($title, "", 0, 0)
WinSetState($title, "", @SW_SHOW)

That is a horrible work around if it works, but the only one I can think of at the moment.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Hello,

A quick and dirty work around would be something along these lines. (Un-tested)

$title = "Some Unique Title/Text"
$fileOpen = FileOpenDialog($title, "C:\Windows", "All Files (*.*)")
WinSetState($title, "", @SW_HIDE)
WinMove($title, "", 0, 0)
WinSetState($title, "", @SW_SHOW)

That is a horrible work around if it works, but the only one I can think of at the moment.

JS

i don't think that it will work JS, juts because the state and movement won't happen as execution is paused at the fileopendialog. that's why i suggested the adlib function to do the same thing.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

try this....

$Title= "Select file"

_Move($Title)

$file = FileOpenDialog($Title, @scriptdir, "(*.*)", 1,"")

Func _Move($Title)

FileDelete(@TempDir & "\Dummy.txt")

FileWrite(@TempDir & '\Dummy.txt','#NoTrayIcon' & @crlf & _

'AutoItSetOption("RunErrorsFatal",0)' & @crlf & _

'Opt("WinWaitDelay",0)' & @crlf & _

'WinWait($cmdline,"")' & @crlf & _

'WinMove($cmdline,"",@DesktopWidth/2-281,@DeskTopHeight/2-206)' & @crlf & _

'FileDelete(@TempDir & "\Dummy.txt")')

Run(@AutoItExe & ' /AutoIt3ExecuteScript ' & @TempDir & '\Dummy.txt "' & $Title & '"')

EndFunc

FileOpenDialog_position_test.au3

Edited by Rick

Who needs puzzles when we have AutoIt!!

Share this post


Link to post
Share on other sites

i don't think that it will work JS, juts because the state and movement won't happen as execution is paused at the fileopendialog. that's why i suggested the adlib function to do the same thing.

We posted at basically the same time. :whistle: I didnt even think of the script pausing there.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Adlib can also be paused by blocking functions as AutoIt waits for the return. Refran has shown good searching skills and I would go with that solution.

:whistle:

Share this post


Link to post
Share on other sites

Thanks to all who suggested solutions. The easy solution unfortunately doesn't work (The FileOpenDialog pauses the script!). The solution calling a second instance of Autoit works fine, but is quite complicated and insecure(circle!). As centering the Dialog is rather cosmetic and my project is for use by myself, I'll leave the Dialog in the corner. Thanks anyhow.

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  
Followers 0