Jury Posted August 24, 2011 Share Posted August 24, 2011 All, I've been looking at and experimenting with variations of FileSaveDialog trying to find a way to re-set the default directory. I have a program that works okay up to when it prompts me to save the file being downloaded - this server side generated FileSaveDialog always automatically saves to the last directory I've saved something to (is that correct?). Is there some way of, at the start of my program, re-setting this default directory to something like @MyDocumentsDir ? Or is FileSaveDialog the complete wrong way to go? Thanking you, Jury Link to comment Share on other sites More sharing options...
somdcomputerguy Posted August 24, 2011 Share Posted August 24, 2011 FileSaveDialog() lets you define its 'init dir'. See its entry in the Helpfile for more info. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Jury Posted August 24, 2011 Author Share Posted August 24, 2011 (edited) But the FileSaveDialog isn't of my making it comes about from the server response to my request. I have tried to run a FileOpeneDialog and FileSaveDialog using the required directory hoping this would re-set the default directory before making my request but this doesn't seem to change the default directory. Edited August 24, 2011 by Jury Link to comment Share on other sites More sharing options...
spudw2k Posted August 26, 2011 Share Posted August 26, 2011 But the FileSaveDialog isn't of my making it comes about from the server response to my request. I have tried to run a FileOpeneDialog and FileSaveDialog using the required directory hoping this would re-set the default directory before making my request but this doesn't seem to change the default directory.What is the method your are using to make your "request" against the server? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Jury Posted August 28, 2011 Author Share Posted August 28, 2011 What is the method your are using to make your "request" against the server? The code below sends my file to be processed to the server then the server responds with the standard FileSaveDialog panel for the file which now has been processed by a server side program. One would normally then choose the directory and fill in a file name but to automate so it always saves to the directory I want to save it to I was hoping to be able to set that directory some way - otherwise it just saves to the last directory I saved something to (I think that last directory saved to becomes the default directory in windows). Everything works except insuring the directory where the file is save to is always the same. Jury $ICLRfound = @MyDocumentsDir & "\temp.tmp" $oIE = _IECreate("http://www.---") $oForm = _IEGetObjByName($oIE, "infile") _IEAction($oForm, "focus") Sleep(5000) ;five seconds Send($ICLRscratch) Link to comment Share on other sites More sharing options...
spudw2k Posted August 29, 2011 Share Posted August 29, 2011 I guess you could use the AUInfo tool to identify control_ids on the SaveAs Dialog box and have the script interact with it.Does the form automatically run after the infile control has updated? Most html forms use a POST method, you might be able to do something with the POST URL instead. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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