Hallo gibts eine möglichkeit, wie ich einen Kalender eintrag mit Autoit in Outlook eintrage?
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_Language=1031
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <DateTimeConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Date.au3>
GUICreate("LSC Kasperky Info Tool", 887, 397, 338, 517)
$Input1 = GUICtrlCreateInput("", 230, 17, 345, 21)
$Input2 = GUICtrlCreateInput("", 230, 48, 345, 21)
$input3 = GUICtrlCreateDate("", 230, 80, 345, 21)
$Input4 = GUICtrlCreateInput("", 230, 108, 345, 21)
$Input5 = GUICtrlCreateInput("", 230, 144, 345, 21)
$Input6 = GUICtrlCreateInput("", 230, 176, 345, 21)
$Input7 = GUICtrlCreateInput("", 240, 312, 625, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
$Input8 = GUICtrlCreateInput("", 238, 348, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
$Input9 = GUICtrlCreateInput("", 999, 9, 121, 21)
GUICtrlCreateLabel("Kunden Nach - Vorname", 7, 17, 120, 17)
GUICtrlCreateLabel("Telefon Nummer", 8, 48, 112, 17)
GUICtrlCreateLabel("Datum der Aktivierung ", 8, 80, 120, 17)
GUICtrlCreateLabel("Verbleibende Zeit in Tagen", 8, 111, 136, 17)
GUICtrlCreateLabel("Kaspersky Verison", 8, 144, 120, 17)
GUICtrlCreateLabel("Welcher PC (nur Firmen mit , Tennen)", 8, 176, 208, 17)
GUICtrlCreateLabel("Outlook Eintrag", 8, 312, 90, 17)
GUICtrlCreateLabel("Outlook Datum", 8, 348, 90, 17)
$Pic1 = GUICtrlCreatePic("C:\Users\Kevin Brach\Desktop\Unbenannt.jpg", 600, 16, 265, 185)
$Button1 = GUICtrlCreateButton("Generieren", 320, 216, 177, 25)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$kunde = Guictrlread($input1,0)
$tele = Guictrlread($input2,0)
$tage = Guictrlread($input4,0)
$pc = Guictrlread($input6,0)
$version = Guictrlread($input5,0)
$Datum = Guictrlread($input2,0)
Local $sStyle = "yyyy/MM/dd HH:mm:ss"; Style für das Datecontrol um eine Ausgabe konform für _DateAdd zu erzeugen
Local $sStyle1 = "dddd, dd.MMMM yyyy";Localer Style Tagesname, Tag. ,Monatsname, Jahr
GUICtrlSendMsg($input3, $DTM_SETFORMATW, 0, $sStyle);Style setzen um Ausgabe für _DateAdd zu bekommen
$newDate =_DateAdd("D", GUICtrlRead($input4) -10, GUICtrlRead($input3, 0));Datum auslesen aus dem Datecontrol
GUICtrlSetData($Input8, _DateTimeFormat ($newDate, 2 )); Datum + 364 Tage in Input eintragen
GUICtrlSendMsg($input3, $DTM_SETFORMATW, 0, $sStyle1);Localen Style für das Datecontrol wiederherstellen
Local $sStyle = "yyyy/MM/dd HH:mm:ss"; Style für das Datecontrol um eine Ausgabe konform für _DateAdd zu erzeugen
Local $sStyle1 = "dddd, dd.MMMM yyyy";Localer Style Tagesname, Tag. ,Monatsname, Jahr
GUICtrlSendMsg($input3, $DTM_SETFORMATW, 0, $sStyle);Style setzen um Ausgabe für _DateAdd zu bekommen
$newDate =_DateAdd("D", GUICtrlRead($input4) , GUICtrlRead($input3, 0));Datum auslesen aus dem Datecontrol
GUICtrlSetData($Input9, _DateTimeFormat ($newDate, 2 )); Datum + 364 Tage in Input eintragen
GUICtrlSendMsg($input3, $DTM_SETFORMATW, 0, $sStyle1);Localen Style für das Datecontrol wiederherstellen
$Datumausgabe = Guictrlread($input9,0)
GUICtrlSetData($Input7, "WICHTIG / TERMINIEREN - SARAH WERNER / " & $kunde &" " & $tele & "" & $pc & " / KASPERSKY LÄUFT AUS AM " & $Datumausgabe & " [ Kaspersky " & $version & " ]" )
;~ GUICtrlCreateInput("test " & $test , 238, 348, 121, 21)
;~ GUICtrlCreateInput("Der Text der generiert werden soll (Zum kopieren) mit Variablen ", 240, 312, 625, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
EndSwitch
WEnd
Alles anzeigen
Das ist mein Script das was es Ausgibt am ende "GUICtrlSetData($Input7, "WICHTIG / TERMINIEREN...." soll in Outlook Als betreff stehn Das Datum was am ende ausgegeben wird ist das Datum und die zeit wäre z.b 10 uhr. Wie kann man sowas Realisieren ? Habe leider nicht viel ahnung davon und hatte schon mühe das Script so hin zu bekommen wie es jetzt ist
(danke noch mal für die Hilfe Raupi)