PrimalScript. Your First 20 Minutes. Your First 20 Minutes. Start here to be productive with PrimalScript in just 20 minutes.

Similar documents
PrimalScript 3.0. PrimalScript 3.0. Professional Scripting IDE for System Administrators, Web Developers and multiple-language programmers.

Welcome In this chapter

Easy Windows Working with Disks, Folders, - and Files

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2010

1. Move your mouse to the location you wish text to appear in the document. 2. Click the mouse. The insertion point appears.

Version S Cincinnati, Suite 105 Tulsa, OK (918) Fax (918)

IT Essentials v6.0 Windows 10 Software Labs

ClickFORMS Quickstart Tutorial

Microsoft Office Outlook 2007: Intermediate Course 01 Customizing Outlook

Introduction to Microsoft Word 2010

Microsoft Word. An alternative to following these steps are to double click on the Microsoft Word Icon on the desktop.

Getting Started The Application Window Office Office 2003 Application Window cont d

Computer Nashua Public Library Introduction to Microsoft Word 2010

Introduction. Getting to Know Word The Ribbon. Word 2010 Getting Started with Word. Video: Exploring Your Word 2010 Environment.

[ Getting Started with Analyzer, Interactive Reports, and Dashboards ] ]

DataPro Quick Start Guide

Copyright. Trademarks Attachmate Corporation. All rights reserved. USA Patents Pending. WRQ ReflectionVisual Basic User Guide

5 WAYS TO CUSTOMIZE ALTIUM DESIGNER FOR BETTER EFFICIENCY

Introduction to Microsoft Word 2010

For additional information, please consult the Read-Me and Help documentation or contact Electro-Voice or Dynacord technical support.

Navigate to Cognos Cognos Analytics supports all browsers with the exception of Microsoft Edge.

Lab: Supplying Inputs to Programs

Procomm Plus Installation Guide. Prophet 21 FASPAC 4.1

Introduction. Overview. Document Conventions

DEKOMOS. Browser and Editor Reference. Pinnacle Systems, Inc. 280 N. Bernardo Avenue Mountain View, CA 94043

Unit Microsoft Word. Microsoft Word is the word processor included in Office. Word is one of the most popular word processors.

Word 2010 Getting Started with Word. Introduction. Getting to know Word The Ribbon. Video: Exploring Your Word 2010 Environment

Introduction to Microsoft Excel 2007

4. Some computers may also be customised so that a program such as Word can be started using a keyboard command.

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2005

Microsoft Word 2011: Basic Tutorial

You ll notice at the bottom of the file menu there is a list of recently opened files. You can click a file name in the list to re-open that file.

Word 2007/10/13 1 Introduction

Boise State University. Getting To Know FrontPage 2000: A Tutorial

Access. Basics PRESENTED BY THE TECHNOLOGY TRAINERS OF THE MONROE COUNTY LIBRARY SYSTEM

ELECTRONICS. Printed in Korea Code No.: GH A English. 06/2001. Rev.1.0. World Wide Web

Sage Getting Started Guide. September 2017

Word Processing. 2 Monroe County Library System

Getting Started with Entourage Mail For the Mac using OS X Keith Roberts

Dreamweaver MX The Basics

MCDOUGAL LITTELL EASYPLANNER USER S GUIDE

NAVIGATING WINDOWS. What is WINDOWS? DESKTOP ICON PROGRAM

Word 2010 Mail Merge. by Usman on March 05, 2010

A Guide to Quark Author Web Edition 2015

Enhancing PDF Documents - Adobe Acrobat DC Classroom in a Book (2015)

Compare and Merge Track Changes

If this is the first time you have run SSMS, I recommend setting up the startup options so that the environment is set up the way you want it.

QuickStart Guide MindManager 7 MAC

Introduction. Key features and lab exercises to familiarize new users to the Visual environment

Windows XP. A Quick Tour of Windows XP Features

PowerPoint Launching PowerPointX

Ticket Mail Merge Instructions for MS Word 2007 and 2010

Send the Ctrl-Alt-Delete key sequence to the Guest OS one of two ways: Key sequence: Ctlr-Alt-Ins Menu Sequence: VM / Guest / Send Ctrl-Alt-Delete

