Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Visual User Environment 3.0 User's Guide > Chapter 21 More About Actions

Creating Special Actions with `vueaction'

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The vueaction utility in HP VUE starts an action. You can use vueaction in the EXEC-STRING of an action to create special capabilities, including:

  • Writing an action that executes a command and then invokes another action.

  • Running an action as a different user.

  • Playing back an audio file.

To write an action that invokes another action

  • Use the syntax:

       vueaction action_name [file_argument(s)]
    

Example.  The following action uses the built-in action CheckSpelling. The new action runs TextEditor and the spell checker at the same time, displaying the spelling errors in a separate terminal window.

   ACTION EditAndSpell

      WINDOW-TYPE NO-STDIO

      EXEC-STRING /usr/bin/sh -c 'vueaction CheckSpelling %(File)Arg_1"File"%; \

                              vuepad %(File)Arg_1%'

   END

To create an action that runs as a different user

  • Use the following syntax in the EXEC-STRING:

    EXEC-STRING   vueaction -user user_name action_name [file_argument]
    

Example.  The following two actions provide the ability to edit the system file /etc/vue/config/Xsession.

   # This action runs a second action, OpenXsessionEdit, as root.

   ACTION EditXsession

     WINDOW-TYPE NO-STDIO

     EXEC-STRING vueaction -user root OpenXsessionEdit

   END





   # The following action makes Xsession writable, opens it for editing,

   # and removes the write permission when the editing session is concluded.

   ACTION         OpenXsessionEdit

     WINDOW-TYPE  NO-STDIO

     EXEC-STRING  /usr/bin/sh -c 'chmod +w /etc/vue/config/Xsession \

                    vuepad /etc/vue/config/Xsession             \

                    chmod -w /etc/vue/config/Xsession'

   END

To attach audio playback to an action

  • Use the following syntax in the EXEC-STRING:

       EXEC-STRING vueaction -audio audio_file \
    
                             [-volume value] \
    
                             [action_name [file_argument] ] 
    

Example.  The built-in action that puts a file in the trash can when you drop a file on the trash icon is named TrashFile. The following action definitions redefine TrashFile to add audio playback when a file is dropped.

   # This action is identical to the built-in TrashFile action, except it

   # has been renamed.

   ACTION NewTrashFile

      TYPE            MESSAGE

      MSG-TOOL        FILEMGR

      MSG-COMMAND     REMOVE_TRASH

      MSG-DATA        %Arg_1"File To Trash:"% %Args%

      DESCRIPTION     The NewTrashFile action places its argument \

                      in the HP VUE trash can.

   END



   # The TrashFile action will now play the audio file and invoke the

   # NewTrashFile action.

   ACTION TrashFile

      WINDOW-TYPE  NO-STDIO

      EXEC-STRING vueaction -audio /tmp/lid_open NewTrashFile %Args%

   END
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© © 1989, 1990, 1991, 1992, 1995 Hewlett-Packard Development Company, L.P.