Hardware Commands


Performs a number of actions that deal with physical computer hardware.

The available commands are:

  Recordings
  Processor (CPU) Details
  Memory Details
  Video Details
  Storage Details
  Operating System Details
  Play Sound
  Play Tone
  Change Display Settings
  Disable Screen Saver
  Enable Screen Saver
  Serial Port Send
  Serial Port Receive



  Recordings
 

Records all of your actions, and plays them back exactly as they were recorded. Because they are exact representations of all computer interaction, they are sometimes referred to as "analog recordings" (not related to sound).

There are 2 types of recording methods: Software and Hardware. The Software method uses operating system hooks. This results in the most accurate recordings, however there are several disadvantages: 1) certain configurations (notably Windows Vista with default settings) may not allow this mode, 2) certain security settings may not allow operating system hooks to be installed, and 3) other programs can easily interfere during recordings.

The Hardware method works by polling the hardware for new activity. This method cannot be blocked by the operating system or other programs, and therefore is more portable. However, it may be less accurate than the Software recording method. The Hardware method is the preferred recording mode.

vTask stores the recorded actions (in analog mode) as ASCII translations of the binary event structure that Windows creates. This is not intended to be modified, and doing so may cause the playback (and your computer) to become unstable. This section is intended to give a brief overview for those who are interested.

There are four parts to each event: message, low parameter, high parameter, and time stamp. The message is the event that took place, which maps directly to the Windows Message Loop. The low parameter and high parameter are message-specific, so what the represent depends on the message. Mouse movements, for example, would likely use them for coordinates. Finally, the time stamp indicates how much time delay there is between each event, given in milliseconds (1/1000 of a second). There may be very little time between mouse events, and much more time between user keyboard events.

[0512-0441-0926-03418984]
[0512-0439-0926-03419046]
[0512-0438-0926-03419078]
[0512-0438-0924-03419093]
[0512-0438-0923-03419109]
[0512-0436-0921-03419109]
[0512-0435-0920-03419125]

Some common messages are:
So you can tell from the sample recording listed above that it consisted of a few mouse movements (0512).


  Processor (CPU) Details
 

Retrieves specific hardware information about the processor (CPU) in your computer.

The following are some examples of each option:

OptionSample Data
ManufacturerIntel
Architecturex86
Description"x86 Family 6 Model 26 Stepping 4, GenuineIntel"
Stepping4
ModelA
Family6
Extended Model1A
Extended Family6
Revision1a04
Number of Processors4
Speed2.54 GHz
Speed (CPU Test)3.2002401 GHz
Supported InstructionsMMX, SSE, SSE2, SSE3, SSSE3, SSSE4.1, SSSE4.2, Thermal Monitoring


The vTask returned hardware values match the same values from CPU-Z  (www.cpuid.com):



  Memory Details
 

Retrieves specific hardware information about the memory installed in your computer. This information can be used during your script to make decisions based on the capabilities of the PC.

The following are some examples of each option:

OptionSample Data
Total Memory (bytes)3211898880
Total Memory (K)3136620
Total Memory (MB)3063
Total Memory (GB)2.99
Free Memory (GB)2.45
Used Memory (GB)0.53
Percentage % Used17
Percentage % Remaining83


These values match the Windows listings, as shown below. However, be aware that "Free" and "Used" memory values may be slightly different. This is due to dynamic changes in memory allocation.






  Video Details
 

Retrieves specific hardware information about the graphics capabilities of your computer.

The following are some examples of each option:

OptionSample Data
Video Card Memory (bytes)522411776
Video Card Memory (MB)256
Monitor Frequency60
Color Depth32
Maximum Colors16777216 (16 Million, True Color)
Number of Monitors2
Resolution (monitor #1)1600 x 1200
Resolution (monitor #2)1280 x 1024



  Storage Details
 

Retrieves specific hardware information about the disk drive devices your computer. This can be hard drives, DVD/CDROM drives, memory cards, and mapped network drives.

There are multiple formatting options for the return number. This is because hard drive manufacturers usually refer to capacities with multiples of 1000, rather than 1024. These "SI" formats were established by the "International System of Units" committee. (Memory capacities, on the other hand, are usually referred to with the 1024 binary format).

The following are some examples of each option:

OptionSample Data
List of Drives
        C:  DEV_03
        D:  CD-ROM
        E:  BACKUP

Total Size (bytes)74341015552
Total Size (K)72598648
Total Size (MB)70897
Total Size (MB-SI)74341
Total Size (GB)69.2
Total Size (GB-SI)74.3
Total Size (TB)0.067
Total Size (TB-SI)0.074
Free Space38.4
Used Space35.8



  Operating System Details
 

Retrieves specific hardware information about the operating system (Windows).

The following are some examples of each option:

OptionSample Data
Description"Windows XP"
Version5.1
Major Version5
Minor Version1
Build Number2600
Service Packs"Service Pack 3"
Platform ID1
Product Type1
Suite Mask256
Computer Name"ATLANTIS"
Installation Folder"C:\WINDOWS"


For information regarding what vTask returns for the technical options such as "Product Type" or "Suite Mask," see the Microsoft technical reference at http://msdn.microsoft.com/en-us/library/ms724833%28VS.85%29.aspx.


  Play Sound
 

Plays a media sound file. This is usually a .WAV file. Windows includes many default WAV files, usually in the "C:\WINDOWS\Media" folder.

The sound can be play Synchronously or Asynchronously. The "Synchronous" option will start playing the sound, and will wait until it is completely finished before going to the next step in the script. "Asynchronous" will start playing the sound and immediately continue running the script at the next step. The sound will play in the background while the script continues running. If the media file is valid, but Windows cannot play it, this action may not generate an error.


  Play Tone
 

Plays a simple "tone" (or beep) through the computer's speaker. The default tone is F-sharp for 1/10 of a second. This action is useful for computers that have no sound card installed, or if all the Windows sounds have been disabled in the Control Panel.

The frequency can be in a range from 32 - 32,767. The duration is the time in milliseconds (1000 = 1 second). All speaker tones are played Synchronously, which means the tome will complete before continuing script execution. Because the tone goes through the default speaker, and not the sound system, the volume cannot be adjusted for tones.

Some common tones are:

Tone (Note)Frequency
G below C196
A220
A sharp233
B247
C262
C sharp277
D294
D sharp311
E330
F349
F sharp370 *
G392
G sharp415
silence (rest)0

* = Default tone if no configuration is provided

This short script plays "Happy Birthday":




  Change Display Settings
 

This allows you to change the display settings for the monitor. This can be helpful for various reasons, from configuring a computer setup, to allowing you to run a program with identical video settings on all computers.

Use this with caution, since changing the video settings to something unusable would not allow you to view the screen. Prior to changing the settings, vTask verifies that a valid mode was chosen. The drop-down menu next to the "Video Settings" field displays all available configurations as listed by your computer.


  Disable Screen Saver
 

Changes the Windows setting so that the screen saver will not automatically activate. This can be helpful to allow a command or script to run interrupted for a long time without the screen changing due to the screen saver.

The same action can be performed manually by going to the Control Panel - Display Properties - Screen Saver. This command is also available in the Tools - Options - Run Options dialog.


  Enable Screen Saver
 

Changes the Windows setting so that the screen saver will automatically activate after a short duration. It will reset the Screen Saver settings to the last timeout duration (wait) and screen saver selection that you had chosen.

The same action can be performed manually by going to the Control Panel - Display Properties - Screen Saver. This command is also available in the Tools - Options - Run Options dialog.


  Serial Port Send
  Serial Port Receive
 

Uses the COM: ports to perform an RS-232 serial transfer between two computers. A file, text, or other data can be transferred.

*Tip:  To do a serial transfer between computers, first start the Receiving PC, and then start the Sending PC. If you start the Sending PC first, the receiving side will not get the first bytes of the transfer.


During the transmission, the following notifications will be displayed in the Output window:

    Opening Serial Port on COM1...
    Receiving serial transmission...

*Tip:  In order for the serial transfer to work successfully, it is mandatory that all serial port settings match exactly between the two computers. Any differences whatsoever between the configurations (baud rate, stop bits, etc) will cause the transfer to fail or hang.

During the transmission, the byte count will be displayed in the status bar if the vTask IDE is running:



Since during a SEND command, the total byte count is known, a percentage is also displayed:



*Tip:  You can setup 2 separate PC's, each running vTask, to transfer files between the computers. Use the "File" destination for the Save Result option to save a file transferred from another computer.


Each of the communication parameters are described below. However, unless you are familiar with the technical details of RS-232 serial communications, it's best to leave all the settings with their default values. A single incorrect value, such as a wrong Stop Bit setting, will cause the entire transmission to fail.


*Tip:  The faster the Baud Rate, the more possibilities that an error can occur during transmission. If you encounter problems during a transfer, try lowering the Baud.


Baud rate is a measure of how fast data is moving between instruments that use serial communication. This number represents the number of binary bits transmitted per second (bits-per-second).

    Default Value:   9600


Data Bits: Each stream of bits are broke up in 5 to 8 bits called words. Usually, in the PC environment, you will find 7 or 8 bit words. The first is to accommodate all upper and lower case text characters in ASCII codes (the 127 characters). The latter one is used to exactly correspond to one byte. By convention, the least significant bit of the word is sent first and the most significant bit is sent last. When communicating the sender encodes the each word by adding a start bit in front and 1 or 2 stop bits at the end. Sometimes it will add a Parity bit between the last bit of the word and the first stop bit, this used as a data integrity check. This is often referred to as a data frame.

    Default Value:   8

Parity: An optional bit follows the data bits in the character frame. This is called the Parity bit. The parity bit, if present, also follows inverted logic: read 1 for negative voltage and 0 for positive voltage. This bit is included as a simple means of error checking.

    Default Value:   None

Stop Bits: The last part of a character frame consists of 1, 1.5, or 2 stop bits. These bits are always represented by a negative voltage. If no further characters are transmitted, the line stays in the negative (MARK) condition. The transmission of the next character frame, if any, is heralded by a start bit of positive (SPACE) voltage.

    Default Value:   1

Flow Control: This is the means by which the flow of data is controlled. This is also known as "Handshaking".

    Default Value:   Hardware