Skip to content

Command Line

Launching Helium Scraper

Helium Scraper can be launched from the command line and receive arguments. To run it from the command line or a batch file, use the following line, replacing <User Name> with your user name and C:\ with your current drive:

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

Note that double quotes must be used whenever there are spaces in the command line.

The AppData environment variable can also be used for a shorter version:

"%AppData%\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper 3.appref-ms"

Opening Projects

It can also receive as an argument the path to a Helium Scraper (.hss) file, such as on this example (note that the UserProfile environment variable can be used as part of the project path):

"%AppData%\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper 3.appref-ms" "%UserProfile%\Documents\Helium Scraper 3\Projects\sample\sample.hss"

If the given path is relative, the default Helium Scraper projects folder is used. Also, if the project folder is specified but the project file name is not, a project with the same name is opened. Hence, the line above is equivalent to this shorter version:

"%AppData%\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper 3.appref-ms" "sample"

Running Extractions and Passing Arguments

If a question mark is added to the end of the project path, Helium Scraper will look for a global called Main in the project and run it:

"%AppData%\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper 3.appref-ms" "sample?"

If the execution completes without user interruption, the project will be saved and the application quit.

Arguments with arbitrary names can be passed after the question mark using the following syntax:

argument1=value1&argument2=value2&argument3=value3…

For example, the following command line would open a project, run the Main global and pass two arguments: username and password, with the values frank and 1234, respectively:

"%AppData%\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper 3.appref-ms" "sample?username=frank&password=1234"

The value of the received arguments can then be retrieved from within a global by using the Core.GetArgument function.

Scheduling

To run Helium Scraper from the Windows Task Scheduler, use cmd as the name of the Program/script to run, and as the argument enter /c "<command>", where <command> is the full command line you'd type in the Windows command line.

For instance, the following argument would have the same effect as the example above (note the additional double quotes):

/c ""%AppData%\Microsoft\Windows\Start Menu\Programs\Helium\Helium Scraper 3.appref-ms" "sample?username=frank&password=1234""