Actualizado el 14-01-2007
versión para imprimir

/*-------------------------------------------------------------------------
  MyPlugin 1.0

  HTML-Kit hkScript plugin created on 12-jun-2003 23:24:18
  Version Information: HKPGEN 2.96,  HKPAPI 1.0.50
-------------------------------------------------------------------------*/

/*-------------------------------------------------------------------------
  HTML-Kit will call the following function whenever user clicks on
  the the plugin's icon, selects one of its drop-down menu items or
  otherwise invokes the plugin.
-------------------------------------------------------------------------*/
function hkp_Main(pDataIn, pDataOut)
{
  var nPluginID = 0;        // en hkscript necesitas declarar las variables
  var nOutputMode = 1;      // antes de usarlas.
  var sOutput = "";         // 
  var nMoveCursor = 0;      // convencionalmente, una n delante del nombre
  var nFormatTags = 0;      // significa que la variable contendrá números;
                            // una s que es una cadena. 
  /*----------------------------------------------------------
    Get the 1 based plugin ID. Useful when there are two
    or more plugins registered within a single file.
  ----------------------------------------------------------*/
  nPluginID = hkp_DataGetInt( pDataIn, "P_ID", 1 );

  /* Button "Button1" */
  if(nPluginID == 1)
  {   /* Aqui se desarrollan las acciones del plugin
      */
  }

  hkp_DataAdd( pDataOut, "OUTPUT", sOutput ); // texto de salida
  hkp_DataAddInt( pDataOut, "MODE_OUTPUT", nOutputMode ); // modo de salida
  hkp_DataAddInt( pDataOut, "MODE_MOVE_TO_CARET", nMoveCursor ); 
  // movemos el cursor ?
  hkp_DataAddInt( pDataOut, "MODE_PREPROCESS_FORMAT_TAGS", nFormatTags ); 
  // formateado de etiquetas ?

}

/*-------------------------------------------------------------------------
  HTML-Kit will call the following function to initialize and register
  the plugin.
-------------------------------------------------------------------------*/
function hkp_Register(pDataIn, pDataOut)
{
  /*---------------------------
    Button # 1:
      "Button1"
  ---------------------------*/
  hkp_DataSetGlobalSuffix( "_1" );

  /* Required Information */
  hkp_DataAdd( pDataOut, "NAME", "Button1" );
  hkp_DataAdd( pDataOut, "SECTION", "MyPlugins" );

  /* Optional Information */
  hkp_DataAdd( pDataOut, "VERSION", "1.0" );
  hkp_DataAddInt( pDataOut, "MODE_SHOW_STATUS", 0 );

  hkp_DataSetGlobalSuffix( "" );
}



This site powered by Phorum.