What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Creating file dialog in Vista

Creating file dialog in Vista
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Creating file dialog in Vista
Those ActiveXObjects are very system-dependent, Vista and above no longer support those. You're much better off using native Win32 functions, as those are kept throughout many versions of Windows.

In the case of an open file dialog, you'll have to create an OPENFILENAME memory structure and then call GetOpenFileName to open the dialog and receive the results.

Luckily for you, there is already an implementation of this available for Plus! Live, so go have a look at Matti's reply to CommonDialog help! Here is an example of your code, written for the BrowseForFile() function.
Javascript code:
function MyBrowseForFile() {
    return BrowseForFile(
        "Select a file to open",                    //Dialog title
        "C:\\",                                     //Start directory
        "Text Files (*.txt)|*.txt|All Files|*.*||", //Filters
        false                                       //True = save, false = open
    ); //Returns the selected path, or false if the dialog was canceled
}

Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
08-13-2009 07:45 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Creating file dialog in Vista - by tribbium on 08-13-2009 at 01:40 AM
RE: Creating file dialog in Vista - by Matti on 08-13-2009 at 07:45 AM
RE: Creating file dialog in Vista - by tribbium on 08-13-2009 at 09:45 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On