The XHTML WYSIWYG Editor For Desktop & Web Applications

FAQs

General FAQs

Are There Any Limitations To The Eval Version of ScriptQ?

Only a time limit of 15 days.

What Is The Difference Between Microsoft® Windows® Script Host And ScriptQ?

Windows Script Host (WSH) and ScriptQ use the same Microsoft scripting engine to execute jobs, but the resemblence stops there. ScriptQ is not a replacement for WSH. WSH was designed primarily to enable System Administrators to automate small numbers of commonly executed tasks, and most WSH jobs are launched manually or by scheduler applications. ScriptQ is designed primarily to allow programmers to add scalibility, availability and reliability to their applications. Most ScriptQ jobs are launched by client applications, without user interaction and with the objective of executing large numbers of jobs as quickly as possible, without putting undue stress on computing resources.

Licensing FAQs

How Is ScriptQ Licensed?

Per server.

What Is The Cost Of A Per Server License?

$2,950 US. This includes free email technical support and all point releases.

Are There Development Or Staging Licenses Available?

No, a server is a server.

Are There Site, Enterprise, OEM Or Volume Licenses?

Yes. Please contact us outlining your requirements.

Are There Per Client Fees In Shared Server Environments?

No. If your ISP/ASP has ScriptQ installed on its servers, you can use it free of charge.

Object Model FAQs

What Is The Object Model In ScriptQ?

When we talk about Object Model, we referer to the functionality available to scripts while executing. ScriptQ provides an object called ScriptQ that is automatically instantiated when a script runs. That means scripts don't have to create this object because it is always available. This object provides the functionality to pause or stop job execution, to write to a file, execute an operating system command, write to a log file, access shared memory and get information about the jobs that are running.

How Do I Write To The Log File?

The ScriptQ.Echo() method writes a message to the log file. For example:

ScriptQ.Echo "Hello World!"

The message is prefaced by the date and time in ISO8601 format. For example:

2004-10-15 14:12:00 Hello World!

How Do I Halt Job Execution?

The ScriptQ.Quit() method terminates job execution. For example:

If x > 5 Then ScriptQ.Quit()

How Do I Pause Job Execution?

The ScriptQ.Sleep() method pauses job execution. It takes a single parameter which is the number of milliseconds for the pause delay. For example:

  1. ScriptQ.Sleep 1000

How Can A Running Job Get Information About Itself?

Information about a job's priority level, the job's ID and description, the job execution attempt number and the job script itself are all available from ScriptQ object. The following properties and methods can be used by a running job to get information about itself:

FunctionJobArguments()

An array of arguments for the job.

PropertyJobAsync As Boolean

(read-only)
Determine if the job is executing asynchronously.

PropertyJobDescription As String

(read-only)
Description for the job.

PropertyJobExecutionAttempt As Long

(read-only)
Number of times the execution of the job has been attemped.

PropertyJobGroupID As String

(read-only)
Grouping ID for the job.

PropertyJobID As String

(read-only)
ID for the job.

PropertyJobLanguage As String

(read-only)
Script language for the job.

PropertyJobPriority As Long

(read-only)
Priority for the job.

PropertyJobRetryCount As Long

(read-only)
Number of attempts to retry executing the job if the job fails.

PropertyJobRetryDelay As Long

(read-only)
Seconds before a re-try is attemped when the job fails.

PropertyJobScript As String

(read-only)
Script for the job.

PropertyJobTimeout As Long

(read-only)
Milliseconds before the job times out.

How Do I Write To A File?

The ScriptQ.WriteToFile() method overwrites the contents of a file with the given text. If the file does not exist, one will be created. For example:

  1. ScriptQ.WriteToFile "C:\Greeting.txt", "Hello World!"

The ScriptQ.AppendToFile() method writes the given text to the end of the file. If the file does not exist, one will be created. For example:

  1. ScriptQ.AppendToFile "C:\Greeting.txt", "Hello World!"

Both these methods are the preferred way to write to a file, because they prevent multiple jobs from writing to a file at the same time.

How Do I Execute An Operating System Command, WSH File Or An Application?

The ScriptQ.Run() method can be used to call external applications and scripts. The following example gets a directory listing and writes it to a file:

  1. ScriptQ.Run "cmd /C dir C:\ > ""C:\dir.txt"""

This example stops the IIS Admin Service:

  1. ScriptQ.Run "net stop IISADMIN /y"

The following example can launch applications. Note, ScriptQ is a server-side application and cannot spawn any process that has a GUI. This means that applications lauched using ScriptQ.Run() cannot have user-interfaces. For example:

  1. ScriptQ.Run "C:\Program Files\My App\myapp.exe"

ScriptQ can even launch WSH scripts. Note, the script should not have any user-interface such as MsgBox() functionality. For example:

  1. ScriptQ.Run "C:\"MyScript.vbs"

Shared Memory FAQs

What Is Shared Memory In ScriptQ?

Scripts executing in ScriptQ can share data using ScriptQ shared memory.

What Does The Memory Structure Look Like?

The memory structure is very similar to a Dictionary object or an Associative Array - it is a list of key-value pairs. The illustration below show a graphical representation of ScriptQ shared memory.

KeysItems
nameJohn Smith
age34
address12 Main St.
registeredtrue

How Do I Add Data To Shared Memory?

Items can be added to shared memory by calling the ScriptQ.SharedAdd() method. This method takes two parameters, the key and the item. The key is similar to an index and can be text or a number and is case-sensitive. The item is the value associated with the key and can be text, number or boolean value. For example:

  1. ScriptQ.SharedAdd "name", "John Smith"

How Do I Retrieve Data From Shared Memory?

Data can be retrieved from shared memory using the ScriptQ.SharedItem() property. For example:

  1. ScriptQ.Echo ScriptQ.SharedItem("name")

How Do I Enumerate Data In Shared Memory?

To get an array of keys, use the ScriptQ.SharedKeys() function as an enumeration for the For-Each loop. For example:

  1. Dim varKey
  2. For Each varKey In ScriptQ.SharedKeys()
  3. ScriptQ.Echo varKey & " = " & ScriptQ.SharedItem(varKey)
  4. Next

How Do I Determine If A Key Already Exists?

To determine if a specific key exists in shared memory, use the ScriptQ.SharedExists() function. For example:

ScriptQ.Echo ScriptQ.SharedExists("name")

What Happens When Duplicate Keys Are Added?

The new data will replace existing data in shared memory.

When Should I Use ScriptQ.SharedLock() And ScriptQ.SharedUnlock()?

ScriptQ can execute jobs on multiple threads, so it is possible to have two or more jobs attempting to write to the same location in shared memory. In this event, ScriptQ has a built-in mechanism that sequences the requests correctly. However, there may be situations when a job may need to explicitly lock out other jobs from writing data to or removing data from shared memory. For example, a job may read data from shared memory, manipulate the data in some way and then write the new data back to shared memory. To ensure that no other job changes the data in the meantime, just before reading the data the job can lock shared memory and then unlock it after it has written data back to it.

How Does Shared Memory Locking And Unlocking Work?

When a job locks shared memory, ScriptQ blocks all requests from other jobs to write data to or remove data from shared memory but permits full access to the job that locked shared memory. Other jobs can still read data from shared memory, but they can't modify it. When another job attempts to write to shared memory and is locked-out, the job will block or wait until shared memory is unlocked.

How Does ScriptQ.SharedIsLocked() Work?

This function returns True if the current script is locked-out from modifying shared memory and returns False when it has access to modify shared memory.