Something else that might be useful:
Object.AppBar
An AppBar is an object that is designed to be attached to the edge of the screen like the Taskbar. Also like the taskbar it can be set to autohide, but beyond this you can undock it as well so it can be moved on the screen. When an appbar is set to Autohide, then moving the mouse over the edge of the screen will cause the AppBar to smoothly appear.
Note that Object.AppBar can only be written, not read, so if you need to check the mode at any time you need to set a variable when you set the mode, and then query the value of this variable. Example 1 shows how you may set a variable in this manner.
The values for Object.AppBar are as follows:
0 = Disabled
1 = Docked
2 - Autohide
Example:
Sub Object_OnScriptEnter
Object.AppbarMode = 1
appmode = 1
End Sub
If state = "Command executed" Then
DesktopX.Object("maindock").AppbarMode = 2
End If