PA_GetShortParameter

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_GetShortParameter (params; index) short

ParameterTypeDescription
paramsPA_PluginParametersParameters received in PluginMain
indexshortIndex of the parameter in params
Function resultshortValue of the index parameter

Description

The routine PA_GetShortParameter returns the value of type short of the index parameter in params.

See Create a new plugin for a description of parameter accessors.

NOTE: The first parameter starts at index 1.

Example

In PluginMain, pass a subroutine to parameter 1

   void PluginMain( long selector, PA_PluginParameters params )
   {
      switch ( selector )
      {
         . . .kInitPlugin, kDeinitPlugin ...

         case kMyRoutine :
            BeepXTimes(params);
            break;

      }
   }

   void BeepXTimes (PA_PluginParameters params)
   {
      short   count, i;
   // get the parameter value
      count = PA_GetShortParameter(params, 1);
      for(i = 1; i <= count; i++)
         SysBeep(1);
   }

See Also

Create a new plugin.


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next