garbb Posted October 3, 2012 Share Posted October 3, 2012 I want an autoit script to open and then interact with an open file dailog (or possibly other dialog) from an application but I don't want the dialog to popup on the screen and steal focus away from whataver other app/window the user is using. I know that I can use something like this WinWaitActive("File open") WinSetState("File open", "", @SW_HIDE) to hide the dialog once it appears and control it even with it hidden, but this briefly flashes the box on the screen and steals focus. Is there any way to prevent this from happening? I have tried running the original application with the @SW_HIDE flag (Run($exename, "",@SW_HIDE)) but whenever the autoit script causes the open file dialog to open it still shows up and steals focus even though the main application window is completely hidden. Thanks in advance to anyone that can help. Link to comment Share on other sites More sharing options...
FireFox Posted October 4, 2012 Share Posted October 4, 2012 Hi, I think it is not possible. Br, FireFox. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 4, 2012 Moderators Share Posted October 4, 2012 More importantly, why are you trying to hide the window instead of just automating the file selection? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
garbb Posted October 4, 2012 Author Share Posted October 4, 2012 More importantly, why are you trying to hide the window instead of just automating the file selection?It is part of a script that takes a long time to run and I would like to be able to to other things with my computer without being interrupted by windows flashing on the screen and stealing focus.What do you mean by "automating the file selection"? That is exactly what I am trying to to, its just that the only way I can seem to do this with the particular program I am automating is to have autoit open the file open dialog and insert text and then click the "open" button. Ideally I could have it open the file via the command line (program.exe file.ext) or something like that but i have tried this and the program doesn't support this. Is there some other way? Link to comment Share on other sites More sharing options...
garbb Posted October 4, 2012 Author Share Posted October 4, 2012 For some reason I cannot edit my posts, but it had occurred to me that there might be some way to do this involving some sort of hooking of the open file dialog. This sort of thing is a bit over my head though. Does anyone know anything about this or have a good tutorial or example? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 4, 2012 Moderators Share Posted October 4, 2012 garbb,You need 5 posts to open up the "Edit" permission - along with a few other ones. 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 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 4, 2012 Moderators Share Posted October 4, 2012 Hi, garbb. Regarding a "hook" for the file open dialog, it would help greatly if you could explain what program you're trying to manipulate. Each application is different in what you can and cannot do, so without knowing what application you're working in we're shooting in the dark "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
garbb Posted October 4, 2012 Author Share Posted October 4, 2012 Unfortunately it is a program I use for work and so it is not something that is available to everyone nor can I share it but the file open dialog looks just like the standard windows file open dialog; for example open up notepad and click on file, then open. Here is a screenshot: http://imgur.com/EVyhu 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