Written by Alex Peters, 13/6/2005
The Alias Run Box functions similarly to your standard Windows Run box, except that it also allows you to execute PowerPro commands (like PowerPro's command line) and to execute one-word aliases that you define, with parameters passable to these aliases.
Aliases may exist as labels within the ARB script and/or as external scripts matching a user-specified wildcard. For those not interested in backward compatibility with internal aliases a lighter, 'external-only' edition without that facility is included.
This script uses features found only in PowerPro versions 4.1 and above.
Instructions vary depending on whether you are upgrading from a previous ARB version or performing a fresh install.
-
Open your existing
ARB.PowerPro
script (assuming that you haven't renamed the script) and copy all of your aliases into a new, temporary file; that is, every line following and including the first line that starts with an@
sign. -
Replace your copy of
ARB.PowerPro
with the copy from this archive. -
Add your own aliases to the bottom of the new copy.
-
Optionally modify the
CACHE_PATH
(formerlyAliasCachePath
) andHISTORY_PATH
(formerlyCmdHistoryPath
) variables to point to your desired locations again if you initially changed them. -
Extract the
ARB_Aliases
folder into your PowerProScripts
folder. If you wish to rename it, ensure that you update theEXT_PREFIX
variable in the script accordingly. -
Remove any PowerPro configuration references to
.ARB("Rebuild")
or.ARB("Refresh")
as this task is now performed automatically.
-
Extract
ARB.PowerPro
(orARB_External.PowerPro
if you don't want to define any aliases within the ARB script itself) into your PowerProScripts
folder, e.g.:C:\Program Files\PowerPro\Scripts\ARB.PowerPro
-
Optionally rename the script if you wish. If you choose to extract the 'external-only' edition, you may want to rename it to simply
ARB.PowerPro
. -
Optionally modify the
HISTORY_PATH
variable to point to your desired location. The file referenced by this path will hold the command history. -
If you extracted the 'hybrid' version of ARB (which also supports alias definitions internal to the script itself), optionally modify the
CACHE_PATH
variable to point to your desired location. The file referenced by this path will hold internal alias cache data. -
Extract the
ARB_Aliases
folder into your PowerProScripts
folder. If you wish to rename it, ensure that you update theEXT_PREFIX
variable in the script accordingly.
Set up a hotkey or bar button to execute the following command,
assuming that you have named the script ARB.PowerPro
:
.ARB
This will open ARB's input box.
Invoke ARB's input box in the way that you have programmed (e.g. hotkey, bar button, mouse click, etc.).
-
Enter the location of a program, folder, document or Internet resource to have that item opened.
-
Enter a PowerPro command to have it executed.
-
Enter the name of an alias that you have defined and optionally follow it with a space and parameters to execute this alias. After entering a few letters, any potential matches will appear beneath the text field. Pressing Tab will alternate through these choices.
You can create more complex aliases in the ARB_Aliases
folder of your
PowerPro Scripts
folder. Aliases can accept arguments via arg(1)
.
Refer to the existing alias definitions in this folder for a better
idea of how new ones are written.
The 'hybrid' version of ARB may also contain 'internal' aliases, found
by opening the script in a text editor and moving to the bottom of the
file. An internal alias is defined by preceding its name with an @
sign, and then every PowerPro command that follows it will be executed
until a Quit
instruction is reached. Examples of internal aliases
are not provided as use of external aliases is more highly recommended.
Questions and comments regarding this script can be posted to the PowerPro Yahoo! Group:
Bug reports and feature requests can be submitted on GitHub, where the code for this script is hosted:
Thanks to Ravi, Sean and Luciano Espirito Santo for coming up with the original idea and implementations.
- Externally defined aliases are supported; see the
EXT_PREFIX
variable in the script. - New internal aliases are automatically recognised, making the use
of
.ARB("Rebuild")
and.ARB("Refresh")
unnecessary. - The ARB box's initial value defaults to its last used command
string, removing the need for a
DefaultCmd
configuration variable. - Aliases
ARB_Add
,ARB_Remove
andARB_Edit
are no longer provided; using external aliases is now preferred. - All other previously internal aliases are now provided as external ones.
- The
ARB_Add
,ARB_Remove
andEval
aliases no longer require Standard Configuration to be enforced in order to work properly - The
DefaultCmd
variable has been introduced near the top of the script to aid customising the default entry in ARB's input box - The
ARB_Rebuild
andARB_Edit
aliases now execute without error - The
Eval
alias will now output to a message box if invoked with Shift+Enter
- The script no longer conforms to Standard Configuration and should
now function without modification on any PowerPro v4.1
configuration (currently with exception to the
ARB_Add
,ARB_Remove
andEval
aliases, which require Standard Configuration for the moment) ARB_Add
now adds a commented separator to newly created aliases- ARB now accepts any parameter besides "Rebuild" to load the alias cache and command history into memory
- Script:
- Modified to conform to standard configuration
- Renamed included
Add
,Rebuild
,Remove
andEdit
aliases toARB_Add
,ARB_Rebuild
,ARB_Remove
andARB_Edit
respectively, as per David Troesch's request - Renamed included
Acronym
alias toAcro
for ease of typing - Added
G
,Go
andEval
aliases -- comments on their usage are included within their definitions
- Documentation:
- Added revised plugin information to Requirements section
- Script:
- Complete rewrite
- Added
Remove
alias, as per David Troesch's request - Global variables are no longer created or modified
- ARB now responds to "Rebuild" as a parameter instead of "Refresh" -- this is intended to cause less confusion as to what is performed
###v1.1 (6/5/2004)
- Script:
- Added
Add
alias, as per David Troesch's request
- Added
- Documentation:
- Added Upgrading section
- Initial release