What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] UserAccounts.CommonDialog

[Request] UserAccounts.CommonDialog
Author: Message:
Rene
Junior Member
**


Posts: 25
Joined: Jun 2006
O.P. [Request] UserAccounts.CommonDialog
Hi,

I know how to Select one File from you'r own PC,
But how can i select an Folder from you'r own PC ?
I can't find any way to do this with

new ActiveXObject('UserAccounts.CommonDialog')

I'm sorry, but i'm not an professional with ActiveXObjects :P

This post was edited on 07-04-2006 at 08:28 AM by Rene.
07-04-2006 08:27 AM
Profile E-Mail PM Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
35 / Male / Flag
Joined: Oct 2004
RE: [Request] UserAccounts.CommonDialog
quote:
Originally posted by Eljay
code:
var BrowseInfo = Interop.Allocate(32);
BrowseInfo.WriteDWORD(0, 0); //hOwner
BrowseInfo.WriteDWORD(4, 0); //pidlRoot
var foldertitle = Interop.Allocate((255+1) * 2);
BrowseInfo.WriteDWORD(8, foldertitle.DataPtr);
var sTitle = 'Test Window Title';
var pTitle = Interop.Allocate((sTitle.length+1) * 2);
pTitle.WriteString(0, sTitle, false);
BrowseInfo.WriteDWORD(12, pTitle.DataPtr);
BrowseInfo.WriteDWORD(16, 1); //ulFlags
BrowseInfo.WriteDWORD(20, 0); //lpfn
BrowseInfo.WriteDWORD(24, 0); //lparam
BrowseInfo.WriteDWORD(28, 0); //iImage
var pidl = Interop.Call('shell32', 'SHBrowseForFolder', BrowseInfo);
var folderpath = Interop.Allocate((255+1) * 2);
Interop.Call('shell32', 'SHGetPathFromIDList', pidl, folderpath);
Debug.Trace('Folder Path: ' + folderpath.ReadString(0, false));
Debug.Trace('Folder Title: ' + foldertitle.ReadString(0, false));

07-04-2006 02:18 PM
Profile PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Request] UserAccounts.CommonDialog
much simpler way i found not long after i first posted that, although it uses activex not windows api

code:
var objShell = new ActiveXObject("Shell.Application");
var objFolder = objShell.BrowseForFolder(0, "Select a folder:", 0, "C:\\");

:P
07-04-2006 02:25 PM
Profile PM Find Quote Report
Rene
Junior Member
**


Posts: 25
Joined: Jun 2006
O.P. RE: RE: [Request] UserAccounts.CommonDialog
quote:
Originally posted by Eljay
much simpler way i found not long after i first posted that, although it uses activex not windows api

code:
var objShell = new ActiveXObject("Shell.Application");
var objFolder = objShell.BrowseForFolder(0, "Select a folder:", 0, "C:\\");

:P


And how i know what of Folder is selected ..?
07-04-2006 03:01 PM
Profile E-Mail PM Find Quote Report
craig2k5
Junior Member
**


Posts: 64
Joined: Feb 2006
RE: RE: RE: [Request] UserAccounts.CommonDialog
quote:
And how i know what of Folder is selected ..?


the part that says

quote:
(0, "Select a folder:", 0, "C:\\");

maybe :P
07-04-2006 03:10 PM
Profile E-Mail PM Find Quote Report
Rene
Junior Member
**


Posts: 25
Joined: Jun 2006
O.P. RE: RE: RE: RE: [Request] UserAccounts.CommonDialog
quote:
Originally posted by craig2k5
quote:
And how i know what of Folder is selected ..?


the part that says

quote:
(0, "Select a folder:", 0, "C:\\");

maybe :P


When the user clicks on 'Ok' orso, then i must know what of director the user chose.

--
the one of Volv works fine :)
Thanx

This post was edited on 07-04-2006 at 03:25 PM by Rene.
07-04-2006 03:12 PM
Profile E-Mail PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: [Request] UserAccounts.CommonDialog
People should learn to use MSDN :dodgy:
07-04-2006 04:21 PM
Profile E-Mail PM Find Quote Report
Rene
Junior Member
**


Posts: 25
Joined: Jun 2006
O.P. RE: RE: [Request] UserAccounts.CommonDialog
quote:
Originally posted by J-Thread
People should learn to use MSDN :dodgy:


I'm dutch my friend ;)
And not the best in English.
07-04-2006 04:57 PM
Profile E-Mail PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: [Request] UserAccounts.CommonDialog
I am Dutch too my friend, and it seems like you do know enough english to be able to understand the posts here. That implies you actually do have enough knowledge to be able to understand the MSDN too.

If you don't, you are IMHO not "good enough" to be a programmer.
07-04-2006 06:43 PM
Profile E-Mail PM Find Quote Report
Rene
Junior Member
**


Posts: 25
Joined: Jun 2006
O.P. RE: RE: [Request] UserAccounts.CommonDialog
quote:
Originally posted by J-Thread
I am Dutch too my friend, and it seems like you do know enough english to be able to understand the posts here. That implies you actually do have enough knowledge to be able to understand the MSDN too.

If you don't, you are IMHO not "good enough" to be a programmer.


Mm, not realy true, i'm programmer for 5 Years, so i can read a little bit english, but MSDN i don't know all of.

But i forget every time the MSDN orso, but i will add him on my bookmarks :P

And this discussion is not realy ontopic.

This post was edited on 07-04-2006 at 06:48 PM by Rene.
07-04-2006 06:48 PM
Profile E-Mail 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