The Command line field is where you enter the command you want to be executed.
If you enter “$(environment-variable)” then the environment variable indicated will be substituted into the command.
If you enter “$(open)” then this is an instruction to open the following filename inside Genero Studio
If you click on the Insert Variable button, you can use this as a wizard to select other variables. In this list you will see entries such as “$(FileBaseName)” which return part of the selected filename if you have right-clicked.
Finally if you enter “$(parameter-name)” where parameter-name does not match anything such as an environment variable or a pre-defined variable, then this is interpreted as a user parameter. When you execute the action, you will be prompted to enter additional information that will be used as the value for this parameter.
The two check boxes, Display output and Verbose control what appears in the Output panel.
The Always execute locally is for use with Remote configurations and can be used to indicate if the command is executed on the remote or local server.
The Target node field allows you to indicate if the action is available by right-clicking within the Project Manager. If it is, then you can enter this field and select the appropriate nodes.
The above User Action example simply uses $(open) and $(FGLDIR) to open $FGLDIR inside Genero Studio.
This example below has an example of a user defined parameter, the $(yyyymmdd) …
… so when the action is triggered I am prompted to enter some additional information that is then used in the command.
In this case to open a particular days GAS logs.
Once you have defined an action you then need to define ways to trigger it. If you had selected an entry in Trigger nodes then the action would be available in the Project view by right-clicking on the appropriate node.
You can also associate the User Action with particular file extensions via File Associations (Tools->Global Setup -> Edit File Associations). For a file type, when you add an Associated Action, you will find your User Actions in the list of available actions you can select. Once added then from the Projects or Files View you can right-click on a file node and trigger that action for that particular file.
You can add the action to those actions available from the TopMenus you can see in Genero Studio via Preferences->User Interface->Menus. This is what I have done with my actions to open particular directories. I have added them to the File menu.
Similarly you can add actions so that they are available from the Toolbar via Preferences->User Interface->Toolbar. Normally you would also attach an icon via the Icons property when you initially define the User Action, but if you don’t you will get some text in the toolbar as per the screenshots below.
Finally you can add the action so that it is triggered by certain accelerator keys. Preferences->User Interface->Accelerators. You know that you can use a particular set of keys and the action can be triggered. These keys will appear in a topmenu or right-click menu to provide some indication as to what keys are available.
So if you find yourself Alt-Tabbing between Genero Studio and the command line, and you are thinking to yourself, if only I could do this from Genero Studio, chances are you can. Look into User Actions and the various ways of triggering a User Action and execute your desired commands directly from within Genero Studio. There are other configuration options as well, read more here, some of which will be the subject of future Ask-Reubens.