O'Reilly logo

Rapid Application Development with Mozilla™ by Nigel McFarlane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

16.2. General-Purpose Scripting

This topic explains how to solve generic programming tasks using Mozilla.

16.2.1. Command-Line Arguments

When the Mozilla Platform is started up via the command line, it remembers the command-line arguments passed in. On Microsoft Windows, the platform does not remember the command-line arguments used to start up further windows that are managed by the same running instance.

To access the command-line arguments, use this component and interface:

@mozilla.org/appShell/commandLineService;1 nsICmdLineService

The nsICmdLineService exposes argc, the count of arguments, but not argv, the list of strings making up the arguments. The argc count is the number of argument-value pairs, not the number of whitespace-separated ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required