User Tools

Site Tools


manual:Plug_In_Actions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
manual:Plug_In_Actions [2021/06/01 13:13]
JMichaelTX [PIA PList]
manual:Plug_In_Actions [2021/06/01 23:58]
JMichaelTX [Plist Parameters]
Line 42: Line 42:
  
 **Steps to Create a PIA** **Steps to Create a PIA**
-  - Create a folder on your local drive, using the same name that you will use for the PIA, put the following files in this folder. +  - **Folder:​**  ​Create a folder on your local drive, using the same name that you will use for the PIA, put the following files in this folder. 
-  - Create a file named FILE{{{Keyboard Maestro Action.plist}}},​ which is a standard [Cocoa Property list](https://​developer.apple.com/​library/​archive/​documentation/​General/​Conceptual/​DevPedia-CocoaCore/​PropertyList.html) file that defines the PIA form.+  - **Plist:​**  ​Create a file named FILE{{{Keyboard Maestro Action.plist}}},​ which is a standard [Cocoa Property list](https://​developer.apple.com/​library/​archive/​documentation/​General/​Conceptual/​DevPedia-CocoaCore/​PropertyList.html) file that defines the PIA form.
     * See [[Plug_In_Actions#​PIA_PList|PIA Plist Definition]] below.     * See [[Plug_In_Actions#​PIA_PList|PIA Plist Definition]] below.
     * The PIA Plist is an XML which defines the Action form you see in the Keyboard Maestro Editor, and identifies the name of the script file that will be run when the PIA is executed in a triggered macro.     * The PIA Plist is an XML which defines the Action form you see in the Keyboard Maestro Editor, and identifies the name of the script file that will be run when the PIA is executed in a triggered macro.
-  - Create a script file named FILE{{{Action.scpt}}},​ or other suitable name (like the name of your PIA), which can be an AppleScript,​ JXA, or Shell Script, to process the data from the PIA form. +  - **Script:​**  ​Create a script file named FILE{{{Action.scpt}}},​ or other suitable name (like the name of your PIA), which can be an AppleScript,​ JXA, or Shell Script, to process the data from the PIA form. 
-  - Create FILE{{{icon.png}}} which is the icon that will be displayed in the Keyboard Maestro Editor. ​ This file is optional. +  - **Icon:​**  ​Create FILE{{{icon.png}}} which is the icon that will be displayed in the Keyboard Maestro Editor. ​ This file is optional. 
-  - When you are finished with all of these files, create a `.zip` archive from the PIA Folder.+  - **Zip Install File:​** ​When you are finished with all of these files, create a `.zip` archive from the PIA Folder.
  
 ==== PIA Folder ==== ==== PIA Folder ====
Line 86: Line 86:
  
 ==== Plist Parameters ==== ==== Plist Parameters ====
- 
- 
-Each parameter in the Parameters array is a dictionary with the following keys: 
  
 ^ Parameter Key ^ Description ^ ^ Parameter Key ^ Description ^
-^ Label | **Name of the parameter**.\\ The same rules as Keyboard Maestro Variable Names apply.\\ The label is displayed to the user and used to pass the parameter to the script.\\ Obviously, the label must be unique amongst all parameters | +^ Label | **Name of the parameter**.<​WRAP>​ 
-^ Type | **Type of the parameter**.\\ Must be one of the following:​\\ _(Text in italics is info, and not part of the Type)_\\ • String _(single line)_\\ • TokenString\\ • Calculation\\ • Text _(multi-line)_\\ • TokenText\\ • Checkbox _(0 or 1)_\\ • PopupMenu\\ • Hidden\\  The Type specifies how the value is displayed to the user and what processing is applied before it is passed to the script.\\ Hidden types are text token processed, but are not displayed in the editor |+  * The same rules as Keyboard Maestro Variable Names apply. 
 +  * The label is displayed to the user and used to pass the parameter to the script. 
 +  * Obviously, the label must be unique amongst all parameters ​ 
 +</​WRAP> ​
 +^ Type | **Type of the parameter**.\\ Must be one of the following:​\\ _(Text in italics is info, and not part of the Type)_<​WRAP>​ 
 +  * String _(single line)_ 
 +  * TokenString 
 +  * Calculation 
 +  * Text _(multi-line)_ 
 +  * TokenText 
 +  * Checkbox _(0 or 1)_ 
 +  * PopupMenu 
 +  * Hidden 
 +</​WRAP> ​ The Type specifies how the value is displayed to the user and what processing is applied before it is passed to the script.\\ Hidden types are text token processed, but are not displayed in the editor |
 ^ Menu | Values of the popup menu, separated by %%|%%\\ **Optional** unless Type is _PopupMenu_. | ^ Menu | Values of the popup menu, separated by %%|%%\\ **Optional** unless Type is _PopupMenu_. |
 ^ Default | Default value of the Parameter ​ when the PIA is inserted in the Macro.\\ **Optional** | ^ Default | Default value of the Parameter ​ when the PIA is inserted in the Macro.\\ **Optional** |
 +
 +Each parameter in the Parameters array is a dictionary with the following keys:
 +
  
 Warning: Keys are case sensitive. Warning: Keys are case sensitive.
Line 108: Line 121:
  
  
-**Methods To Retrieve Parameters**+**Methods To Retrieve Parameters ​Using AppleScript**
  
 <code applescript>​ <code applescript>​
manual/Plug_In_Actions.txt · Last modified: 2023/10/06 02:28 by peternlewis