IT tutorials
 
Windows
 

Windows Server 2008 Server Core : Understanding JavaScript and VBScript Compilers, Editing Script Files with Script Editor 2.1

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
12/10/2012 11:03:58 AM

1. Understanding JavaScript and VBScript Compilers

Generally, you aren't going to find a JavaScript or a VBScript compiler that works at the command line. The problem is that you need to have the support of the Windows Scripting Host (WSH) at the command line and WSH only provides an interpreted environment. Consequently, what you'll find is a vast array of JavaScript and VBScript editors, some of which are extremely complex and provide just about anything you could ask for, except WSH support. For example, the C-Point Antechinus JavaScript Editor (http://www.c-point.com/javascript_editor.php) shown in Figure 1 provides all of the functionality that you would expect from a full-fledged programming language at a fraction of the cost. Unfortunately, while this editor provides everything you need, including IntelliSense support, to build a Web application, it won't help you create a JavaScript application that relies on WSH. Yes, it will help you write the code, but you can't compile it.

An important issue to remember is that any time you see HTML Application (HTA), what you're really talking about is a Web application of some sort. Yes, you can create stand-alone HTA versions for the local machine with the right editor, but an HTA can't rely on the functionality that WSH provides, which means that you'll lose a lot of functionality. The best place to look for tools that will work at the command line is on the Microsoft site at http://www.microsoft.com/technet/scriptcenter/createit.mspx. Another great place to look is the Asp4Hs: Add-On's: ActiveScripts / WSH Scripts Web site at http://www.wilk4.com/asp4hs/list5.htm.

Fortunately, you can find editors that make your task significantly easier. For example, the AdminScriptEditor described at http://www.adminscripteditor.com/editor/ provides you with a number of features that make working with WSH easier. For example, you can use it to create scripts that use Windows Management Instrumentation (WMI). This Windows feature provides access to various Windows management functions that you can control from your script. This particular product isn't shareware and it doesn't come with a fully functional demonstration program. The 45-day trial version does give you a good idea of how the product works though.

Figure 1. Most JavaScript editors and compilers focus their attention on Web pages.

Real World Scenario

Considering the WSH Alternatives

Microsoft created WSH many years ago. It's amazing that this interpreted environment still meets so many needs and will continue to meet them well into the future. However, you still need to consider what WSH offers as part of your application-building task. At some point, you might need to consider giving up the convenience that WSH provides and using an entirely different environment. You can find a wealth of third-party utilities such as OnScript (http://www.onscript.com/en/home.asp) and ExeScript (http://www.hide-folder.com/overview/hf_7.html) online. The important consideration is finding the right tool for your particular needs.

2. Editing Script Files with Script Editor 2.1

You can edit almost any kind of script using Script Editor 2.1 (http://www.brinesoft.com/ScriptEditor.asp) from BrineSoft. You can use any text or XML editor to work with WSF, but it's better to have an editor specifically designed for the task.

The first time you start Script Editor 2.1, it asks whether you want to add existing scripts to a workspace. You can also create new workspaces as needed using the Workspace => New command. Storing your scripts in workspaces makes them easier to manage. You can separate scripts by type and purpose. Choose any existing workspace by selecting its entry in the Workspace field.

Script Editor comes with a number of sample scripts as shown in Figure 2. To open a package, simply click its entry in the Files tab. Opened packages appear in red, while unopened packages appear in black. The selected package appears in bold type to differentiate it from other opened packages.

Figure 2. Select any of the sample scripts and run them to see how the scripting technology works.

 Notice that you can see this structure clearly in Figure 7.9. Script Editor 2.1 makes it very easy to work with the XML data structure of WSF files as shown in Figure 3. All you need to do to work with a particular element is right-click it. The context menu shows what you can do with that element, so you don't have to guess about the rules. In addition, the editor automatically creates opening and closing tags as necessary and asks questions about the element when necessary to define it.

Debugging a script is also easier in Script Editor 2.1 than it is in some other editors. All you need to do is click the Run Project/Script button (the right-pointing red arrow) on the toolbar to start the script. When Script Editor 2.1 sees an error, it flags it and offers solutions on fixing the problem.

You can use bookmarks to make it easy to locate the code you want to work with. The bookmarks stay in place between sessions, so you can set them as needed to maintain your place in the code between sessions. The Toggle Bookmark, Next Bookmark, and Previous Bookmark buttons on the toolbar make it easy to move between locations quickly.

One of the features you'll like best is the ability to drag and drop statements as needed from the left pane. Figure 7.11 shows the VBScript statements, but you'll also find statements for WScript objects and WSH statements. To use any of these aids, simply drag and drop it from the left pane to the location you want in the right pane. Using this approach helps you create error-free code quite quickly.

When you find that you don't completely understand a bit of code, you can place the cursor on it and then click the help links in the left pane as shown in Figure 4. You'll see a copy of Help open with the appropriate help information selected. The help information is equivalent to what Microsoft provides, so it does provide enough information to look for further information should the help file itself prove unhelpful.

Figure 3. Script Editor 2.1 makes it easy to manipulate the structure of WSF scripts.

Figure 4. Drag-and-drop coding makes it easier to produce error-free code.

This is a quick overview of Script Editor 2.1. As you can see, it provides the means to create and edit WSF scripts quickly, which means you'll spend less time trying to figure out the WSF technology and more time getting your work done. The free download provides a considerable array of features, but you can also choose to purchase the product to obtain support and updates.

 
Others
 
- Xbox Live Games in Windows 8 : Customizing Your Avatar, Finding and Playing Your Favorite Games
- Watching and Sharing Video in Windows 8 : Exploring Video, Using the Movies Marketplace
- Windows 7 : Running Programs and Gadgets - Making Specialized Calculations, Writing Equations and Formulas
- Windows 7 : Running Programs and Gadgets - Inserting Special Characters, Crunching Numbers
- Windows 8 : Grooving to Your Tunes (part 2) - Adding Music to Your Collection. Purchasing Tunes
- Windows 8 : Grooving to Your Tunes (part 1) - Getting Started with the Music App, Listening to Music Previews
- Configuring Windows Home Server 2011 : Configuring the Windows Home Server Startup
- Configuring Windows Home Server 2011 : Changing the Windows Home Server Password, Restarting or Shutting Down Windows Home Server
- Configuring Windows Home Server 2011 : Selecting the Windows Home Server Region, Configuring Windows Update
- Windows 8 : Let There Be Photos (part 3) - Setting Photo Options, Offering Feedback on Photos, Displaying a Slideshow
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us