Referencing Objects by Script


Whether objects have been scraped from a received webpage, or objects have been parsed from an SNMP message, objects in the Message Contents panel can be acted upon by script. Whenever there are contents in the Message Contents panel (scraped from a webpage or received SNMP message), any expression on the script panel can reference those object values.

The syntax for referencing an object value on the Message Contents panel is as Object.name.

In the example below, there are 3 object names from a frames page, assigned the names Frame1, Frame2, and Frame3. The scraped value assigned to any of these can be referenced as Object.Frame1, Object.Frame2, or Object.Frame3. As can be seen in the example, the value assigned to Frame1 is assigned to DataFileFilename.

A good lesson is that when scraping values from a webpage, do not assign any duplicate object names, as it'd be impossible to distinguish between them by script.


© 2014 ComroeStudios LLC. All Rights Reserved.