Starting Alpha Anywhere With Command Line Options

Command line options available for use with Alpha Anywhere include:

  • -A=application 

    Runs an application. It starts the first (usually HOME) card - the user is not able to choose which card is first. This is a carryover from A5v1.

    -A=StackName
  • -ALLOWDEBUG 

    Allow debugging.

  • -COMMAND=Xbasic_cmd 

    Runs the specified Xbasic commands after Alpha Anywhere starts.

    If you use this option to define a variable, it will not be available until after any AUTOEXEC script runs.
  • -CONFIGFILE 

    Load command line options from file.

  • -EXECUTEANDEXIT 

    Shuts down Alpha Anywhere after the command executes. This switch allows you to call existing scripts without having to modify these scripts and add a command to close Alpha Anywhere at the end of the script.

    alpha5.exe "c:\test\batchcommand" -hide -nosplash -executeandexit -command=script_play("MyCommand")
    The command will execute before the Control Panel has loaded. Therefore, you need to fully qualify table names in scripts (e.g. table.open("c:\data\customer") because the Control Panel will not be available to resolve short names.
  • -EXEPATH 

    Override the Alpha Anywhere exe_path.

    -EXEPATH="c:\test\"
  • -FULLSCREEN 

    Size the Alpha Anywhere window to cover the entire screen.

  • -HELP or -? 

    Display the command line options.

    -HELP
  • -HIDE 

    Starts Alpha Anywhere and immediately hides it.

    alpha5.exe "c:\test\batchcommand" -hide -nosplash -executeandexit -command=script_play("MyCommand")
  • -ICON=i con_name 

    Change the icon that displays on Alpha Anywhere title bar.

    -ICON=logo.ico
  • -INCLUDE=filename 

    When you have more command line options than can fit on one line, you can create an ASCII file with the command line options in the file. Put one option per line. Use this option to specify the name of the ASCII file.

    -INCLUDE=start.txt
  • -LOG 

    Logs addin commands to a file.

    -LOG=log.txt
  • -MAXIMIZE 

    Start Alpha Anywhere maximized

    -MAXIMIZE
  • -MINIMIZE 

    Start Alpha Anywhere minimized

    -MINIMIZE
  • -NOASSOC 

    Tells Alpha Anywhere not to register Alpha Anywhere file types. This command is only useful if the user does not have permission to write in the registry, which is not recommended.

    -NOASSOC
  • -NODBCHECK 

    Reduces CPU usage by turning off the periodic checking to see if the database (.ADB) file has changed. This improves performance, especially if you are running lots of copies of Alpha Anywhere on one machine. If you are not adding layouts to a database, you can safely set this flag. (i.e. use this on an end user's installation - which gets updates infrequently, but not on your development system where you are often adding forms, browses, reports, scripts, etc.)

    -NODBCHECK
  • -NODEBUG 

    Turns off the Xbasic Debugger. If you do not debug, the Xbasic script is just hogging extra memory and clock cycles.

    -NODEBUG
  • -NOFLOW 

    Disable the flow thread (affects legacy asynchronous code).

  • -NOMINMAX 

    Disable ability to minimize or maximize the Alpha Anywhere main window

    -NOMINMAX
  • -NOSPLASH 

    Do not display a splash screen when Alpha Anywhere loads.

    -NOSPLASH
  • -NOSIZE 

    Disable ability to resize the Alpha Anywhere main window.

    -NOSIZE
  • -NOSYSMENU 

    Open Alpha Anywhere without a system menu on the main Alpha Anywhere window.

    -NOSYSMENU
  • -PROCESSOR=cpu_index 

    When running on a multi-processor computer, selects the primary processor for Alpha Anywhere. This applies to multiple physical processors, multiple cores and multiple virtual processors (Hyper-Threading CPUs). cpu_index is zero-based. If the specified cpu_index is higher than the number of processors available on the system, it is ignored.

    -PROCESSOR=1
  • -SINGLESTEP 

    Single step through loading of addins.

  • -SPLASH=bitmap_name 

    Change the splash screen bitmap that displays when Alpha Anywhere loads.

    -SPLASH=clock.bmp
  • -TITLE=title" 

    Change the displayed title for the main Alpha Anywhere window.

    -TITLE="Customers"

Notes 

For the command line parameters that take an argument (e.g. TITLE, SPLASH, ICON etc.) you must be sure not to include a space either before or after the " = " sign. For example:

-title="My Title"

not

-title=" My Title"

Although you can start the line with just "Alpha5.exe " (or even just Alpha5 ), the system must be able to find the program. If the directory that contains the Alpha5.exe program is not included in the list of directories to be searched when starting a program, then you must include the full path name of the program. For example:

C:\A5v5\alpha5.exe .....

The recommendation is to be safe and always include the full path. The default for the " -icon ", " -splash ", and " -include " options is the Alpha Anywhere program directory. If any of these items are in another directory, they will also require the full path name. Any path name that includes blank spaces must be enclosed in quotes. When there are no spaces, quotes are optional. This is a Windows issue; not an Alpha Anywhere issue. (Note the space between Program and Files in the example below.)

Examples 

Start Alpha Anywhere and start the sample invoice application that comes with Alpha Anywhere. Do not display the startup splash screen.

"C:\Program Files\A5V5\Alpha5.exe" "C:\Program Files\A5V5\Samples\Invoice\invoice.adb" -nosplash

Start Alpha Anywhere. Do not display the startup splash screen. Change the tile and icon on the title bar.

"C:\Program Files\A5V5\Alpha5.exe" -title="My Own Title" -icon="c:\windows\myicon.ico"

Assume the A5 runtime program is located at C:\Program Files\A5v5Runtime\Alpha.exe and the application .adb file is located at C:\rms\rms.adb. The icon Target might look like this:

"C:\Program Files\A5v5Runtime\Alpha.exe" C:\rms\rms.adb -nosplash -title="RMS Applications" -icon="c:\rms\data\rms.ico"

In this case, the icon "Start in" folder should be C:\rms which is the application path - without the filename of the application itself.

See Also