Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - common dialog on vista

Reply
 
Old 01-05-2009   #1 (permalink)
arno


 
 

common dialog on vista



Hi,

Sorry if this has been asked a million times before, but is it at all
possible to have a vbscript open a Common Dialog in Vista, in the same
way that you could do it using CreateObject("UserAccounts.CommonDialog")
in XP? *WITHOUT* resorting to some hideous IE or Office workaround?

I read that in Vista it has been replaced with the Common Item Dialog,
but I don't see a way to conjure that up with vbscript.

regards
arno

My System SpecsSystem Spec
Old 01-06-2009   #2 (permalink)
Reventlov


 
 

Re: common dialog on vista

Il giorno Tue, 6 Jan 2009 01:17:07 +0100, arno <noreplyAThighiqDOTnl@xxxxxx> ha
scritto:
Quote:

>Sorry if this has been asked a million times before, but is it at all
>possible to have a vbscript open a Common Dialog in Vista, in the same
>way that you could do it using CreateObject("UserAccounts.CommonDialog")
>in XP? *WITHOUT* resorting to some hideous IE or Office workaround?
XP also had mscomdlg.commondialog, but only if some visual language was installed. Try if
it is now provided in the standard package.


Set comDlg=CreateObject("MSComDlg.CommonDialog.1")
const cdlCancel = 32755 'Costante di errore: è stato premuto ANNULLA
const cdlOFNHideReadOnly = 4 'Nasconde la casella "sola lettura"
const cdlOFNAllowMultiselect = 512 'Permette di selezionare più files
const cdlOFNFileMustExist = 4096 'Puoi scegliere solo files esistenti
Const cdlOFNExplorer = 524288 'Finestra in stile win95
comDlg.Flags = cdlOFNHideReadOnly + cdlOFNAllowMultiselect + cdlOFNExplorer +
cdlOFNFileMustExist
comDlg.Filter = "Fotografie|*.jpg|Tutti i files|*.*|"
comDlg.DialogTitle="QuickRename2 "
comDlg.InitDir="c:\"
comDlg.maxfilesize=8000
comdlg.CancelError=true
on error resume next
'comDlg.FileName="prova.txt"
comDlg.ShowOpen
if err.number=cdlCancel then WScript.Quit
'E mostro il file scelto (se ha premuto annulla è "")
Lista=Split(comDlg.FileName,Chr(0))
--
Giovanni Cenati (Bergamo, Italy)
Write to "Reventlov" at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--
My System SpecsSystem Spec
Old 01-06-2009   #3 (permalink)
arno


 
 

Re: common dialog on vista

Tx for the suggestion, will give it a try

arno

In article <4963dbbc.4915250@xxxxxx>, noone@xxxxxx
says...>
Quote:

> Il giorno Tue, 6 Jan 2009 01:17:07 +0100, arno <noreplyAThighiqDOTnl@xxxxxx> ha
> scritto:
Quote:

> >Sorry if this has been asked a million times before, but is it at all
> >possible to have a vbscript open a Common Dialog in Vista, in the same
> >way that you could do it using CreateObject("UserAccounts.CommonDialog")
> >in XP? *WITHOUT* resorting to some hideous IE or Office workaround?
>
> XP also had mscomdlg.commondialog, but only if some visual language was installed. Try if
> it is now provided in the standard package.
My System SpecsSystem Spec
Old 01-06-2009   #4 (permalink)
arno


 
 

Re: common dialog on vista

Tried, will work on my system, but it is not part of the OS, so fails on
others, alas

In article <4963dbbc.4915250@xxxxxx>, noone@xxxxxx
says...>
Quote:

> XP also had mscomdlg.commondialog, but only if some visual language was installed. Try if
> it is now provided in the standard package.
My System SpecsSystem Spec
Old 01-06-2009   #5 (permalink)
mayayana


 
 

Re: common dialog on vista

Looking at the Microsoft docs, I don't any mention of
what DLL houses the interfaces, which is odd, but it
is COM. You'd need to find the ProgID or CLSID or
file name, then check that in an object browser to see
whether there's a dispatch interface included. If so then
script can probably use it. If not then it won't be accessible
through script. I don't know what the reason/source was
for UserAccounts.CommonDialog in XP, but that was
actually an extra. According to the MS docs, it appears
that Common Item Dialog doesn't replace that but was rather
added as part of the general Win32 API to provide dialogues
with new functionality not provided with comdlg32.dll, a
non-scriptable library that has provided all of the
open/save/print/colorpicker etc. dialogues since Win95.
Quote:

>
> Hi,
>
> Sorry if this has been asked a million times before, but is it at all
> possible to have a vbscript open a Common Dialog in Vista, in the same
> way that you could do it using CreateObject("UserAccounts.CommonDialog")
> in XP? *WITHOUT* resorting to some hideous IE or Office workaround?
>
> I read that in Vista it has been replaced with the Common Item Dialog,
> but I don't see a way to conjure that up with vbscript.
>
> regards
> arno





My System SpecsSystem Spec
Old 01-13-2009   #6 (permalink)
arno


 
 

Re: common dialog on vista

Tx for the input. Considering that extensive googling hasn't yielded any
result, I take it your answer in essence means 'no' :-)

arno

In article <uL9L$EGcJHA.5976@xxxxxx>, mayaXXyana@xxxxxx
says...>
Quote:

> Looking at the Microsoft docs, I don't any mention of
> what DLL houses the interfaces, which is odd, but it
> is COM. You'd need to find the ProgID or CLSID or
> file name, then check that in an object browser to see
> whether there's a dispatch interface included. If so then
> script can probably use it. If not then it won't be accessible
> through script. I don't know what the reason/source was
> for UserAccounts.CommonDialog in XP, but that was
> actually an extra. According to the MS docs, it appears
> that Common Item Dialog doesn't replace that but was rather
> added as part of the general Win32 API to provide dialogues
> with new functionality not provided with comdlg32.dll, a
> non-scriptable library that has provided all of the
> open/save/print/colorpicker etc. dialogues since Win95.
>
Quote:

> >
> > Hi,
> >
> > Sorry if this has been asked a million times before, but is it at all
> > possible to have a vbscript open a Common Dialog in Vista, in the same
> > way that you could do it using CreateObject("UserAccounts.CommonDialog")
> > in XP? *WITHOUT* resorting to some hideous IE or Office workaround?
> >
> > I read that in Vista it has been replaced with the Common Item Dialog,
> > but I don't see a way to conjure that up with vbscript.
> >
> > regards
> > arno

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
how to use the Common Item Dialog from vista in VBscript VB Script
Common File Dialog for Vista VB Script
Common Dialog (Load/Save) - Missing Keyboard Shortcuts? Vista file management
Newbie question about Explorer Views and common dialog details view?? Vista General
Copying Dialog appears over Confirm File Replace dialog Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46