Controlsend mit ControlID

  • Hallo,

    wie muß ich bei Controlsend die ControlID eingeben?

    [autoit]


    ControlSend ("","","[ID:985992]",$C16,1)

    [/autoit]

    Im Infofenster wird mir die ID als Zahl angezeigt
    Die ID ist aus dem KeePass Fenster für das Masterpasswort

    Einmal editiert, zuletzt von skorpion-de (27. November 2015 um 15:53)

    • Probiere mal diese schreibweisen durch:
    • ControlSend ("","","[ID:985992]","",1)
    • ControlSend ("","","[ID:985992]","",0)
    • ControlSend ("","","[ID:985992]")
    • ControlSend ([ID:985992]","",1)
    • ControlSend ([ID:985992]","",0)
    • ControlSend ([ID:985992]","$C16",1)
    • ControlSend ([ID:985992]","$C16",0)

    Vielleicht kommt das Script auch nicht mit der Variable [$C16] klar.

    Es wäre schön, wenn Du ds Script mal postest, damit wir nicht zu sehr die Glaskugel beansprechen (wie heißt es richtig?) müssen. ;)

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    k3mrwmIBHejryPvylQSFieDF5f3VOnk6iLAVBGVhKQegrFuWr3iraNIblLweSW4WgqI0SrRbS7U5jI3sn50R4a15Cthu1bEr

  • [autoit]


    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #AutoIt3Wrapper_Res_Description=KeePass starten mit Passwort
    #AutoIt3Wrapper_Res_Fileversion=3.0.0.0
    #AutoIt3Wrapper_Res_LegalCopyright=Olaf Gremmel
    #AutoIt3Wrapper_Res_Language=1031
    #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

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

    Opt("SendKeyDelay", 30) ;50 milliseconds default 5
    Opt("WinWaitDelay", 500) ;1000 milliseconds default 250
    Opt("MustDeclareVars", 1) ;0=no, 1=require pre-declaration default 0
    #include <Excel.au3>

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

    Global $oExcel
    Global $Pfad
    Global $oWorkbook
    ;Global $B16 ;KeePass Benutzername
    Global $C16 ;KeePass Kennwort
    Global $D16 ;ProgrammPfad
    Hotkeyset("{ESC}","kill")

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

    Local $oExcel = _Excel_Open(0,0,0,0,1) ;Variable Excel Öffnen
    Local $Pfad = @ScriptDir & "\Datei_V3.xlsx" ;Variable Pfad und Datei - Diese Datei sollte bereits existieren
    Local $oWorkbook = _Excel_BookOpen($oExcel, $Pfad) ; Variable Workbook inklusiv Excel öffnen und Pfad

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

    ;$B15 = _Excel_RangeRead($oWorkbook,"Tabelle1", "B16")
    $C16 = _Excel_RangeRead($oWorkbook,"Tabelle1", "C16")
    $D16 = _Excel_RangeRead($oWorkbook,"Tabelle1", "D16")

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

    _Excel_Close($oExcel)

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

    ;ShellExecute ($D16)
    ;Sleep (1000)
    WinWait ("Datenbank öffnen","",3)

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

    #cs
    While Not WinExists ("P.FVC","")
    WEnd
    #ce

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

    Local $hWnd = WinGetHandle("Datenbank öffnen","Master-&Passwort:")
    If Not WinActive ($hWnd,"") Then WinActivate ($hWnd,"")
    WinWait ($hWnd,"",3)

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

    ;Controlsend (
    ;ControlSend ("","","ID:985992",$C16,1)
    ControlSend ($hWnd,"","",$C16,1)
    ControlSend ($hWnd,"","","{ENTER}",0)

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

    Exit

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

    func kill()
    Exit
    Endfunc

    [/autoit]