Office 2007 Overview

Word 2007 Appendix B Copy Student Files to Hard Drive

Quick Tips & Tricks. Important You must use SEMICOLONS ( ie; ) to separate address when sending mail to multiple users

The Newsletter will contain a Title for the newsletter, a regular border, columns, Page numbers, Header and Footer and two images.

EXCEL BASICS: MICROSOFT OFFICE 2007

Section 2. Opening and Editing Documents

PEACHTREE COMPLETE 2008 AN INTRODUCTION TO PEACHTREE COMPLETE ACCOUNTING

Single User Installation Guide

Computer Basics. Hardware. This class is designed to cover the following basics:

ImageNow Interact for Microsoft Office Installation and Setup Guide

9.4 Authentication Server

Artistic Text. Basics 1

The following instructions cover how to edit an existing report in IBM Cognos Analytics.

Chapter 3 Using Styles and Templates

Interface. 2. Interface Adobe InDesign CS2 H O T

Windows Me Navigating

Computer Essentials Session 1 Lesson Plan

Using Microsoft Word. Getting Started With Word. Starting the Program

Downloading and editing signatures!

Palm Reader Handbook

Creating an Outlook Auto-Response Rule for Departmental Accounts

CSCI 161: Introduction to Programming I Lab 1b: Hello, World (Eclipse, Java)

Introduction to MS Word XP 2002: An Overview

Managing Files. In this chapter

Script Host 2.0 Developer's Guide

SQL Server. Management Studio. Chapter 3. In This Chapter. Management Studio. c Introduction to SQL Server

NDA ISSUE 1 STOCK # MATWorX 32 User s Guide. December, NEC America, Inc.

MICROSOFT WORD 2010 Quick Reference Guide

To Do Panel. Contents

CHAPTER 1 GETTING STARTED

Parallels Desktop 4.0 Switch to Mac Edition. Migrate your PC Tutorial.

Rev. C 11/09/2010 Downers Grove Public Library Page 1 of 41

Quickest way to transfer leads into your Microsoft Excel Work Sheet

1. Navigation and menus

Microsoft Excel 2007

Calendar Module Enhancements User Guide

IBM NetBAY Virtual Console Software. Installer and User Guide

Step-by. A Very Warm Welcome to the Exciting World of Computers. Let s get Started It s easy with my Step- Instructions

EDS8/16/32PR Quick Start Guide

USER MANUAL. AZI COMPUTRAC GRAPH for Microsoft Excel

Get Started. Estimating Explorer

Using Microsoft Access

Print Station. Point-and-Click Printing WHITE PAPER

_APP A_541_10/31/06. Appendix A. Backing Up Your Project Files

Data entry is the bread and butter of any spreadsheet you create or edit. The exercises

Connect to the Internet and surf the Web. Get technical support. Download and install programs automatically from the Click-N-Run Warehouse

1. Right-click the worksheet tab you want to rename. The worksheet menu appears. 2. Select Rename.

Transcription:

Your First 20 Minutes Contents Before Installing PrimalScript Install PrimalScript Launch PrimalScript Set Script and Project Folders Create a New Script Insert WMI Code Use PrimalSense Run a Script with Arguments Add a Function PrimalScript Your First 20 Minutes Start here to be productive with PrimalScript in just 20 minutes

2 PrimalScript - Your First 20 Minutes Before Installing PrimalScript To take advantage of all possible features of PrimalScript, there are several things that should be installed before installing PrimalScript. Install Internet Information Services (IIS) In order to take advantage of PrimalScript s ability to create virtual web folders and to run your web projects on your local computer, Internet Information Services must be installed. While it is not required, it is recommended that you install IIS before you install PrimalScript. Make sure to install WSH 5.6. To enable all Windows Script Host features of PrimalScript, it is necessary to install WSH 5.6. Information on downloading the WSH can be found at www.sapien.com/wsh.htm. For older machines, download and install the latest WMI libraries. To enable the use of WMI scripting on a Windows 98 or Windows NT machine, you will need to download and install WMI. See details at www.sapien.com/wmi.htm.

