Hallo,
wie muß ich bei Controlsend die ControlID eingeben?
[autoit]
ControlSend ("","","[ID:985992]",$C16,1)
Im Infofenster wird mir die ID als Zahl angezeigt
Die ID ist aus dem KeePass Fenster für das Masterpasswort
Hallo,
wie muß ich bei Controlsend die ControlID eingeben?
[autoit]
ControlSend ("","","[ID:985992]",$C16,1)
Im Infofenster wird mir die ID als Zahl angezeigt
Die ID ist aus dem KeePass Fenster für das Masterpasswort
Passt so.
Du musst halt noch im ersten Parameter das Fenster angeben.
klappt leider nicht, auch nicht wenn ich einen Fenster Titel angebe
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.
#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 ****
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>
Global $oExcel
Global $Pfad
Global $oWorkbook
;Global $B16 ;KeePass Benutzername
Global $C16 ;KeePass Kennwort
Global $D16 ;ProgrammPfad
Hotkeyset("{ESC}","kill")
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
;$B15 = _Excel_RangeRead($oWorkbook,"Tabelle1", "B16")
$C16 = _Excel_RangeRead($oWorkbook,"Tabelle1", "C16")
$D16 = _Excel_RangeRead($oWorkbook,"Tabelle1", "D16")
_Excel_Close($oExcel)
[/autoit][autoit][/autoit][autoit][/autoit][autoit];ShellExecute ($D16)
;Sleep (1000)
WinWait ("Datenbank öffnen","",3)
#cs
While Not WinExists ("P.FVC","")
WEnd
#ce
Local $hWnd = WinGetHandle("Datenbank öffnen","Master-&Passwort:")
If Not WinActive ($hWnd,"") Then WinActivate ($hWnd,"")
WinWait ($hWnd,"",3)
;Controlsend (
;ControlSend ("","","ID:985992",$C16,1)
ControlSend ($hWnd,"","",$C16,1)
ControlSend ($hWnd,"","","{ENTER}",0)
Exit
[/autoit][autoit][/autoit][autoit]func kill()
Exit
Endfunc
Hmm jetzt sehe ich gerade das die ID unter Control sich ständig ändert
das die ID unter Control sich ständig ändert
Dann verwende den AdvancedMode, die Infos dazu hast du auch. [CLASSNAMENN:WindowsForms10.usw....; INSTANCE:1; NAME:m_tbPassword]