Warum bekomme ich hier einen Fehler?

  • Hi @ all(again),
    vllt. stört es aber ich habe gerade das thema:
    "MsgBox text aber ohne Buttons wie zum Beispiel die OK Button" gelesen und wollte eine Funktion schreiben.
    aber ich bekomme den Error:

    Code
    C:\Dokumente und Einstellungen\Sylvia\Desktop\Domes Ordner Privat\sd.au3 (3) : ==> Variable used without being declared.:
    $OnlyMsgBoxGUI = GUICreate($titel, 315, 131, 342, 189, BitOR($WS_MINIMIZEBOX,$WS_DLGFRAME,$WS_GROUP,$WS_CLIPSIBLINGS))
    $OnlyMsgBoxGUI = GUICreate($titel, 315, 131, 342, 189, BitOR(^ ERROR
    >Exit code: 1	Time: 0.322

    hier mein Code:

    [autoit]

    #include <GUIConstants.au3>
    func OnlyMsgBox($titel,$text,$sleeptime)
    $OnlyMsgBoxGUI = GUICreate($titel, 315, 131, 342, 189, BitOR($WS_MINIMIZEBOX,$WS_DLGFRAME,$WS_GROUP,$WS_CLIPSIBLINGS))
    $OnlyMSGBoxLabel = GUICtrlCreateLabel($text, 8, 24, 300, 81)
    GUISetState(@SW_SHOW)
    Sleep($sleeptime)
    GUiDelete($OnlyMsgBoxGUI)
    EndFunc ;==>OnlyMsgBox

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

    OnlyMsgBox("Testbox","Testversuch der OnlyMsgBox Funktion",10000)

    [/autoit]

    Gruß Roggazzz

  • Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <WindowsConstants.au3>
    func OnlyMsgBox($titel,$text,$sleeptime)
    $OnlyMsgBoxGUI = GUICreate($titel, 315, 131, 342, 189, BitOR($WS_MINIMIZEBOX,$WS_DLGFRAME,$WS_GROUP,$WS_CLIPSIBLINGS))
    $OnlyMSGBoxLabel = GUICtrlCreateLabel($text, 8, 24, 300, 81)
    GUISetState(@SW_SHOW)
    Sleep($sleeptime)
    GUiDelete($OnlyMsgBoxGUI)
    EndFunc ;==>OnlyMsgBox

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

    OnlyMsgBox("Testbox","Testversuch der OnlyMsgBox Funktion",10000)

    [/autoit]

    MfG Schnuffel

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

    über mich...

    ich habe meine Erfahrungen hauptsächlich gesammelt in (grobe Übersicht):

    - RibbonBar Automation
    - MySQL Nutzung
    - GUIs in vielerlei Ausprägung
    - Nutzung von Powershell / Batch in AutoIt
    - Windows Automatisierung

    außerhalb von AutoIt:

    - Sprachen: PS, Batch, php, html(5), javascript, (perl eingeschränkt), vbs
    - Powershell (AD, WPF inkl. Multi-Threading, ...)
    - Deployment-Automatisierung ohne SCCM
    - Office-Nutzung mit COM-Object (AutoIt, PowerShell)
    - ActiveDirectory und alles was damit zusammenhängt
    - Hyper-V Clustering (Converged / Hyper Converged)
    - Serverhardware (Konfiguration, Aufbau, Architektur, Betrieb)

    Lieblingsthema:

    günstige Automatisierung von Vorgängen, für die andere Firmen viel Geld nehmen

    more to come ...