Sign in to follow this  
Followers 0
kiboost

FileOpenDialog and init dir [solved]

2 posts in this topic

#1 ·  Posted (edited)

Hi,

FileOpenDialog seems to allways open itself at the last opened directory, not taking init dir into account. I have a contaxt menu with some bookmarks to open it at different locations, and whatever $path is, it open at last opened location.

$path = $pref_path
    ; if context menu, change path
    For $i = 1 To $nbrbookmarks
        If @GUI_CtrlId = $Cmi_[$i] Then
            $path = $bookmark_path[$i]
            MsgBox("","",$path)
        EndIf
    Next

    Global $varcomp = FileOpenDialog("Select txt", $path, "Composition (*.txt)", 1)

the msgbox is of course is as debug, and path is allways correct. Just openfiledialog don't use it ! How to force it to use it ?

Edited by kiboost

Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79

Share this post


Link to post
Share on other sites



Sometimes things are simple ..

Just keep in mind fileopendialog doesn't support "/" !

$path = StringReplace($path, "/", "\")


Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0