Helferlein bei der Arbeit

  • Hallo zusammen.
    Ich möchte mir ein Helferlein basteln und würde euch gern die Infos geben und erhoffe mir Ansätze und Funktionsvorlagen für ein gutes Komplettscript.
    Sprich, ich möchte nicht, dass ihr es komplett selber schreibt aber ich werde garantiert viel Hilfe benötigen. ;)

    Also:
    In meiner Firma haben wir eine Software für eine Ticketerfassung für Supportfälle.
    Ich habe dann als Beispiel ein Fenster geöffnet, wo ich das Fälligkeitsdatum gesetzt habe und mein nächster Schritt wäre es, einen Termin in Outlook zu erstellen.
    Das tut ich recht häufig und immer sehr ähnlich, dass ich mir dachte, das geht doch auch "fast" automatisch.

    Ablauf:

    Spoiler anzeigen


    Fenster ist offen.
    Ich starte das Script bei Bedarf manuell.
    Das Script prüft, wieviele Fenster offen sind, die mit dem Titel beginnen:
    Helpdesk: Request

    Fensterinfo:

    Spoiler anzeigen


    >>>> Window <<<<
    Title: Helpdesk: Request 201013691 (Firma GmbH)
    Class: TfrmHelpdesk
    Position: 1727, 32
    Size: 1024, 752
    Style: 0x16CF0000
    ExStyle: 0x00010100
    Handle: 0x000A0F98

    Sollte es mehr als eins geben, soll eine Radio-Auswahl erscheinen.
    Anzeige der Auswahlmöglichkeit = kompletter Titel des Fensters
    Dann werden weitere Infos vom ausgewählten Fenster ausgelesen:
    Das Script liesst folgende Controlls aus
    $Datum Control:

    Spoiler anzeigen


    >>>> Control <<<<
    Class: TCentronEdtDate
    Instance: 1
    ClassnameNN: TCentronEdtDate1
    Name:
    Advanced (Class): [CLASS:TCentronEdtDate; INSTANCE:1]
    ID: 592994
    Text:
    Position: 224, 79
    Size: 63, 21
    ControlClick Coords: 30, 11
    Style: 0x54010084
    ExStyle: 0x00000000
    Handle: 0x00090C62


    $Kursbeschreibung Control:

    Spoiler anzeigen


    >>>> Control <<<<
    Class: TsuiEdit
    Instance: 16
    ClassnameNN: TsuiEdit16
    Name:
    Advanced (Class): [CLASS:TsuiEdit; INSTANCE:16]
    ID: 594636
    Text:
    Position: 19, 123
    Size: 563, 19
    ControlClick Coords: 70, 11
    Style: 0x54010084
    ExStyle: 0x00000000
    Handle: 0x000912CC


    $Requestnummer Control:

    Spoiler anzeigen


    >>>> Control <<<<
    Class: TsuiEdit
    Instance: 15
    ClassnameNN: TsuiEdit15
    Name:
    Advanced (Class): [CLASS:TsuiEdit; INSTANCE:15]
    ID: 594122
    Text:
    Position: 64, 80
    Size: 73, 19
    ControlClick Coords: 18, 11
    Style: 0x54010884
    ExStyle: 0x00000000
    Handle: 0x000910CA


    $Firmenname

    Spoiler anzeigen


    >>>> Control <<<<
    Class: TCentronMemo
    Instance: 2
    ClassnameNN: TCentronMemo2
    Name:
    Advanced (Class): [CLASS:TCentronMemo; INSTANCE:2]
    ID: 595378
    Text:
    Position: 656, 78
    Size: 213, 21
    ControlClick Coords: 21, 4
    Style: 0x54010844
    ExStyle: 0x00000000
    Handle: 0x000915B2


    Dann seh ich die GUI und habe dort Eingabefelder, die bereits teilweise vorausgefüllt sind:
    Input1 = Fälligkeitsdatum, editierbar, Datum für Termineintrag bei Outlook 2010
    Input1: $Datum
    Input2 = Dauer des Termins, editierbar
    Input3 = Titel des Termins, editierbar
    Input3: Request: $Requestnummer | $Firmenname | $Kurzbeschreibung

    Dann soll noch die Kategorie in Outlook rot sein und diese heisst bei mir in Bearbeitung, wenn das wichtig ist zu wissen.
    Fertig.

    EDIT zuletzt von (Heute, 15:31):
    in der GUI noch eine weitere Radio-Auswahl:
    Radio1: in beiden (vorausgewählt)
    Radio2: nur in meinem Postfach
    Radio3: nur im Service-Postfach
    Ich habe zwei Postfächer (mein eigenes und eins, was "wie mein eigenes" eingebunden ist [Exchangkonten]), wo in beiden den Termin erstellen will.
    Aber der Titel im Service-Postfach in anderes.
    Wenn Radio1 dann,
    $Titel1=$Input1
    $Titel2: "LR " & $Input1
    EDITEnde

    Vielen Dank für jede Antwort.
    Lieben Gruß, Xethria

    5 Mal editiert, zuletzt von Xethria (24. September 2010 um 15:33)

  • ich bekomm meine Gedanken nicht zusammen:

    $liste=WinList("Helpdesk: Request")
    _ArrayDisplay($Liste)
    $Liste[0][0] ist die Anzahl der gefundenen Fenster
    und ich möchte nun die gefundenen Fenster als Auswahl in einer GUICtrlCreateCombo.
    Jemand eine Idee?

  • So?

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

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

    $Form1 = GUICreate("Form1", 200, 50)
    $Combo1 = GUICtrlCreateCombo("", 10, 20, 180, 25)
    GUISetState(@SW_SHOW)

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

    $liste=WinList("Helpdesk: Request")
    If $liste[0][0] Then
    $sText = $liste[1][0]
    For $i = 2 to $liste[0][0]
    $sText &= "|" & $liste[$i][0]
    Next
    GUICtrlSetData($Combo1, $sText)
    EndIf

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]
  • Ich möchte, dass wenn ich in GUICtrlCreateCombo etwas ausgewählt habe und die Maus loslasse,
    dass sofort $Input1 geändert/angepasst wird.
    $state1=GUICtrlRead($Combo1)
    $Kursbeschreibung = ControlGetText($state1, " ", "[CLASS:TsuiEdit; INSTANCE:16]") und in der selben GUI
    GUICtrlSetData($Input1, $Kursbeschreibung)

    geht das?

  • welche Outlook-Version verwendest Du denn?

    MfG Schnuffel

    "Sarkasmus ist die niedrigste Form des Witzes, aber die höchste Form der Intelligenz."
    Val McDermid

    ein paar Infos ...

    Wer mehr als "nur" Hilfe benötigt, kann sich gern im Forum "Programmieranfragen" an uns wenden. Wir helfen in allen Fällen, die die Forenregeln zulassen.

    Für schnelle Hilfe benötigen wir ein ! lauffähiges ! Script, dass wir als Demonstration des Problems testen können. Wer von uns erwartet ein Teilscript erstmal lauffähig zu bekommen, der hat
    1. keine wirkliche Not
    2. keinen Respekt vor Menschen die ihm in ihrer Freizeit Ihre Hilfe anbieten
    3. oder ist einfach nur faul und meint wir coden das für ihn

    In solchen Fällen erlaube ich mir, die Anfrage einfach zu ignorieren. ;)

  • Outlook 2010
    auf der Seite steht zwar, dass es für Outlook 2003 ist, aber ich konnte es nicht testen, weil ich den Befehl nicht bauen konnte.

    2 Mal editiert, zuletzt von Xethria (29. September 2010 um 10:15)

  • poste doch bitte mal den Code mit dem du es probiert hast.
    Hab zwar noch nicht mit der outlook.au3 gearbeitet aber vllt erkennt man den Fehler ja.

    PS: pushen nach 4 stunden ist viel zu früh -.-

  • Ich bin Frau, ich darf das! :P


    Soweit komm ich ja nicht. Weil ich den Aufbau nicht verstehen.

    Spoiler anzeigen
    [autoit]


    ;===============================================================================
    ;
    ; Function Name: _OutlookCreateAppointment()
    ; Description: Create an appointment using Microsoft Outlook.
    ; Syntax.........: _OutlookCreateAppointment($oOutlook, $sSubject, $sStartDate, $sEndDate = "", $sLocation = "", $fAllDayEvent = False, $sBody = "", $sReminder = 15, $sShowTimeAs = "", $iImportance = "", $iSensitivity = "", $iRecurrenceType = "", $sPatternStartDate = "", $sPatternEndDate = "", $iInterval = "", $iDayOfWeekMask = "", $iDay_MonthOfMonth_Year = "", $iInstance = "")
    ; Parameter(s): $oOutlook - Outlook object opened by a preceding call to _OutlookOpen().
    ; $sSubject - The Subject of the Appointment.
    ; $sStartDate - Start date & time of the Appointment, format YYYY-MM-DD HH:MM - or what is set locally.
    ; $sEndDate - Optional: End date & time of the Appointment, format YYYY-MM-DD HH:MM - or what is set locally.
    ; Number of minutes. If not set 30 minutes is used.
    ; $sLocation - Optional: The location where the meeting is going to take place.
    ; $fAllDayEvent - Optional: True or False(default), if set to True and the appointment is lasting for more than one day, end Date
    ; must be one day higher than the actual end Date.
    ; $sBody - Optional: The Body of the Appointment.
    ; $sReminder - Optional: Reminder in Minutes before start, 0 for no reminder
    ; $sShowTimeAs - Optional: $olBusy=2 (default), $olFree=0, $olOutOfOffice=3, $olTentative=1
    ; $iImportance - Optional: $olImportanceNormal=1 (default), $olImportanceHigh=2, $olImportanceLow=0
    ; $iSensitivity - Optional: $olNormal=0, $olPersonal=1, $olPrivate=2, $olConfidential=3
    ; $iRecurrenceType - Optional: $olRecursDaily=0, $olRecursWeekly=1, $olRecursMonthly=2, $olRecursMonthNth=3, $olRecursYearly=5, $olRecursYearNth=6
    ; $sPatternStartDate - Optional: Start Date of the Reccurent Appointment, format YYYY-MM-DD - or what is set locally.
    ; $sPatternEndDate - Optional: End Date of the Reccurent Appointment, format YYYY-MM-DD - or what is set locally.
    ; $iInterval - Optional: Interval between the Reccurent Appointment
    ; $iDayOfWeekMask - Optional: Add the values of the days the appointment shall occur. $olSunday=1, $olMonday=2, $olTuesday=4, $olWednesday=8, $olThursday=16, $olFriday=32, $olSaturday=64
    ; $iDay_MonthOfMonth_Year - Optional: DayOfMonth or MonthOfYear, Day of the month or month of the year on which the recurring appointment or task occurs
    ; $iInstance - Optional: This property is only valid for recurrences of the $olRecursMonthNth and $olRecursYearNth type and allows the definition of a recurrence pattern that is only valid for the Nth occurrence, such as "the 2nd Sunday in March" pattern. The count is set numerically: 1 for the first, 2 for the second, and so on through 5 for the last. Values greater than 5 will generate errors when the pattern is saved.
    ; Requirement(s): AutoIt3 with COM support (post 3.1.1)
    ; Return Value(s): On Success - Returns 1
    ; On Failure - Returns 0 and sets @ERROR > 0
    ; @ERROR = 1 - Illegal parameters
    ; @ERROR = 9 - ObjEvent error.
    ; Author(s): Wooltown
    ; Created: 2009-02-11
    ; Modified: -
    ;
    ;===============================================================================

    [/autoit]

    Und das gib es auch noch:

    Ich möchte, dass wenn ich in GUICtrlCreateCombo etwas ausgewählt habe und die Maus loslasse,
    dass sofort $Input1 geändert/angepasst wird.
    $state1=GUICtrlRead($Combo1)
    $Kursbeschreibung = ControlGetText($state1, " ", "[CLASS:TsuiEdit; INSTANCE:16]") und in der selben GUI
    GUICtrlSetData($Input1, $Kursbeschreibung)

    geht das?


  • Und das gib es auch noch:


    Habs herausgefunden:
    Ein Case für die Combo erfüllt meinen Wunsch.

    Spoiler anzeigen
    [autoit]

    Case $Combo1 ;nur bei Änderung der Combo sonst flackert die GUI
    $stateX = GUICtrlRead($Combo1)
    $DatumX = ControlGetText($stateX, " ", "[CLASS:TCentronEdtDate; INSTANCE:1]")
    GUICtrlSetData($Input1, $DatumX)
    GUICtrlSetData($Input3, $DatumX)

    [/autoit]

    Dann ärgert mich nur noch Outlook. :(