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

GetFileOpenName problem
Author: Message:
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
O.P. GetFileOpenName problem
I have managed to open an Open dialog box with the ComDlg32 function GetFileOpenName function.

However, I cannot specify a filter. They are supposed to be separated by null characters ("\0"), but Plus! stops writing the string into the databloc when it gets to the first null character.

How can I specify a filter with this limitation in place?
12-10-2006 09:48 PM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: GetFileOpenName problem
http://shoutbox.menthix.net/showthread.php?tid=60...d=672068#pid672068
[Image: 1-0.png]
             
12-10-2006 09:51 PM
Profile PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: GetFileOpenName problem
or maybe http://www.mpscripts.net/code.php?id=28
12-11-2006 10:45 AM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: GetFileOpenName problem
quote:
Originally posted by -!Felu!-
code:
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;
}

Will that still work in JScript or should it be 0x4 or something :S

EDIT: Pasted code twice

This post was edited on 12-11-2006 at 12:09 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
12-11-2006 10:58 AM
Profile PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: GetFileOpenName problem
That works [Image: msn_tongue.gif]. And you pasted the code twice [Image: msn_confused.gif].
12-11-2006 11:10 AM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: GetFileOpenName problem
Just want to know for my own beneift now, does that only work because it is being sent as a string rather than a number? I'm sure I tried it like that before but without the quotes
<Eljay> "Problems encountered: shit blew up" :zippy:
12-11-2006 12:12 PM
Profile PM Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: GetFileOpenName problem
quote:
Originally posted by SpunkyLoveMuff
quote:
Originally posted by -!Felu!-
code:
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;
}

Will that still work in JScript or should it be 0x4 or something :S

EDIT: Pasted code twice

you're right its susposed to be 0x4, &H just means hex in another langauge, but in js you use 0x. Also passing "&H4" is like passing "safswdfasdf" it means nothing to the program because its the wrong type and it has not a clue what &H4 means
[Image: dt2.0v2.png]      Happy Birthday, WDZ
12-11-2006 12:18 PM
Profile PM Web Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
O.P. RE: GetFileOpenName problem
Thanks guys, I wanted to use the GetFileOpenName version instead though for various reasons, so thanks Ezra for the link!
12-11-2006 10:38 PM
Profile PM 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