eJan Posted March 31, 2005 Share Posted March 31, 2005 I'm using FileSelectFolder, but when I click browse button, browse dialog is positioned: X:69, Y:34, can it be set to follow GUI window or I must use default position. (I use small Browse dialog with flag set to: 0)Script:#include <GUIConstants.au3>GUICreate("My GUI", 200, 100)$btn = GUICtrlCreateButton("Browse", 75, 40, 50, 20, $WS_SYSMENU)GUISetState(@SW_SHOW)While 1 $msg = GUIGetMsg() Select Case $msg = $btn Browse() Case $msg = $GUI_EVENT_CLOSE Exit EndSelectWEndFunc Browse() $open = FileSelectFolder("Select location", -1, 0, @ProgramFilesDir) ; Browse If @error Then MsgBox(4096, "", "No File(s) chosen") Else $open = StringReplace($open, "|", @CRLF) MsgBox(4096, "", "You chose: " & $open) EndIfEndFunc Link to comment Share on other sites More sharing options...
bshoenhair Posted March 31, 2005 Share Posted March 31, 2005 I'm using FileSelectFolder, but when I click browse button, browse dialog is positioned: X:69, Y:34, can it be set to follow GUI window or I must use default position. (I use small Browse dialog with flag set to: 0)Script:<{POST_SNAPBACK}>No, not directly with this function, would be a nice option though. Link to comment Share on other sites More sharing options...
MHz Posted April 1, 2005 Share Posted April 1, 2005 (edited) You could try WinMove() ?Sample:AdlibEnable('_Adlib') Opt("WinTitleMatchMode", 2) Func _Adlib() While 1 If WinExists('AutoIt Help') Then $pos = WinGetPos('SciTE') WinActivate('AutoIt Help') WinMove('AutoIt Help', '', $pos[0], $pos[1]) EndIf WEnd EndFuncExample shown, would use AdlibEnable() to check constantly, for a window title (your FileSelectFolder window), then move it, to the same co-ordinates as another window (your Gui window). Edit: FileSelectFolder() is a blocking function and AdlibEnable will pause while FileSelectFolder() is running. This idea will not work. Edited December 5, 2005 by MHz Link to comment Share on other sites More sharing options...
eJan Posted April 1, 2005 Author Share Posted April 1, 2005 Thanks bshoenhair & MHz, never mind!, I'will use it as it has to be default position. 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