PrimalScript - Your First 20 Minutes 3 Install PrimalScript Start the clock. Installing PrimalScript takes just a few minutes, so the beginning of your 20 minutes starts here. To begin, place the PrimalScript CD into your computer s CD-ROM or DVD drive, and you should see the following autostart program. If the autostart program does not appear, manually run the cdstart.exe program from the PrimalScript CD by selecting the Run option from the Windows Start menu and running the program X:\cdstart.exe (where X: is the drive letter of your CD- ROM or DVD drive). To launch the PrimalScript installer, select Install PrimalScript from the main menu of the autostart program. Follow the screens in the installer and PrimalScript will be installed within just a few minutes.

4 PrimalScript - Your First 20 Minutes Launch PrimalScript Now that installation is complete, launch PrimalScript by double-clicking on the PrimalScript icon that the installer created for you or start PrimalScript from the Windows Start menu. Start PrimalScript via the Windows Start Menu. When PrimalScript starts for the first time, you will see a Getting Started page on the right side of the main window. On this page you will find all last minute updates and additional information about how to get started with PrimalScript. PrimalScript showing the Tools Nexus on the left and the Getting Started page on the right.

PrimalScript - Your First 20 Minutes 5 Set Script and Project Folders Before you begin creating projects, you can set the folders in which you want your new scripts and projects to be created. Select Options... from the Tools menu. By default, PrimalScript sets the project folder to: c:\program Files\SAPIEN\ PrimalScript\Projects You ll see the main Options screen for PrimalScript. ere is a tree on the left that allows you to navigate among all the options screens. Select the Directories branch under the Environment node. Change the My Scripts field and the Projects field to folders on your computer where scripts and projects will be stored by default, then click Ok. The Options dialog box holds a wide array of settings to personalize the way you use PrimalScript. Select each node in the tree to see the various screens.

6 PrimalScript - Your First 20 Minutes Create a New Script Now that we have a default location for our new scripts and projects, we are going to jump right into the process of creating a WMI script that shows the Startup commands for your computer. We ll get acquainted with the PrimalScript main window and more as we go along. Start by clicking the small arrow next to the new button on the toolbar and select new VBScript file as shown here. Start a new VBScript file using the New File button on the toolbar. e new VBScript file, based on the VBScript file template is shown in the PrimalScript editing window.

PrimalScript - Your First 20 Minutes 7 The VBScript file template is customizable by editing the vbscript.vbs file in the PrimalScript program folder (c:\program Files\SAPIEN\PrimalScript, by default). e caret is blinking next to the word Name in the comment header. Type MyScript.vbs, then use the down arrow key to move the caret to line 14. Save your work often by clicking on the Save button on the toolbar. Now is a good time to save and name our new script. Right click on the document tab labeled untitled.vbs and select Save from the context menu. Insert WMI Code At this point we start to get down to business by adding code that will use WMI to show the Startup commands that are currently installed to load on your computer. The WMI Script Wizard can also be started by selecting WMI Wizard from the Script menu. Start the WMI Script Wizard by clicking on its toolbar button above the editor window.

8 PrimalScript - Your First 20 Minutes The WMI Wizard is the fast way to insert WMI code into your file. Since we are going to be looking at Startup commands, select the Win32_StartupCommand class in the left pane of the wizard. Sample code appears on the right side of the window. Click the Insert button to insert the new WMI sample code into the editor window at line 14 where your caret was last. A working WMI script that displays the Startup commands for the local machine. The Run Script button on the toolbar: Click the Run Script button on the toolbar to view the output of this quick script.

PrimalScript - Your First 20 Minutes 9 Without having coded anything yet, the output shows that we have a script that displays quite a lot of information about Startup commands on a computer. No coding yet, but we have our first script. Click on the MyScript.vbs file tab above the editor window to return to your new script. Use PrimalSense PrimalSense is the key to fast development. Keep your fingers on the keyboard and make fewer mistakes. Now we ll enter some code and work with PrimalSense. First let s simplify the output of our script by deleting several lines of code that the wizard provided for us. Select lines 24 through 29 and press the Delete key leaving just the caption as the output for every Startup command. Run the script again to see the simplified output. Auto-case Correction & Pop-up Member Lists After line 19, add a few blank lines. Type the word wscript and a period and PrimalSense does two things: it automatically corrects the case of the word WScript and a pop-up window displays the members of the WScript object.

