Hilfe bei Autoit

  • Wie kann ich bei autoit machen dass

    wenn ich F1 drücke, dann macht autoit ein paar tastendrücke

    und wie kann ich machen dass autoit 2 tasten gleichzeitig drückt

    schon mal im vorraus danke für alle antworten :)

  • Ich hätte hier eine mit DLLHook + Callback:

    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

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

    AutoIt Version: 3.2.10.0
    Author: myName

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

    Script Function:
    Template AutoIt script.

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

    #ce ----------------------------------------------------------------------------

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

    #include <GUIConstants.au3>

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

    GUICreate("My GUI edit") ; will create a dialog box that when displayed is centered

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

    $myedit=GUICtrlCreateEdit ("", 10,10,121,200,$ES_AUTOVSCROLL+$WS_VSCROLL)
    GUICtrlCreateInput("",140,20,60,20)
    GUICtrlSetState(-1,$GUI_FOCUS)
    GUISetState ()

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

    ; Script Start - Add your code below here
    $dll = DllOpen("dskbhook.dll")
    ;DllCall($dll,"int","SetGlobalParams","int",0,

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

    ;Declare Function SetKeyboardHook& Lib "dskbhook" (ByVal hTargt&, ByVal Callback&, ByVal Adr&)
    $callback = DllCallbackRegister("_ReceiveKeyStrokes","long","int*;int*;int*;int*")
    DllCall($dll,"int","SetKeyboardHook","int",-1,"int",1,"ptr",DllCallbackGetPtr($callback))

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

    ; Run the GUI until the dialog is closed
    While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    Wend

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

    DllCall($dll,"int","SetKeyboardHook","int",0,"int",0,"ptr",0)

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

    Func _ReceiveKeyStrokes($action, $state, $vcode, $scode)
    $down = " Down"
    If $action = 4 Then $down = " Up"
    GUICtrlSetData ($myedit, ChrW($vcode) &$down &@CRLF,1)
    Return 0
    EndFunc

    [/autoit]


    (Benötigt die Dll aus http://allapi.mentalis.org/vbexamples/vbexample.php?vbexample=DSKEYBRD&category=MISC)