SunQuest
 
       Windows Scripting
  Home arrow Windows Scripting arrow User Interaction with Common Dialogs in WS...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
VeriSign Whitepapers 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

User Interaction with Common Dialogs in WSH
By: Nilpo/Developer Shed Staff Writer
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2007-04-24

    Table of Contents:
  • User Interaction with Common Dialogs in WSH
  • Accessing the Common Dialog control directly
  • Accessing dialogs through other applications
  • Watch it in action

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    User Interaction with Common Dialogs in WSH


    (Page 1 of 4 )

    As you progress into more detailed and more powerful code, you will find yourself focusing more and more on how your scripts appear to your users. Using common Windows dialog boxes will give your script a familiar, comfortable feel while appearing more like a fully functional application.

    You've all seen the classic File Open and File Save dialog boxes in Windows.  These standard dialogs are provided by the Common Dialogs Control that ships with Windows.  Updates are made available via subsequent releases of the Visual Basic runtime environment and some Microsoft applications.

    The Common Dialogs control is housed in the comctl32.dll library in your System32 directory.  It is a registered component and is therefore made available to any application in the Windows environment.

    As with any object, you can connect to the Common Dialogs control and use any of its available methods.  In a standard programming language, such as Visual Basic or C++, this is a fairly simple task.  However, it's not quite so simple in WSH.

    Take the time to read this article slowly and thoroughly.  WSH does not have native support for Common Dialogs.  Whether the lack of support was intentional or a mere oversight is mostly irrelevant.  The fact remains that the normal conditions that scripting was designed for have no real need for Common Dialogs.

    But as is generally the case with programming technologies, the uses for scripting have evolved far beyond their intended purpose and, thus, the interest in Common Dialogs implementation has been born.

    Please keep in mind that due to the nature of the examples that follow, they may not work in all situations or under every condition.  These are all workarounds!  While I will be making the attempt to provide code that should work, it's not possible for me to accurately forecast every scenario that may arise.

    One final suggestion before we dive into things: if you are interested in applying a GUI to your scripts in an effort to make them look like real applications, you may want to consider the use of HTML applications.

    HTAs are a scripting technology that allows you to house code in standalone web pages.  This allows you to design a sort of UI with the use of forms and other web elements in full HTML and CSS.  You may find this a more suitable solution.

    More Windows Scripting Articles
    More By Nilpo/Developer Shed Staff Writer


       · Hey, guys. Thanks for joining me again. In this article how show you how to give...
       · Hi,I am regular reader of your articles. Its very informative. Keep...
       · Thanks for reading.Beginning with the basics, this does require Internet...
     

    WINDOWS SCRIPTING ARTICLES

    - Generating Outlook Signatures Based on Activ...
    - VBScript: Converting and Formatting with Fun...
    - VBScript: Conversion and Format Functions
    - VBScript: Array Functions
    - VBScript: Strings, You Can`t Function withou...
    - VBScript: More String Functions
    - VBScript: Functioning with Strings
    - Working with the Windows Registry in C++
    - Understanding Objects
    - HTML Applications: Giving WSH a User Interfa...
    - Modifying Computer Objects with Active Direc...
    - Logon Script to Send Email Notifications
    - Securing Computers and Active Directory
    - Moving and Renaming Computers with Active Di...
    - Working with System Processes in WSH





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway