4Eyes Posted February 27, 2011 Posted February 27, 2011 Folks, I'd simply like to be able to set the position of the FileOpenDialog(). It this possible? I think not as there's no parameter for this and I can't change the source code for it as it's a build in function. I have no code representing any tests I have done to solve my own issue as per the previous. BTW, Yashied's recent TVExplorer and Melba23's ChooseFileFolder while both excellent are not what I want. Regards, 4Eyes
ResNullius Posted February 27, 2011 Posted February 27, 2011 You might have a look at MrCreatoR's clever idea for centering a FileOpenDialog which could easily be adapted to positioning it where you want: http://www.autoitscript.com/forum/index.php?showtopic=97919&view=findpost&p=704245
Moderators Melba23 Posted February 27, 2011 Moderators Posted February 27, 2011 4Eyes,Would you mind explaining just why my ChooseFileFolder UDF does not meet your requirements? It could be modified if the changes you would like to see are not too great. Unfortunately the time taken to populate the treeview cannot be shortened any more as far as I can see - and believe me I have looked! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
GEOSoft Posted February 27, 2011 Posted February 27, 2011 You can use WinMove() to put the standard dialog anyplace you want it to be but remember that the FileOpenDialog() is the standard Windows dialog and is subject to the default position as set by Microsoft. They are the ones that didn't put in the size and position parameters not the AutoIt devs. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Yashied Posted February 27, 2011 Posted February 27, 2011 #Include <WindowsConstants.au3> $hWnd = GUICreate('', -1, -1, 50, 50, $WS_POPUP) FileOpenDialog('', '', 'Images (*.jpg;*.bmp)|Videos (*.avi;*.mpg)', 1 + 4 , '', $hWnd) GUIDelete($hWnd) pixelsearch 1 My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
4Eyes Posted February 28, 2011 Author Posted February 28, 2011 Guys, It's great to see so many replies each with different possible solutions. Resnullius, Yep, that works brilliantly and suits me to a tee as I just want it away from top left. Simple and to the point. Thanks to you and MrCreatoR. GEOsoft, Unless I'm missing something significant, I don't see how I could WinMove() the FileOpenDialog() window while it's active (showing) as the script pauses until a file is chosen or cancelled. I suspect that I actually am missing something as it doesn't seem likely that you would say something that doesn't make sense. In any case I can't see how I'd get the return value from FileOpenDialog if I wrapped it inside a WinMove(). (Scratching head and nodding to self.... ???? Yashied, Yes, succinct as usual. Yours also works well. Thank you. Melba23, I know you took no offence at my comment but to explain, your great function is an overkill for what I need. I simply want the user to pick a single file from a subdirectory that I specify which FileOpenDialog() does perfectly well. Thank you all guys. It's nice to get replies from so many of the very experienced users here. Regards, 4Eyes
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