blademonkey Posted August 21, 2012 Posted August 21, 2012 Greetings, wow, it's been a while since i've posted in here (4+ years). it's good to be back and to see that AutoIt is going on strong. Here's the behavior i'm trying to understand. background: I have a specific Autoit application that invokes a fileopendialog. The initdir parameter is set to @scriptdir. When running a single instance of the application, the fileopendialog behaves as expected. The fileopendialog window opens and the folder location is correctly set to the @scriptdir location (of that instance). When running a second or third instance (where the exes themselves are located in a different location), the fileopendialog sets the initdir to one of the first two initdir (aka @scriptdir) locations. this is a little frustating, and im not sure how to control this behavior, since i dont exactly know when and where @scriptdir is technically fetching its information. I've tried assigning the @scriptdir setting to a user defined variable @curfolder in the begining of my script, which works well in scite, but not when compiled. I have several theories (one is that multiple instances somehow share the same variables/PID) but would like to get confirmation on what is driving this behavior. I've also tried using @scriptfullpath. Any help is appreciated. hopefully i've described the situation well enough, let me know if have not. ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung
Moderators Melba23 Posted August 21, 2012 Moderators Posted August 21, 2012 blademonkey,Welcome (back) to the AutoIt forum! I cannot reproduce the problem - when I run separate instances of a script using FileOpenDialog I always get the required initial folder regardless of what the other instances have selected or are using as a default:HotKeySet("{ESC}", "On_Exit") While 1 $sInitDir = @ScriptDir $sPath = FileOpenDialog("Test", $sInitDir, "AU3 files (*.au3)") WEnd Func On_Exit() Exit EndFuncCan you see if this script acts correctly for you - and try to produce a reproducer script which shows your problem. 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
blademonkey Posted August 21, 2012 Author Posted August 21, 2012 hmm yea, i can't get it to reproduce anymore. Thanks, however. ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung
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