Virtuelle Tastatur

  • Hallo,
    Hab mir eine kleine Tastatur geschrieben, dass Zielfenster ist eigentlich eine Variable, dass hab ich auch getestet das das wirklich der Fall ist, aber irgendwie klappt’s trotzdem nur mit Editor…?

    Weiß jemand woran das liegt???


    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Tastatur", 583, 250, 192, 124)
    $q = GUICtrlCreateButton("q", 16, 80, 35, 33, $WS_GROUP)
    $w = GUICtrlCreateButton("w", 48, 80, 35, 33, $WS_GROUP)
    $e = GUICtrlCreateButton("e", 80, 80, 35, 33, $WS_GROUP)
    $r = GUICtrlCreateButton("r", 112, 80, 35, 33, $WS_GROUP)
    $t = GUICtrlCreateButton("t", 144, 80, 35, 33, $WS_GROUP)
    $z = GUICtrlCreateButton("z", 176, 80, 35, 33, $WS_GROUP)
    $u = GUICtrlCreateButton("u", 208, 80, 35, 33, $WS_GROUP)
    $i = GUICtrlCreateButton("i", 240, 80, 35, 33, $WS_GROUP)
    $o = GUICtrlCreateButton("o", 272, 80, 35, 33, $WS_GROUP)
    $p = GUICtrlCreateButton("p", 304, 80, 35, 33, $WS_GROUP)
    $a = GUICtrlCreateButton("a", 32, 112, 35, 33, $WS_GROUP)
    $s = GUICtrlCreateButton("s", 64, 112, 35, 33, $WS_GROUP)
    $d = GUICtrlCreateButton("d", 96, 112, 35, 33, $WS_GROUP)
    $f = GUICtrlCreateButton("f", 128, 112, 35, 33, $WS_GROUP)
    $g = GUICtrlCreateButton("g", 160, 112, 35, 33, $WS_GROUP)
    $h = GUICtrlCreateButton("h", 192, 112, 35, 33, $WS_GROUP)
    $j = GUICtrlCreateButton("j", 224, 112, 35, 33, $WS_GROUP)
    $k = GUICtrlCreateButton("k", 256, 112, 35, 33, $WS_GROUP)
    $l = GUICtrlCreateButton("l", 288, 112, 35, 33, $WS_GROUP)
    $Leertaste = GUICtrlCreateButton("Leertaste", 24, 176, 297, 33, $WS_GROUP)
    $y = GUICtrlCreateButton("y", 48, 144, 35, 33, $WS_GROUP)
    $x = GUICtrlCreateButton("x", 80, 144, 35, 33, $WS_GROUP)
    $c = GUICtrlCreateButton("c", 112, 144, 35, 33, $WS_GROUP)
    $v = GUICtrlCreateButton("v", 144, 144, 35, 33, $WS_GROUP)
    $b = GUICtrlCreateButton("b", 176, 144, 35, 33, $WS_GROUP)
    $n = GUICtrlCreateButton("n", 208, 144, 35, 33, $WS_GROUP)
    $m = GUICtrlCreateButton("m", 240, 144, 35, 33, $WS_GROUP)
    $endern = GUICtrlCreateButton ("Zielfenster festlegen", 460, 30, 110, 33, $WS_GROUP )
    $grossKlein = GUICtrlCreateButton ("^", 510, 210, 60, 33, $WS_GROUP )
    $Enter = GUICtrlCreateButton ("Enter", 273, 144, 60, 33, $WS_GROUP )
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $endern
    $InPUT = InputBox ( "Zielfenster festlegen", "Legen sie hier ihr Zielfenster fest, bitte achten sie darauf, dass sie den Fenster Titel richtig schreiben." )

    [/autoit] [autoit][/autoit] [autoit]

    Case $grossKlein
    ControlSend ( $InPUT&"", "", "Edit1", "{CAPSLOCK on}", 0 )

    [/autoit] [autoit][/autoit] [autoit]

    Case $Enter
    ControlSend ( $InPUT&"", "", "Edit1", "{ENTER}", 0 )

    [/autoit] [autoit][/autoit] [autoit]

    Case $Leertaste
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", " ", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    case $a
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "a", 0 )
    EndIf
    Case $b
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "b", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $c
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "c", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $d
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "d", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $e
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "e", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $f
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "f", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $g
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "g", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $h
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "h", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $i
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "i", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $j
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "j", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $k
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "k", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $l
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "l", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $m
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "m", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $n
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "n", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $o
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "o", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $p
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "p", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $q
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "q", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $r
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "r", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $s
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "s", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $t
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "t", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $u
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "u", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $v
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "v", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $w
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "w", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $x
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "x", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $y
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "y", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $z
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", "Edit1", "z", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    Einmal editiert, zuletzt von dr. mo (22. Januar 2011 um 11:09)

  • ok, das Tool habe ich gefunden, aber wie das Tool funktionieren soll weiss ich nicht...

    Bin aber am rumexperimentieren

  • Zitat

    Kann mir jemand helfen?


    Nur wenn du mit diesem Doubleposting aufhörst. :rolleyes:
    Wie meinst du das? Klick einfach auf das Fadenkreuz und ziehe die Maus mit gedrückter linker Maustaste auf das gewünschte Control. Dann bekommst du alle Infos aufgelistet.

  • Dank name22 funktioniert mein Script jetzt doch noch…..
    In dem Code hab ich das Edit1 jetzt noch durch eine Variable ersetzt.

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Tastatur", 583, 250, 192, 124)
    $q = GUICtrlCreateButton("q", 16, 80, 35, 33, $WS_GROUP)
    $w = GUICtrlCreateButton("w", 48, 80, 35, 33, $WS_GROUP)
    $e = GUICtrlCreateButton("e", 80, 80, 35, 33, $WS_GROUP)
    $r = GUICtrlCreateButton("r", 112, 80, 35, 33, $WS_GROUP)
    $t = GUICtrlCreateButton("t", 144, 80, 35, 33, $WS_GROUP)
    $z = GUICtrlCreateButton("z", 176, 80, 35, 33, $WS_GROUP)
    $u = GUICtrlCreateButton("u", 208, 80, 35, 33, $WS_GROUP)
    $i = GUICtrlCreateButton("i", 240, 80, 35, 33, $WS_GROUP)
    $o = GUICtrlCreateButton("o", 272, 80, 35, 33, $WS_GROUP)
    $p = GUICtrlCreateButton("p", 304, 80, 35, 33, $WS_GROUP)
    $a = GUICtrlCreateButton("a", 32, 112, 35, 33, $WS_GROUP)
    $s = GUICtrlCreateButton("s", 64, 112, 35, 33, $WS_GROUP)
    $d = GUICtrlCreateButton("d", 96, 112, 35, 33, $WS_GROUP)
    $f = GUICtrlCreateButton("f", 128, 112, 35, 33, $WS_GROUP)
    $g = GUICtrlCreateButton("g", 160, 112, 35, 33, $WS_GROUP)
    $h = GUICtrlCreateButton("h", 192, 112, 35, 33, $WS_GROUP)
    $j = GUICtrlCreateButton("j", 224, 112, 35, 33, $WS_GROUP)
    $k = GUICtrlCreateButton("k", 256, 112, 35, 33, $WS_GROUP)
    $l = GUICtrlCreateButton("l", 288, 112, 35, 33, $WS_GROUP)
    $Leertaste = GUICtrlCreateButton("Leertaste", 24, 176, 297, 33, $WS_GROUP)
    $y = GUICtrlCreateButton("y", 48, 144, 35, 33, $WS_GROUP)
    $x = GUICtrlCreateButton("x", 80, 144, 35, 33, $WS_GROUP)
    $c = GUICtrlCreateButton("c", 112, 144, 35, 33, $WS_GROUP)
    $v = GUICtrlCreateButton("v", 144, 144, 35, 33, $WS_GROUP)
    $b = GUICtrlCreateButton("b", 176, 144, 35, 33, $WS_GROUP)
    $n = GUICtrlCreateButton("n", 208, 144, 35, 33, $WS_GROUP)
    $m = GUICtrlCreateButton("m", 240, 144, 35, 33, $WS_GROUP)
    $endern = GUICtrlCreateButton ("Zielfenster festlegen", 460, 30, 110, 33, $WS_GROUP )
    $control = GUICtrlCreateButton ("Zielcontrol festlegen", 350, 30, 110, 33, $WS_GROUP )
    $grossKlein = GUICtrlCreateButton ("^", 510, 210, 60, 33, $WS_GROUP )
    $Enter = GUICtrlCreateButton ("Enter", 273, 144, 60, 33, $WS_GROUP )
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $endern
    $InPUT = InputBox ( "Zielfenster festlegen", "Legen sie hier ihr Zielfenster fest, bitte achten sie darauf, dass sie den Fenster Titel richtig schreiben." )

    [/autoit] [autoit][/autoit] [autoit]

    Case $control
    $controlInput = InputBox ( "Zielcontrol festlegen", "Legen sie hier ihren Zielcontrol fest, bitte achten sie darauf, dasssie ihren Zielcontrol richtig schreiben." )

    [/autoit] [autoit][/autoit] [autoit]

    Case $grossKlein
    ControlSend ( $InPUT&"", "", $controlInput&"", "{CAPSLOCK on}", 0 )

    [/autoit] [autoit][/autoit] [autoit]

    Case $Enter
    ControlSend ( $InPUT&"", "", $controlInput&"", "{ENTER}", 0 )

    [/autoit] [autoit][/autoit] [autoit]

    Case $Leertaste
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", " ", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    case $a
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "a", 0 )
    EndIf
    Case $b
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "b", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $c
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "c", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $d
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "d", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $e
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "e", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $f
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "f", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $g
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "g", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $h
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "h", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $i
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "i", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $j
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "j", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $k
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "k", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $l
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "l", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $m
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "m", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $n
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "n", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $o
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "o", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $p
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "p", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $q
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "q", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $r
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "r", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $s
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "s", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $t
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "t", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $u
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "u", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $v
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "v", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $w
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "w", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $x
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "x", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $y
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "y", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Case $z
    if(WinActivate ( $InPUT&"")) Then
    ControlSend ( $InPUT&"", "", $controlInput&"", "z", 0 )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit]
  • Hab WinActivate jetzt einfach komplett entfernt….

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Tastatur", 583, 250, 192, 124)
    $q = GUICtrlCreateButton("q", 16, 80, 35, 33, $WS_GROUP)
    $w = GUICtrlCreateButton("w", 48, 80, 35, 33, $WS_GROUP)
    $e = GUICtrlCreateButton("e", 80, 80, 35, 33, $WS_GROUP)
    $r = GUICtrlCreateButton("r", 112, 80, 35, 33, $WS_GROUP)
    $t = GUICtrlCreateButton("t", 144, 80, 35, 33, $WS_GROUP)
    $z = GUICtrlCreateButton("z", 176, 80, 35, 33, $WS_GROUP)
    $u = GUICtrlCreateButton("u", 208, 80, 35, 33, $WS_GROUP)
    $i = GUICtrlCreateButton("i", 240, 80, 35, 33, $WS_GROUP)
    $o = GUICtrlCreateButton("o", 272, 80, 35, 33, $WS_GROUP)
    $p = GUICtrlCreateButton("p", 304, 80, 35, 33, $WS_GROUP)
    $a = GUICtrlCreateButton("a", 32, 112, 35, 33, $WS_GROUP)
    $s = GUICtrlCreateButton("s", 64, 112, 35, 33, $WS_GROUP)
    $d = GUICtrlCreateButton("d", 96, 112, 35, 33, $WS_GROUP)
    $f = GUICtrlCreateButton("f", 128, 112, 35, 33, $WS_GROUP)
    $g = GUICtrlCreateButton("g", 160, 112, 35, 33, $WS_GROUP)
    $h = GUICtrlCreateButton("h", 192, 112, 35, 33, $WS_GROUP)
    $j = GUICtrlCreateButton("j", 224, 112, 35, 33, $WS_GROUP)
    $k = GUICtrlCreateButton("k", 256, 112, 35, 33, $WS_GROUP)
    $l = GUICtrlCreateButton("l", 288, 112, 35, 33, $WS_GROUP)
    $Leertaste = GUICtrlCreateButton("Leertaste", 24, 176, 297, 33, $WS_GROUP)
    $y = GUICtrlCreateButton("y", 48, 144, 35, 33, $WS_GROUP)
    $x = GUICtrlCreateButton("x", 80, 144, 35, 33, $WS_GROUP)
    $c = GUICtrlCreateButton("c", 112, 144, 35, 33, $WS_GROUP)
    $v = GUICtrlCreateButton("v", 144, 144, 35, 33, $WS_GROUP)
    $b = GUICtrlCreateButton("b", 176, 144, 35, 33, $WS_GROUP)
    $n = GUICtrlCreateButton("n", 208, 144, 35, 33, $WS_GROUP)
    $m = GUICtrlCreateButton("m", 240, 144, 35, 33, $WS_GROUP)
    $endern = GUICtrlCreateButton ("Zielfenster festlegen", 460, 30, 110, 33, $WS_GROUP )
    $control = GUICtrlCreateButton ("Zielcontrol festlegen", 350, 30, 110, 33, $WS_GROUP )
    $grossKlein = GUICtrlCreateButton ("^", 510, 210, 60, 33, $WS_GROUP )
    $Enter = GUICtrlCreateButton ("Enter", 273, 144, 60, 33, $WS_GROUP )
    $back = GUICtrlCreateButton ("<-", 510, 180, 60, 33, $WS_GROUP )
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $endern
    $InPUT = InputBox ( "Zielfenster festlegen", "Legen sie hier ihr Zielfenster fest, bitte achten sie darauf, dass sie den Fenster Titel richtig schreiben." )

    [/autoit] [autoit][/autoit] [autoit]

    Case $control
    $controlInput = InputBox ( "Zielcontrol festlegen", "Legen sie hier ihren Zielcontrol fest, bitte achten sie darauf, dasssie ihren Zielcontrol richtig schreiben." )

    [/autoit] [autoit][/autoit] [autoit]

    Case $grossKlein
    ControlSend ( $InPUT&"", "", $controlInput&"", "{CAPSLOCK on}", 0 )

    [/autoit] [autoit][/autoit] [autoit]

    Case $back
    ControlSend ( $InPUT&"", "", $controlInput&"", "{BACKSPACE}", 0 )

    [/autoit] [autoit][/autoit] [autoit]

    Case $Enter
    ControlSend ( $InPUT&"", "", $controlInput&"", "{ENTER}", 0 )

    [/autoit] [autoit][/autoit] [autoit]

    Case $Leertaste

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", " ", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    case $a

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "a", 0 )

    [/autoit] [autoit][/autoit] [autoit]

    Case $b

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "b", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $c

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "c", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $d

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "d", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $e

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "e", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $f

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "f", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $g

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "g", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $h

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "h", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $i

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "i", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $j

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "j", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $k

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "k", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $l

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "l", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $m

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "m", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $n

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "n", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $o

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "o", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $p

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "p", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $q

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "q", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $r

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "r", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $s

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "s", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $t

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "t", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $u

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "u", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $v

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "v", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $w

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "w", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $x

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "x", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $y

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "y", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $z

    [/autoit] [autoit][/autoit] [autoit]

    ControlSend ( $InPUT&"", "", $controlInput&"", "z", 0 )

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit]
  • Sorry, aber das geht besser :P :

    For ... Next, weniger Zeilenumbrüche und Array. Nur als Tipp ;)

  • Es fehlen die Zahlen. Sieht aber sonst ganz gut aus, abgesehen von dem was auch schon MatthiasG. gesagt hat. Es kommt auch ein Fehler wenn die Input Variable noch nicht deklariert ist. Die Buttons überlappen sich auch ein wenig. Was ich mich schon oft gefragt hab ist wofür das ist... ich hinterfrag damit nicht den Sinn deines Programms sondern allgemein den Sinn von virtuellen Tastaturen. Wenn sie dazu dienen das man, wenn man an einem Computer keine Tastatur hat, diese verwenden kann, wäre dein Programm unhantlich, da man in die Input Box schreiben muss, und das geht ja schlecht ohne Tastatur.

  • Bildschirmtastaturen sind z.B. für Touchscreens praktisch, da man ein alternatives Eingabegerät hat. Ein Rechner ohne Touch und ohne Tastatur, nur mit Maus und Bildschirm, denn stelle ich mir grausam vor :D