Command Line

Helium Scraper can be run from the command line and receive parameters. To run it from the command line or a batch file, use the following line (replacing {User Name} for your user name and C:\ for your current drive):

"C:\Users\{User Name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper.appref-ms"

Double quotes must be used whenever there are spaces in the command line. If you're running Window's Command Prompt and your current folder is C:\Users\{User Name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Helium\, you'd use the following command line to run Helium Scraper (including double quotes):

"Helium Scraper.appref-ms"

It can also receive as a parameter the path to a Helium Scraper (.hsp) file, such as on this example:

"C:\Users\{User Name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper.appref-ms" "C:\Users\{User Name}\Desktop\file.hsp"

If you add a question mark to the end of the file name, Helium Scraper will attempt to run an actions tree called Main in file.hsp:

"C:\Users\{User Name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper.appref-ms" "C:\Users\{User Name}\Desktop\file.hsp?"

This is particularly useful when used in combination with the Connect to Database File feature which can be found in the database panel. This way, data will be extracted to a single database file from every running instance. Also, you can pass parameters separated by the ampersand symbol after the question mark the same way you would pass parameters in a URL:

"C:\Users\{User Name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper.appref-ms" "C:\Users\{User Name}\Desktop\file.hsp?param1=value2&param2=value2"

Note that, even though these parameters use the same syntax as URL parameters, they are not related whatsoever to URLs Helium Scraper navigates to. However, they could be used to indicate the URL the instance to be launched will initially navigate to. These parameters can be accessed from any Execute JavaScript action in the Main actions tree with the GetParam method of the TreeObject object. For instance, to access the parameter param1 passed in the command line above, you would use Tree.GetParam("param1"). There are a few reserved parameters that are used internally by Helium Scraper and are not passed to the Execute JavaScript's code. In fact, no parameter starting with two dashes ("--") are passed to the javascript code:

The following line would run Helium Scraper, open file.hsp, navigate to http://www.example.com , run the Main actions tree, and save and close the application after the execution completes:

"C:\Users\{User Name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper.appref-ms" "C:\Users\{User Name}\Desktop\file.hsp?--starting-url=http://www.example.com&--auto-save=true&--auto-close=true"

To run Helium Scraper from the Windows Task Scheduler, use the Browse button when specifying the program to run, and navigate to C:\Users\{User Name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper.appref-ms instead of typing this path in the text box.

Helium Scraper can be run from the command line and receive parameters. To run it from the command line or a batch file, use the following line (replacing {User Name} for your user name and C:\ for your current drive):

"C:\Documents and Settings\{User name}\Start Menu\Programs\Helium\Helium Scraper.appref-ms"

Double quotes must be used whenever there are spaces in the command line. If you're running Window's Command Prompt and your current folder is C:\Documents and Settings\{User Name}\Start Menu\Programs\Helium\, you'd use the followind command line to run Helium Scraper (including double quotes):

"Helium Scraper.appref-ms"

It can also receive as a parameter the path to a Helium Scraper (.hsp) file, such as on this example:

"C:\Documents and Settings\{User name}\Start Menu\Programs\Helium\Helium Scraper.appref-ms" "C:\Documents and Settings\{User Name}\Desktop\file.hsp"

If you add a question mark to the end o the file name, Helium Scraper will attempt to run an actions tree called Main in file.hsp:

"C:\Documents and Settings\{User name}\Start Menu\Programs\Helium\Helium Scraper.appref-ms" "C:\Documents and Settings\{User Name}\Desktop\file.hsp?"

This is particularly useful when used in combination with the Connect to Database File feature which can be found in the database panel. This way, data will be extracted to a single database file from every running instance. Also, you can pass parameters separated by the ampersand symbol after the question mark the same way you would pass parameters in a URL:

"C:\Documents and Settings\{User name}\Start Menu\Programs\Helium\Helium Scraper.appref-ms" "C:\Documents and Settings\{User Name}\Desktop\file.hsp?param1=value2&param2=value2"

Note that, even though these parameters use the same syntax as URL parameters, they are not related whatsoever to URLs Helium Scraper navigates to. However, they could be used to indicate the URL the instance to be launched will initially navigate to. These parameters can be accessed from any Execute JavaScript action in the Main actions tree with the GetParam method of the TreeObject object. For instance, to access the parameter param1 passed in the command line above, you would use Tree.GetParam("param1"). There are a few reserved parameters that are used internally by Helium Scraper and are not passed to the Execute JavaScript's code. In fact, no parameter starting with two dashes ("--") are passed to the javascript code:

The following line would run Helium Scraper, open file.hsp, navigate to http://www.example.com , run the Main actions tree, and save and close the application after the execution completes:

"C:\Documents and Settings\{User name}\Start Menu\Programs\Helium\Helium Scraper.appref-ms" "C:\Documents and Settings\{User Name}\Desktop\file.hsp?--starting-url=http://www.example.com&--auto-save=true&--auto-close=true"

To run Helium Scraper from the Windows Task Scheduler, use the Browse button when specifying the program to run, and navigate to C:\Documents and Settings\{User Name}\Start Menu\Programs\Helium\Helium Scraper.appref-ms instead of typing this path in the text box.