Jump to content

Send (CRTL ALT Etc)


 Share

Recommended Posts

I think I must be having a "moment"

I cant figure out what I'm missing.

In short - I have a tablet pc with intel video. I want to create a small app for rotating the screen, since the pc doesn't have a physical keyboard.

I just need to be able to do a CTRL+ALT+UP and a couple of other combos.

What am I doing wrong here? :-)

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Flipper = GUICreate("Flipper", 169, 173, 365, 270)
$Normal = GUICtrlCreateButton("Normal", 16, 8, 137, 33, 0)
$Rot90 = GUICtrlCreateButton("Rotate 90", 16, 48, 137, 33, 0)
$Rot180 = GUICtrlCreateButton("Rotate 180", 16, 88, 137, 33, 0)
$Rot270 = GUICtrlCreateButton("Rotate 270", 16, 128, 137, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###



While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $Normal
            Send("{RCTRL}{ALT}{UP}")
        Case $Rot90
            Send("{RCTRL}{ALT}{LEFT}")
        Case $Rot180
            Send("{RCTRL}{ALT}{DOWN}")
        Case $Rot270
            Send("{RCTRL}{ALT}{RIGHT}")
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Link to comment
Share on other sites

Nevermind - I figured it out!

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Flipper = GUICreate("Flipper", 169, 173, 365, 270)
$Normal = GUICtrlCreateButton("Normal", 16, 8, 137, 33, 0)
$Rot90 = GUICtrlCreateButton("Rotate 90", 16, 48, 137, 33, 0)
$Rot180 = GUICtrlCreateButton("Rotate 180", 16, 88, 137, 33, 0)
$Rot270 = GUICtrlCreateButton("Rotate 270", 16, 128, 137, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###



While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $Normal
            Send("^!{UP}")
        Case $Rot90
            Send("^!{LEFT}")
        Case $Rot180
            Send("^!{DOWN}")
        Case $Rot270
            Send("^!{RIGHT}")
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...