AP - The Recognized Standard In Audio Test

Login / Register Contact

Home Solutions Products Downloads Service & Support Sales & Lease About News

Share with Friend
  • Service & Support
  • Overview
  • Knowledge Base
  • Training
  • Solutions Partners
  • Service Offerings
  • Schedule Service
  • Calibration
  • Shipping Instructions
  • Downloads
  • AP Warranty terms and conditions
  • AP Calibration Services Datasheet

Knowledge BaseHOME/SERVICE & SUPPORT/KNOWLEDGE BASE

Automatically run an AP2700 macro using runpro

Created 12 Dec 2008

Question:   I have a final test macro that calls several other macros, and I would like it to start running automatically as soon as it is opened.

Resolution:

The easiest way to automatically run a macro (formerly called "procedure" in APWin) when it is opened is to append a switch command onto a desktop shortcut.

  1. Create a generic shortcut to your AP control software.
  2. Click the shortcut icon, select "Properties", then the "Shortcut" tab.
  3. The program file location should appear in the "Target" line.  For example, using AP2700:  "C:\Program Files\Audio Precision\AP2700\AP2700.exe"
  4. To open with a macro running, add: 
    /RUNPRO "path\procedurename.apb". 
  5. The command line now looks like:
    "C:\Program Files\Audio Precision\AP2700\AP2700.exe" /RUNPRO "path\procedurename.apb"

 /RUNPRO is the switch that starts AP2700 with the macro running.  Note the space before the "/".

Replace "procedurename.apb" with the full path and file name of the macro you want to run.  Quotes are required if long file names or spaces exist in the path or filename.  Ex.: "c:\apwin\IntervuMenu.APB"
If any other "/" switches are to be used, then attach them to the end of the "Target" line.

You should rename the shortcut so it is easy to understand.  If you don't wish to use the standard AP2700 icon, you may choose another using the "Change Icon" button in the shortcut properties.

To load the procedure at startup but NOT run it, simply specify the path and file name after AP2700.exe without the /RUNPRO switch.

Related:
There is an AP Basic command for making the macro editor invisible (often included in macros):
AP.Application.VisibleMacroEditor(True or False)

There is also a command for making ALL of APWIN invisible - but use with Caution!
AP.Application.Visible = (True or False)
You will have to close APWIN and reopen it to make it visible again, unless code is included in the procedure to return visibility. Use the task manager (Ctrl-Alt-Del) to see a list of running programs.

 


Return to Knowledge Base home

Comments

0 comments so far

Please log in to add a comment.

Back To Top

Accredited by A2LA

Browse Products View Solutions Schedule a Demo Get Service Register

Audio Precision

Copyright © 2009 Audio Precision Inc. All Rights Reserved.    |  Privacy Policy