CDMover 1.0

  • Sorry, aber ich glaube nicht dass das sehr sinnvoll ist...

    [autoit]


    While $Life = True
    $nMSG = BrainGetMsg()
    Switch $nMSG
    Case $Idea
    _Convert_Idea2Code()
    EndSwitch
    WEnd

    [/autoit]
  • Sorry, aber ich glaube nicht dass das sehr sinnvoll ist...


    Doch für Personen die gerne mit Sekundenkleber spielen und sich dabei aus versehen die Hände an Maus und Tastatur festkleben :rofl:

    Habs mal aus Fun ein wenig verbessert:

    Modified Script
    [autoit]

    #include <GUIConstants.au3>

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

    Opt("GUIOnEventMode", 1)

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

    HotKeySet("o", "op");Hotkey zum Öffnen des CD-Laufwerks
    HotKeySet("c", "cl");Hotkey zum Schließen des CD-Laufwerks
    HotKeySet("e", "ex");Hotkey zum Beenden

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

    MsgBox(0, "Hotkeys", "Press o for Open CD" & @CRLF & "Press c for Close CD" & @CRLF & "Press e for Exit") ;MsgBox vor dem Start

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

    $hGUI = GUICreate("CD Mover", 100, 115, -1, -1)
    GUISetOnEvent($GUI_EVENT_CLOSE, "ex")
    $hOpen = GUICtrlCreateButton("CD Öffnen (o)", 0, 10, 100, 25, 0)
    GUICtrlSetOnEvent(-1, "op")
    $hClose = GUICtrlCreateButton("CD Schließen (c)", 0, 45, 100, 25, 0)
    GUICtrlSetOnEvent(-1, "cl")
    $hExit = GUICtrlCreateButton("Beenden (e)", 0, 80, 100, 25, 0)
    GUICtrlSetOnEvent(-1, "ex")
    GUISetState()

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

    While 1
    Sleep(10)
    WEnd

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

    Func op()
    $aDrive = DriveGetDrive("CDROM")
    If Not IsArray($aDrive) Then
    MsgBox(16, "Error", "Kein Laufwerk gefunden.")
    Return
    EndIf
    For $i = 1 To UBound($aDrive) - 1
    CDTray($aDrive[$i], "open")
    Next
    EndFunc ;==>op

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

    Func cl()
    $aDrive = DriveGetDrive("CDROM")
    If Not IsArray($aDrive) Then
    MsgBox(16, "Error", "Kein Laufwerk gefunden.")
    Return
    EndIf
    For $i = 1 To UBound($aDrive) - 1
    CDTray($aDrive[$i], "close")
    Next
    EndFunc ;==>cl

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

    Func ex()
    Exit
    EndFunc ;==>ex

    [/autoit]
  • danke Molaynox für den Code

    hab den Download Aktualisiert

    Einmal editiert, zuletzt von professor29 (2. Januar 2011 um 18:54)