wolfbartels Posted November 1, 2006 Share Posted November 1, 2006 Hi, is there a way FileOpenDialog (and FileSaveDialog) to open some place else as always top left? Thanks for any hint. Link to comment Share on other sites More sharing options...
seandisanti Posted November 1, 2006 Share Posted November 1, 2006 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. Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 1, 2006 Share Posted November 1, 2006 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) Link to comment Share on other sites More sharing options...
seandisanti Posted November 1, 2006 Share Posted November 1, 2006 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. JSi 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. Link to comment Share on other sites More sharing options...
Rick Posted November 1, 2006 Share Posted November 1, 2006 (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 & '"') EndFuncFileOpenDialog_position_test.au3 Edited November 2, 2006 by Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
ReFran Posted November 1, 2006 Share Posted November 1, 2006 Have alook at this: http://www.autoitscript.com/forum/index.ph...;p=129866&#hth, Reinhard Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 2, 2006 Share Posted November 2, 2006 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. 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) Link to comment Share on other sites More sharing options...
MHz Posted November 2, 2006 Share Posted November 2, 2006 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. Link to comment Share on other sites More sharing options...
wolfbartels Posted November 2, 2006 Author Share Posted November 2, 2006 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now