HP Dx9000 Resources for Developing Touch-Friendly Applications for HP Business - Page 33

Example 4, XML to Retask Volume Mute Button to, Cleaning Mode, Button Element Attribute Summary

Page 33 highlights

Example 4 - XML to Retask Volume Mute Button to Cleaning Mode Purpose:  Enable side volume mute button and re-task it to call CleaningMode.cmd file to put the system into the cleaning mode (hibernating) for a period of two minutes when the volume mute button is pressed. The system should wake up automatically by itself when the cleaning mode expires. During the cleaning mode, the touch screen, the mouse and the keyboard can be wiped or cleaned, and the system will not take any input from these devices.  Leave volume up and down buttons with their default behavior (increasing and decreasing the sound volume). CleaningMode.cmd file for this example: @echo off set PrgFiles=%ProgramFiles(x86)% if "%PROCESSOR_ARCHITECTURE%"=="x86" set PrgFiles=%ProgramFiles% REM call HP Maintenance Utility to set the system to hibernate for 2 minutes "%PrgFiles%\Hewlett-Packard\HP Maintenance Utility\HPMaintUtility.exe" /hibernate /minutes:2 Button Element Attribute Summary Attribute Id Valid Value VolumeUpButton, VolumeMuteButton or VolumeDownButton Enabled true or false AutoRepeatEnabled true or false AutoRepeatInterval An integer value in the Note Each button Id should be specified at most once in the XML file. If a button Id is specified more than once, only the first Button element with that Id takes effect. Put "false" to disable a button and "true" to enable a button Put "true" to allow a button to automatically repeat if the button is pressed and held for a period of time. If this attribute is specified with the value "true", the AutoRepeatInterval attribute must be set. The interval in milliseconds for a 33

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37

33
Example 4
XML to Retask Volume Mute Button to
Cleaning Mode
Purpose:
Enable side volume mute button and re-task it to call CleaningMode.cmd file to
put the system into the cleaning mode (hibernating) for a period of two minutes
when the volume mute button is pressed. The system should wake up
automatically by itself when the cleaning mode expires. During the cleaning
mode, the touch screen, the mouse and the keyboard can be wiped or
cleaned, and the system will not take any input from these devices.
Leave volume up and down buttons with their default behavior (increasing and
decreasing the sound volume).
<?xml version="1.0" encoding="UTF-8"?>
<HPSystemConfiguration
xmlns="urn:HPSystemConfiguration"
xsi:schemaLocation="urn:HPSystemConfiguration HPSystemConfiguration.xsd"
SchemaVersion="1.0">
<Buttons>
<Button Id="VolumeMuteButton" Enabled="true"
AutoRepeatEnabled="false" Action="LaunchExecutable"
ActionValue="C:\CleaningMode.cmd" />
</Buttons>
</HPSystemConfiguration>
CleaningMode.cmd file for this example:
@echo off
set PrgFiles=%ProgramFiles(x86)%
if "%PROCESSOR_ARCHITECTURE%"=="x86" set PrgFiles=%ProgramFiles%
REM call HP Maintenance Utility to set the system to hibernate for 2
minutes
"%PrgFiles%\Hewlett-Packard\HP Maintenance Utility\HPMaintUtility.exe"
/hibernate /minutes:2
Button Element Attribute Summary
Attribute
Valid Value
Note
Id
VolumeUpButton
,
VolumeMuteButton
or
VolumeDownButton
Each button Id should be specified
at most once in the XML file. If a
button Id is specified more than
once, only the first Button element
with that Id takes effect.
Enabled
true
or
false
Put
false
to disable a button and
“true” to enable a button
AutoRepeatEnabled
true
or
false
Put “true” to allow a button to
automatically repeat if the button is
pressed and held for a period of
time.
If this attribute is specified with the
value “true”, the AutoRepeatInterval
attribute must be set.
AutoRepeatInterval
An integer value in the
The interval in milliseconds for a