What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » help with GetOpenFileName

help with GetOpenFileName
Author: Message:
Dennis Mike
Junior Member
**

Avatar

Posts: 59
Reputation: 2
34 / Male / –
Joined: Jan 2007
O.P. help with GetOpenFileName
hello guy's
i need use GetOpenFileName and use http://msdn2.microsoft.com/en-us/library/ms646927.aspx (OPENFILENAME)
can theys help'me with interop.allocate in openfilename?



This post was edited on 02-24-2007 at 02:57 AM by Dennis Mike.
02-24-2007 02:21 AM
Profile PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: help with GetOpenFileName
Well, it seems like you first have to construct an OPENFILENAME structure, but I found something which is easier to use in my opinion.
code:
Original code by -!Felu!-, posted at the MP!L Script Developers Rescource
function BrowseForFile(InitialDir){
BrowseFilter = "Text Files (*.txt)|*.txt|All Files|*.*";
  var BrowseDialog = new ActiveXObject("UserAccounts.CommonDialog")
  BrowseDialog.Filter = BrowseFilter;
  BrowseDialog.InitialDir = InitialDir;
  BrowseDialog.Flags = "&H4";
  BrowseDialog.ShowOpen();
  return BrowseDialog.FileName;
}
Just call the function with a initial directory path (e.g.: "C:\") and it'll open a dialog and returns the chosen path.

NOTE: This object is only available since Windows XP, but because Windows Live Messenger and Messenger Plus! Live only support XP or higher, there's no need to think of supporting pre-XP. ;)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
02-24-2007 09:34 AM
Profile E-Mail PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: help with GetOpenFileName
See Matty's reply to Browse For File :).
02-24-2007 11:59 AM
Profile E-Mail PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: help with GetOpenFileName
quote:
Originally posted by Felu
See Matty's reply to Browse For File :).
Hmm, that one seems to be a bit more advanced, yes. :P
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
02-24-2007 12:27 PM
Profile E-Mail PM Web Find Quote Report
Dennis Mike
Junior Member
**

Avatar

Posts: 59
Reputation: 2
34 / Male / –
Joined: Jan 2007
O.P. RE: help with GetOpenFileName
i need get multifiles, but with this activex if i use thist flags 0x80200, i can select multifile, but no get the patch the file, single the folder that it contains them
02-24-2007 05:37 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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