![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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? 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 Specs![]() |
| | #3 (permalink) |
| | 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 Specs![]() |
| | #4 (permalink) |
| | 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 Specs![]() |
| | #5 (permalink) |
| | 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 Specs![]() |
| | #6 (permalink) |
| | 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 Specs![]() |
![]() |
| 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 | |||