10 PrimalScript - Your First 20 Minutes Now type E and the word Echo is selected in the list. Press the Enter key to insert the word Echo into your code. Finish the line by typing a SPACE and Startup commands - & strcomputer. Press Enter to start a new line and type wscript.stdo and StdOut is highlighted in the pop-up list of members. PrimalSense for the WScript object: autocase correction and member list. Press Enter to insert StdOut and then type another period to see PrimalScript s new multi-level PrimalSense and select WriteBlankLines from the list, press Enter and type a 1.

PrimalScript - Your First 20 Minutes 11 Multi-level PrimalSense for the StdOut object inside the WScript object. And our script is ready to run again. Add code to detect arguments to the script and watch PrimalSense help. Using the screen shown here as a guide, add code at line 21 to check the arguments to this script. As you type, take note of the PrimalSense pop-up windows that appear and continue to get familiar with how they operate.

12 PrimalScript - Your First 20 Minutes e code we just added looks at the arguments coming into the script and assigns the first argument as the computer name for which you d like to see Startup commands. Run a Script with Arguments PrimalScript lets us easily run a script for which we will be asked to enter arguments. Using the down arrow next to the Run Script button, select Run Script with arguments. The Run Script button has a drop down menu for running with and without arguments. PrimalScript will show the script arguments dialog box for you to enter arguments for this script. For this exercise, enter the name of your computer or the name of a computer on your network if you have Domain Administrator rights for your network, click Ok. The Arguments (or Parameters) that you enter are saved in a the history list for future use.

PrimalScript - Your First 20 Minutes 13 Now your script is run using that argument and the script tries to display the Startup commands for the machine whose name you entered. If you do not enter a name, the script defaults to the local machine. With the caret right of the snippet name, press CTRL-J to insert that snippet. Add a Function Now we will add a function to the code to demonstrate both code snippets, code completion and function parameter help. At the end of the file, type the word function and press CTRL-J to enact the insertion of the code snippet named function. The function snippet after insertion. All snippets are stored in the Snippets Nexus. A fast way to move a highlighted section of code is to simply click in it drag it to its destination. Call the name of the function GetStartupCommands and give it a parameter called strcomputer. Highlight lines 28 through 34 and drag them inside the function. While those lines are still highlighted, press the TAB key to indent the whole block. The completed function.

14 PrimalScript - Your First 20 Minutes Code Completion Now we need to call this function from the body of the script. On line 28, we will add some code by typing getst and then pressing CTRL-SPACE to enact code completion. PrimalScript fills in the function name GetStartupCommands. Press the space bar and PrimalScript displays parameter help for the function that we are calling. Parameter Help Type strcomputer as your parameter and save your file. You now have a functioning script for checking the Startup commands for any computer. The completed script. Running the script again with no arguments results in the listing of Startup commands for the local machine, which is represented as a period (.). Here is the output window when our script is run with arguments and we enter a machine name ballistic as the argument.

PrimalScript - Your First 20 Minutes 15 Final output using Ballistic as the argument to the script. Stop the Clock! at was your first 20 minutes with PrimalScript. We hope you enjoyed this quick tour. You ve actually learned a lot in less than 1 2 an hour! You now know how to change program options, create new script files, insert WMI script code, use PrimalSense for faster script development, and run scripts with arguments. More information and support. For more information, view the PrimalScript help file by selecting Index and Contents from the Help menu. You may also send e-mail to support@sapien.com with any questions about using PrimalScript. anks for choosing PrimalScript and we look forward to working with you long into the future!

PrimalScript, PrimalCode, and PrimalSense are either trademarks or registered trademarks of SAPIEN Technologies, Inc. All other trademarks are the property of their respective owners. Copyright 2003,2004 SAPIEN Technologies, Inc. All Rights Reserved. SAPIEN Technologies, Inc. 3212 Jefferson Street, #288 Napa, CA 94558 1-707-252-8700 1-866-PRIMALS (774-6257) Toll Free 1-707-598-0160 FAX http://www.sapien.com ps31_gs_20040101