Was ist an diesem Skript falsch? :/

  • [autoit]

    #include <ButtonConstants.au3>
    #include <ComboConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <TabConstants.au3>
    #include <WindowsConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Ausführen", 386, 316, 198, 121)
    $Label1 = GUICtrlCreateLabel("Ausführen", 120, 0, 136, 42)
    GUICtrlSetFont(-1, 22, 800, 6, "Palatino Linotype")
    $Tab1 = GUICtrlCreateTab(8, 48, 369, 257)
    GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
    $Ausfuehren = GUICtrlCreateTabItem("Ausführen")
    $ComboBox = GUICtrlCreateCombo("", 32, 104, 321, 25)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Start = GUICtrlCreateButton("Ausführen", 24, 160, 161, 105, $WS_GROUP)
    GUICtrlSetFont(-1, 16, 800, 0, "Palatino Linotype")
    $Beenden = GUICtrlCreateButton("Schließen", 200, 160, 161, 105, $WS_GROUP)
    GUICtrlSetFont(-1, 16, 800, 0, "Palatino Linotype")
    $Einstellungen = GUICtrlCreateTabItem("Einstellungen")
    $Label2 = GUICtrlCreateLabel("Name", 40, 72, 58, 30)
    GUICtrlSetFont(-1, 14, 800, 4, "Palatino Linotype")
    $Label3 = GUICtrlCreateLabel("Dateipfad", 200, 72, 94, 30)
    GUICtrlSetFont(-1, 14, 800, 4, "Palatino Linotype")
    $Name1 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "Name1",""), 32, 104, 81, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Dateipfad1 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "DateiPfad1",""), 136, 104, 217, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Label4 = GUICtrlCreateLabel("1", 16, 104, 14, 30)
    GUICtrlSetFont(-1, 14, 800, 4, "Palatino Linotype")
    $Label5 = GUICtrlCreateLabel("2", 16, 128, 14, 30)
    GUICtrlSetFont(-1, 14, 800, 4, "Palatino Linotype")
    $Label6 = GUICtrlCreateLabel("3", 16, 152, 14, 30)
    GUICtrlSetFont(-1, 14, 800, 4, "Palatino Linotype")
    $Label7 = GUICtrlCreateLabel("4", 16, 176, 14, 30)
    GUICtrlSetFont(-1, 14, 800, 4, "Palatino Linotype")
    $Label8 = GUICtrlCreateLabel("5", 16, 200, 14, 30)
    GUICtrlSetFont(-1, 14, 800, 4, "Palatino Linotype")
    $Label9 = GUICtrlCreateLabel("6", 16, 224, 14, 30)
    GUICtrlSetFont(-1, 14, 800, 4, "Palatino Linotype")
    $Label10 = GUICtrlCreateLabel("7", 16, 248, 14, 30)
    GUICtrlSetFont(-1, 14, 800, 4, "Palatino Linotype")
    $Name2 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "Name2",""), 32, 128, 81, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Dateipfad2 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "DateiPfad2",""), 136, 128, 217, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Name3 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "Name3",""), 32, 152, 81, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Dateipfad3 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "DateiPfad3",""), 136, 152, 217, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Name4 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "Name4",""), 32, 176, 81, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Dateipfad4 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "DateiPfad4",""), 136, 176, 217, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Name5 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "Name5",""), 32, 200, 81, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Dateipfad5 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "DateiPfad5",""), 136, 200, 217, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Name6 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "Name6",""), 32, 224, 81, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Dateipfad6 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "DateiPfad6",""), 136, 224, 217, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Name7 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "Name7",""), 32, 248, 81, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Dateipfad7 = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "DateiPfad7",""), 136, 248, 217, 21)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $Speichern = GUICtrlCreateButton("Einstellungen speichern", 72, 272, 241, 25, $WS_GROUP)
    GUICtrlSetFont(-1, 14, 800, 0, "Palatino Linotype")
    GUICtrlCreateTabItem("")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    $Combo = GUICtrlRead($Name1) & "|" & GUICtrlRead($Name2) & "|" & GUICtrlRead($Name3) & "|" & GUICtrlRead($Name4) & "|" & GUICtrlRead($Name5) & "|" & GUICtrlRead($Name6) & "|" & GUICtrlRead($name7)
    GUICtrlSetData($ComboBox,$Combo)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Speichern
    IniWrite("settings.ini", "Sektion", "Name1", GUICtrlRead($Name1))
    IniWrite("settings.ini", "Sektion", "Name2", GUICtrlRead($Name2))
    IniWrite("settings.ini", "Sektion", "Name3", GUICtrlRead($Name3))
    IniWrite("settings.ini", "Sektion", "Name4", GUICtrlRead($Name4))
    IniWrite("settings.ini", "Sektion", "Name5", GUICtrlRead($Name5))
    IniWrite("settings.ini", "Sektion", "Name6", GUICtrlRead($Name6))
    IniWrite("settings.ini", "Sektion", "Name7", GUICtrlRead($Name7))
    IniWrite("settings.ini", "Sektion", "DateiPfad1", GUICtrlRead($Dateipfad1))
    IniWrite("settings.ini", "Sektion", "DateiPfad2", GUICtrlRead($Dateipfad2))
    IniWrite("settings.ini", "Sektion", "DateiPfad3", GUICtrlRead($Dateipfad3))
    IniWrite("settings.ini", "Sektion", "DateiPfad4", GUICtrlRead($Dateipfad4))
    IniWrite("settings.ini", "Sektion", "DateiPfad5", GUICtrlRead($Dateipfad5))
    IniWrite("settings.ini", "Sektion", "DateiPfad6", GUICtrlRead($Dateipfad6))
    IniWrite("settings.ini", "Sektion", "DateiPfad7", GUICtrlRead($Dateipfad7))

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

    $Pfad = GUICreate("", 331, 66, 192, 124)
    $Text = GUICtrlCreateLabel("Datepfad dieser Exe:", 8, 8, 117, 21)
    GUICtrlSetFont(-1, 9, 800, 4, "Palatino Linotype")
    $k = GUICtrlCreateButton("OK!", 56, 32, 217, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    $ExePfad = GUICtrlCreateInput(IniRead("settings.ini", "Sektion", "DateiPfadExe",""), 128, 8, 193, 21)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $k
    $exe = GUICtrlRead($ExePfad)
    IniWrite("settings.ini", "Sektion", "DateiPfadExe", GUICtrlRead($ExePfad))
    sleep(300)
    Run($Exe)
    sleep(200)
    Exit
    EndSwitch
    WEnd
    Case $Start
    $Combo1_1 = GUICtrlRead($ComboBox)
    If $Combo1_1 = $Name1 Then
    Run($Dateipfad1)
    ElseIf $Combo1_1 = $Name2 Then
    Run($Dateipfad2)
    ElseIf $Combo1_1 = $Name3 Then
    Run($Dateipfad3)
    ElseIf $Combo1_1 = $Name4 Then
    Run($Dateipfad4)
    ElseIf $Combo1_1 = $Name5 Then
    Run($Dateipfad5)
    ElseIf $Combo1_1 = $Name6 Then
    Run($Dateipfad6)
    ElseIf $Combo1_1 = $Name7 Then
    Run($Dateipfad7)
    EndIf
    Run($Combo1_1)
    Case $Beenden
    Exit
    EndSwitch
    WEnd

    [/autoit]

    Also soweit funktioniert alles... bis ich meine datei in der combocox auswähle und sage das er sie starten soll... aber er startet nichts.,,

    Einmal editiert, zuletzt von Kajabuschka (21. Juni 2010 um 14:29)

  • Du muß den Inhalt der Inputfelder mit GUICtrlRead auslesen

    [autoit]

    ...
    Case $Start
    $Combo1_1 = GUICtrlRead($ComboBox)
    $Name1_read = GUICtrlRead($Name1)
    $Dateipfad1_read = GUICtrlRead($Dateipfad1)
    If $Combo1_1 = $Name1_read Then
    Run($Dateipfad1_read)
    ...

    [/autoit]
  • Bei mir wird der Dateipfad nicht unter "DateiPfad1" sondern "DateiPfadExe" eingetragen. Dadurch hat er keinen Pfad den er ausführen kann. Aber sonst wüsste ich auch nicht genau; manche deiner Schritte sind für mich nicht ganz verständlich.
    Schau dir mal mein Script an, was ich damals geschrieben hatte. Das hat eigentlich die selbe Idee wie dein Skript, nur dass man einfach den Text auf dem Desktop eingibt und dann das Programm gestartet wird

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Icon=Autostarter.ico
    #AutoIt3Wrapper_Compression=4
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <Misc.au3>
    #RequireAdmin
    Opt("TrayMenuMode", 1)
    Global $Pfad, $title, $Text, $Command, $TrayExit, $tray, $TrayTip, $Start, $Update, $TrayIcon, $Befehle, $Settings, $XP, $7
    $TrayExit = TrayCreateItem("Exit")
    $Pfad = @ScriptDir & "\Orders.ini"
    If FileExists(@ScriptDir & "\Settings.ini") = 0 Then
    FileInstall("D:\Dokumente und Einstellungen\Fabian\Desktop\Settings.ini", @ScriptDir & "\Settings.ini")
    EndIf
    _Settings()
    _Befehle()
    If FileExists(@WindowsDir & "\Media\Windows XP-Ping.wav") = 0 And $XP = 1 Then
    FileInstall("D:\WINDOWS\Media\Windows XP-Ping.wav", @WindowsDir & "\Media\Windows XP-Ping.wav")
    EndIf
    If FileExists(@WindowsDir & "\Media\Windows Ding.wav") = 0 And $7 = 1 Then
    FileInstall("D:\Dokumente und Einstellungen\Fabian\Desktop\Media win 7\Windows Ding.wav", @WindowsDir & "\Media\Windows Ding.wav")
    EndIf
    $Start = TimerInit()
    While 1
    If $TrayIcon = 1 Then
    Opt("TrayIconHide", 0)
    EndIf
    If $Update <> -1 Then ;=== Settings updaten
    If TimerDiff($Start) >= $Update Then
    _Settings()
    _Befehle()
    $Start = TimerInit()
    EndIf
    EndIf
    $tray = TrayGetMsg() ;=== Beenden
    If $tray = $TrayExit Then
    If $XP = 1 Then
    FileInstall("D:\WINDOWS\Media\Windows XP-Ping.wav", @WindowsDir & "\Media\Windows XP-Ping.wav")
    EndIf
    If $7 = 1 Then
    FileInstall("D:\Dokumente und Einstellungen\Fabian\Desktop\Media win 7\Windows Ding.wav", @WindowsDir & "\Media\Windows Ding.wav")
    EndIf
    Exit
    EndIf
    $title = WinGetTitle("") ;=== Files installieren
    If $title <> "Program Manager" And $title <> "" Then
    $Text = ""
    If $XP = 1 Then
    FileInstall("D:\WINDOWS\Media\Windows XP-Ping.wav", @WindowsDir & "\Media\Windows XP-Ping.wav")
    EndIf
    If $7 = 1 Then
    FileInstall("D:\Dokumente und Einstellungen\Fabian\Desktop\Media win 7\Windows Ding.wav", @WindowsDir & "\Media\Windows Ding.wav")
    EndIf
    EndIf
    If WinActive("Program Manager") Then ;=== MAIN
    If $TrayTip = 1 And $TrayIcon = 0 And $Text <> "" Then
    Opt("TrayIconHide", 0)
    EndIf
    If $TrayTip = 1 Then
    TrayTip("Order", $Text, 4)
    EndIf
    If FileExists(@WindowsDir & "\Media\Windows XP-Ping.wav") = 1 And $XP = 1 Then
    FileDelete(@WindowsDir & "\Media\Windows XP-Ping.wav")
    EndIf
    If FileExists(@WindowsDir & "\Media\Windows XP-Ping.wav") = 1 And $7 = 1 Then
    FileDelete(@WindowsDir & "\Media\Windows Ding.wav")
    EndIf
    #Region Tasten
    #Region normale Tasten
    If _IsPressed("E2") Then
    While _IsPressed("E2")
    Sleep(2)
    WEnd
    $Text = $Text & "<"
    EndIf
    If _IsPressed("BB") Then
    While _IsPressed("BB")
    Sleep(2)
    WEnd
    $Text = $Text & "+"
    EndIf
    If _IsPressed("DC") Then
    While _IsPressed("DC")
    Sleep(2)
    WEnd
    $Text = $Text & "^"
    EndIf
    If _IsPressed("BF") Then
    While _IsPressed("BF")
    Sleep(2)
    WEnd
    $Text = $Text & "#"
    EndIf
    If _IsPressed("DE") Then
    While _IsPressed("DE")
    Sleep(2)
    WEnd
    $Text = $Text & "ä"
    EndIf
    If _IsPressed("C0") Then
    While _IsPressed("C0")
    Sleep(2)
    WEnd
    $Text = $Text & "ö"
    EndIf
    If _IsPressed("BA") Then
    While _IsPressed("BA")
    Sleep(2)
    WEnd
    $Text = $Text & "ü"
    EndIf
    If _IsPressed("BC") Then
    While _IsPressed("BC")
    Sleep(2)
    WEnd
    $Text = $Text & ","
    EndIf
    If _IsPressed("BD") Then
    While _IsPressed("BD")
    Sleep(2)
    WEnd
    $Text = $Text & "-"
    EndIf
    If _IsPressed("BE") Then
    While _IsPressed("BE")
    Sleep(2)
    WEnd
    $Text = $Text & "."
    EndIf
    If _IsPressed("DB") Then
    While _IsPressed("DB")
    Sleep(2)
    WEnd
    $Text = $Text & "ß"
    EndIf
    If _IsPressed(20) Then
    While _IsPressed(20)
    Sleep(2)
    WEnd
    $Text = $Text & " "
    EndIf
    If _IsPressed(30) Then
    While _IsPressed(30)
    Sleep(2)
    WEnd
    $Text = $Text & "0"
    EndIf
    If _IsPressed(31) Then
    While _IsPressed(31)
    Sleep(2)
    WEnd
    $Text = $Text & "1"
    EndIf
    If _IsPressed(32) Then
    While _IsPressed(32)
    Sleep(2)
    WEnd
    $Text = $Text & "2"
    EndIf
    If _IsPressed(33) Then
    While _IsPressed(33)
    Sleep(2)
    WEnd
    $Text = $Text & "3"
    EndIf
    If _IsPressed(34) Then
    While _IsPressed(34)
    Sleep(2)
    WEnd
    $Text = $Text & "4"
    EndIf
    If _IsPressed(35) Then
    While _IsPressed(35)
    Sleep(2)
    WEnd
    $Text = $Text & "5"
    EndIf
    If _IsPressed(36) Then
    While _IsPressed(36)
    Sleep(2)
    WEnd
    $Text = $Text & "6"
    EndIf
    If _IsPressed(37) Then
    While _IsPressed(37)
    Sleep(2)
    WEnd
    $Text = $Text & "7"
    EndIf
    If _IsPressed(38) Then
    While _IsPressed(38)
    Sleep(2)
    WEnd
    $Text = $Text & "8"
    EndIf
    If _IsPressed(39) Then
    While _IsPressed(39)
    Sleep(2)
    WEnd
    $Text = $Text & "9"
    EndIf
    If _IsPressed(41) Then
    While _IsPressed(41)
    Sleep(2)
    WEnd
    $Text = $Text & "a"
    EndIf
    If _IsPressed(42) Then
    While _IsPressed(42)
    Sleep(2)
    WEnd
    $Text = $Text & "b"
    EndIf
    If _IsPressed(43) Then
    While _IsPressed(43)
    Sleep(2)
    WEnd
    $Text = $Text & "c"
    EndIf
    If _IsPressed(44) Then
    While _IsPressed(44)
    Sleep(2)
    WEnd
    $Text = $Text & "d"
    EndIf
    If _IsPressed(45) Then
    While _IsPressed(45)
    Sleep(2)
    WEnd
    $Text = $Text & "e"
    EndIf
    If _IsPressed(46) Then
    While _IsPressed(46)
    Sleep(2)
    WEnd
    $Text = $Text & "f"
    EndIf
    If _IsPressed(47) Then
    While _IsPressed(47)
    Sleep(2)
    WEnd
    $Text = $Text & "g"
    EndIf
    If _IsPressed(48) Then
    While _IsPressed(48)
    Sleep(2)
    WEnd
    $Text = $Text & "h"
    EndIf
    If _IsPressed(49) Then
    While _IsPressed(49)
    Sleep(2)
    WEnd
    $Text = $Text & "i"
    EndIf
    If _IsPressed("4A") Then
    While _IsPressed("4A")
    Sleep(2)
    WEnd
    $Text = $Text & "j"
    EndIf
    If _IsPressed("4B") Then
    While _IsPressed("4B")
    Sleep(2)
    WEnd
    $Text = $Text & "k"
    EndIf
    If _IsPressed("4C") Then
    While _IsPressed("4C")
    Sleep(2)
    WEnd
    $Text = $Text & "l"
    EndIf
    If _IsPressed("4D") Then
    While _IsPressed("4D")
    Sleep(2)
    WEnd
    $Text = $Text & "m"
    EndIf
    If _IsPressed("4E") Then
    While _IsPressed("4E")
    Sleep(2)
    WEnd
    $Text = $Text & "n"
    EndIf
    If _IsPressed("4F") Then
    While _IsPressed("4F")
    Sleep(2)
    WEnd
    $Text = $Text & "o"
    EndIf
    If _IsPressed(50) Then
    While _IsPressed(50)
    Sleep(2)
    WEnd
    $Text = $Text & "p"
    EndIf
    If _IsPressed(51) Then
    While _IsPressed(51)
    Sleep(2)
    WEnd
    $Text = $Text & "q"
    EndIf
    If _IsPressed(52) Then
    While _IsPressed(52)
    Sleep(2)
    WEnd
    $Text = $Text & "r"
    EndIf
    If _IsPressed(53) Then
    While _IsPressed(53)
    Sleep(2)
    WEnd
    $Text = $Text & "s"
    EndIf
    If _IsPressed(54) Then
    While _IsPressed(54)
    Sleep(2)
    WEnd
    $Text = $Text & "t"
    EndIf
    If _IsPressed(55) Then
    While _IsPressed(55)
    Sleep(2)
    WEnd
    $Text = $Text & "u"
    EndIf
    If _IsPressed(56) Then
    While _IsPressed(56)
    Sleep(2)
    WEnd
    $Text = $Text & "v"
    EndIf
    If _IsPressed(57) Then
    While _IsPressed(57)
    Sleep(2)
    WEnd
    $Text = $Text & "w"
    EndIf
    If _IsPressed(58) Then
    While _IsPressed(58)
    Sleep(2)
    WEnd
    $Text = $Text & "x"
    EndIf
    If _IsPressed(59) Then
    While _IsPressed(59)
    Sleep(2)
    WEnd
    $Text = $Text & "y"
    EndIf
    If _IsPressed("5A") Then
    While _IsPressed("5A")
    Sleep(2)
    WEnd
    $Text = $Text & "z"
    EndIf
    #EndRegion normale Tasten
    #Region Num Tasten
    If _IsPressed(60) Then
    While _IsPressed(60)
    Sleep(2)
    WEnd
    _Num0()
    EndIf
    If _IsPressed(61) Then
    While _IsPressed(61)
    Sleep(2)
    WEnd
    _Num1()
    EndIf
    If _IsPressed(62) Then
    While _IsPressed(62)
    Sleep(2)
    WEnd
    _Num2()
    EndIf
    If _IsPressed(63) Then
    While _IsPressed(63)
    Sleep(2)
    WEnd
    _Num3()
    EndIf
    If _IsPressed(64) Then
    While _IsPressed(64)
    Sleep(2)
    WEnd
    _Num4()
    EndIf
    If _IsPressed(65) Then
    While _IsPressed(65)
    Sleep(2)
    WEnd
    _Num5()
    EndIf
    If _IsPressed(66) Then
    While _IsPressed(66)
    Sleep(2)
    WEnd
    _Num6()
    EndIf
    If _IsPressed(67) Then
    While _IsPressed(67)
    Sleep(2)
    WEnd
    _Num7()
    EndIf
    If _IsPressed(68) Then
    While _IsPressed(68)
    Sleep(2)
    WEnd
    _Num8()
    EndIf
    If _IsPressed(69) Then
    While _IsPressed(69)
    Sleep(2)
    WEnd
    _Num9()
    EndIf
    #EndRegion Num Tasten
    #Region F Tasten
    HotKeySet("{F1}", "_Reset")
    HotKeySet("{F2}", "_F2")
    HotKeySet("{F3}", "_F3")
    HotKeySet("{F4}", "_F4")
    HotKeySet("{F5}", "_F5")
    HotKeySet("{F6}", "_F6")
    HotKeySet("{F7}", "_F7")
    HotKeySet("{F8}", "_F8")
    HotKeySet("{F9}", "_F9")
    HotKeySet("{F10}", "_F10")
    HotKeySet("{F11}", "_F11")
    HotKeySet("{F12}", "_F12")
    ;~ If _IsPressed(71) Then
    ;~ While _IsPressed(71)
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F2()
    ;~ EndIf
    ;~ If _IsPressed(72) Then
    ;~ While _IsPressed(72)
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F3()
    ;~ EndIf
    ;~ If _IsPressed(73) Then
    ;~ While _IsPressed(73)
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F4()
    ;~ EndIf
    ;~ If _IsPressed(74) Then
    ;~ While _IsPressed(74)
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F5()
    ;~ EndIf
    ;~ If _IsPressed(75) Then
    ;~ While _IsPressed(75)
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F6()
    ;~ EndIf
    ;~ If _IsPressed(76) Then
    ;~ While _IsPressed(76)
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F7()
    ;~ EndIf
    ;~ If _IsPressed(77) Then
    ;~ While _IsPressed(77)
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F8()
    ;~ EndIf
    ;~ If _IsPressed(78) Then
    ;~ While _IsPressed(78)
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F9()
    ;~ EndIf
    ;~ If _IsPressed(79) Then
    ;~ While _IsPressed(79)
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F10()
    ;~ EndIf
    ;~ If _IsPressed("7A") Then
    ;~ While _IsPressed("7A")
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F11()
    ;~ EndIf
    ;~ If _IsPressed("7B") Then
    ;~ While _IsPressed("7B")
    ;~ Sleep(2)
    ;~ WEnd
    ;~ _F12()
    ;~ EndIf
    #EndRegion F Tasten
    #EndRegion Tasten
    For $i = 1 To $Befehle[0] ;=== Ausführen
    If $Befehle[$i] = $Text Then
    $IniPfad = IniRead($Pfad, $Befehle[$i], "Path", "")
    ShellExecute($IniPfad)
    $Text = ""
    EndIf
    Next
    Else ;=== Hotkeys wieder freigeben
    HotKeySet("{F1}")
    HotKeySet("{F2}")
    HotKeySet("{F3}")
    HotKeySet("{F4}")
    HotKeySet("{F5}")
    HotKeySet("{F6}")
    HotKeySet("{F7}")
    HotKeySet("{F8}")
    HotKeySet("{F9}")
    HotKeySet("{F10}")
    HotKeySet("{F11}")
    HotKeySet("{F12}")
    Sleep(150) ;=== Ressource
    If $TrayIcon = 0 Then
    Opt("TrayIconHide", 1)
    EndIf
    EndIf
    WEnd

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

    Func _Befehle() ;=== Befehle auslesen
    $Befehle = IniReadSectionNames($Pfad)
    If @error Then
    MsgBox(48, "Attention!", 'No "Orders.ini" was found in the installed directory; Program was shut down.')
    Exit
    EndIf
    EndFunc ;==>_Befehle

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

    Func _Settings() ;=== Settings auslesen
    If FileExists(@ScriptDir & "\Settings.ini") = 1 Then
    $Settings = IniReadSection(@ScriptDir & "\Settings.ini", "Settings")
    If $Settings[1][1] = 0 Then
    $TrayIcon = 0
    Opt("TrayIconHide", 1)
    Else
    $TrayIcon = 1
    EndIf
    If $Settings[2][1] = 1 Then
    RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Autostarter", "REG_SZ", @ScriptFullPath)
    Else
    RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Autostarter")
    EndIf
    If $Settings[3][1] = 1 Then
    If FileExists(@ScriptDir & "\ExampelOrders.ini") = 0 Then
    FileInstall("D:\Dokumente und Einstellungen\Fabian\Desktop\ExampelOrders.ini", @ScriptDir & "\ExampelOrders.ini")
    EndIf
    EndIf
    If $Settings[4][1] = 1 Then
    $TrayTip = 1
    Else
    $TrayTip = 0
    EndIf
    $Update = $Settings[5][1]
    If @error Then
    MsgBox(64, "Attention!", "No Updatetime set!")
    Else
    If $Update = 0 Then
    $Update = -1
    Else
    $Update = $Update * 1000
    EndIf
    EndIf
    If $Settings[6][1] = 1 And FileExists(@ScriptDir & "\README.txt") = 0 Then
    FileInstall("D:\Dokumente und Einstellungen\Fabian\Desktop\README.txt", @ScriptDir & "\README.txt")
    EndIf
    If $Settings[7][1] = "XP" Then
    $XP = 1
    EndIf
    If $Settings[7][1] = "7" Then
    $7 = 1
    EndIf
    EndIf
    EndFunc ;==>_Settings

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

    Func _Reset()
    $Text = ""
    EndFunc ;==>_Reset
    ;== Num
    Func _Num0()
    $Command = '"Num0"'
    _starten()
    EndFunc ;==>_Num0
    Func _Num1()
    $Command = '"Num1"'
    _starten()
    EndFunc ;==>_Num1
    Func _Num2()
    $Command = '"Num2"'
    _starten()
    EndFunc ;==>_Num2
    Func _Num3()
    $Command = '"Num3"'
    _starten()
    EndFunc ;==>_Num3
    Func _Num4()
    $Command = '"Num4"'
    _starten()
    EndFunc ;==>_Num4
    Func _Num5()
    $Command = '"Num5"'
    _starten()
    EndFunc ;==>_Num5
    Func _Num6()
    $Command = '"Num6"'
    _starten()
    EndFunc ;==>_Num6
    Func _Num7()
    $Command = '"Num7"'
    _starten()
    EndFunc ;==>_Num7
    Func _Num8()
    $Command = '"Num8"'
    _starten()
    EndFunc ;==>_Num8
    Func _Num9()
    $Command = '"Num9"'
    _starten()
    EndFunc ;==>_Num9
    ;== F
    Func _F2()
    $Command = '"F2"'
    _starten()
    EndFunc ;==>_F2
    Func _F3()
    $Command = '"F3"'
    _starten()
    EndFunc ;==>_F3
    Func _F4()
    $Command = '"F4"'
    _starten()
    EndFunc ;==>_F4
    Func _F5()
    $Command = '"F5"'
    _starten()
    EndFunc ;==>_F5
    Func _F6()
    $Command = '"F6"'
    _starten()
    EndFunc ;==>_F6
    Func _F7()
    $Command = '"F7"'
    _starten()
    EndFunc ;==>_F7
    Func _F8()
    $Command = '"F8"'
    _starten()
    EndFunc ;==>_F8
    Func _F9()
    $Command = '"F9"'
    _starten()
    EndFunc ;==>_F9
    Func _F10()
    $Command = '"F10"'
    _starten()
    EndFunc ;==>_F10
    Func _F11()
    $Command = '"F11"'
    _starten()
    EndFunc ;==>_F11
    Func _F12()
    $Command = '"F12"'
    _starten()
    EndFunc ;==>_F12

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

    Func _starten() ;=== Schnellstarttasten starten
    For $i = 1 To $Befehle[0]
    If $Befehle[$i] = $Command Then
    $IniPfad = IniRead($Pfad, $Befehle[$i], "Path", "")
    ShellExecute($IniPfad)
    $Text = ""
    EndIf
    Next
    EndFunc ;==>_starten

    [/autoit]

    Beispiel:

    Spoiler anzeigen

    [VLC]
    Path=C:\Program files\VLC media player\vlc.exe --> To start Vlc-Player by tipping vlc on the Dektop
    ATTENTION: Numblock Numbers are extra, if you write numbers (e.g. cod4) dont use them!
    ["Num5"]
    Path=www.google.com --> Press Numblocknumber 5 to visit google.com with your default web browser
    To use F2-F12 also write them in "" (e.g. "F2")
    [Num1]
    Path=C:\Program files\ --> To open the Program files directory by tipping num1 (NOT Numblock 1!!!)

    You can use all letters, all Numblock numbers and F2-F12.
    If you press F1 or change to another Window the storage will be cleaned and ready for a new order.
    AS a path you can also use weblinks, images, music files, videos, and much more ;)

    Here are some "extra" orders to call some general things:

    Administrative Tools "::{D20EA4E1-3957-11d2-A40B-0C5020524153}"
    Briefcase "::{85BBD920-42A0-1069-A2E4-08002B30309D}"
    Control Panel "::{21EC2020-3AEA-1069-A2DD-08002b30309d}"
    Fonts "::{D20EA4E1-3957-11d2-A40B-0C5020524152}"
    History "::{FF393560-C2A7-11CF-BFF4-444553540000}"
    Inbox "::{00020D75-0000-0000-C000-000000000046}"
    Microsoft Network "::{00028B00-0000-0000-C000-000000000046}"
    My Computer "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
    My Documents "::{450D8FBA-AD25-11D0-98A8-0800361B1103}"
    My Network Places "::{208D2C60-3AEA-1069-A2D7-08002B30309D}"
    Network Computers "::{1f4de370-d627-11d1-ba4f-00a0c91eedba}"
    Network Connections "::{7007ACC7-3202-11D1-AAD2-00805FC1270E}"
    Printers and Faxes "::{2227A280-3AEA-1069-A2DE-08002B30309D}"
    Programs Folder "::{7be9d83c-a729-4d97-b5a7-1b7313c39e0a}"
    Recycle Bin "::{645FF040-5081-101B-9F08-00AA002F954E}"
    Scanners and Cameras "::{E211B736-43FD-11D1-9EFB-0000F8757FCD}"
    Scheduled Tasks "::{D6277990-4C6A-11CF-8D87-00AA0060F5BF}"
    Start Menu Folder "::{48e7caab-b918-4e58-a94d-505519c795dc}"
    Temporary Internet Files "::{7BD29E00-76C1-11CF-9DD0-00A0C9034933}"
    Web Folders "::{BDEADF00-C265-11d0-BCED-00A0C90AB50F}"

    Damit kannst du dann auch z.B. Links öffnen lassen, weil es nicht mit Run, sondern Shellexecute läuft.
    Viele Grüße Aquaplant

    //EDIT:
    Achja, das Readme:

    Spoiler anzeigen

    \/\/\/\/\/\/\/\/\/\/\/\/\/\/
    >This is Version 1.15[Alpha]<
    /\/\/\/\/\/\/\/\/\/\/\/\/\/\

    Before you can use this program you have to create "Orders.ini" in the directory, where the program usually
    is running. How do you structure this file please look up in the "ExampleOrders.ini", which is already created
    in this directory.
    ====================================================================================================================
    There is also a file called "Settings.ini". In this you can configurate some things:
    TrayIcon=1 ;shows the program icon in your taskbar (generally at the bottom right) 0=disable
    StartWithWindows=1 ;starts the program automatically with Windows 0=disable
    InstallExampleINI=1 ;to install the "ExampleOrders.ini" if you wanna delete this file you have to set 0 too
    TrayTip=1 ;this shows a tray tip with the text you already wrote to your desktop
    Updatetime(seconds)=300 ;in this case: every 5 minutes the running program checks if there are new orders & settings
    If you set 0 sec there will be NO update
    InstallREADME=1 ;look @ InstallExampleINI
    Windows=XP ;you can set "XP", "Vista", "7" or "other"
    ====================================================================================================================
    By disabling the tray icon but activating the tray tip, the tray icon will be shown for the time you are tipping.

    If you made a mistake by writing an order press F1 and start again (this clears the memory).

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    IMPORTANT:
    The program is for Windows XP, I'm sure that it will do its job with Vista and Win7 as well but I couldn't test it
    on this operating system. There might are some trouble!
    I don't take any responsible for using this program or damge that may cause!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


    Und die Settings.ini sieht so aus:

    Spoiler anzeigen

    [Settings]
    TrayIcon=1
    StartWithWindows=1
    InstallExampleINI=0
    TrayTip=1
    Updatetime(seconds)=150
    InstallREADME=0
    Windows=XP