Hi!
Also das erste, was mir auffällt ist, dass du "Exit("Skriptl.exe")" geschrieben hast, obwohl "Exit" gereicht hätte:
Spoiler anzeigen
[autoit]
#NoTrayIcon
Opt("TrayMenuMode",1)
$Restart = TrayCreateItem("RESTART")
$Exit = TrayCreateItem("EXIT")
TraySetState()
While 1
$msg = TrayGetMsg()
Select
Case $msg = 0
ContinueLoop
Case $msg = $Restart
ShellExecute("D:\AutoIT\Skript.exe")
Exit
Case $msg = $Exit
ExitLoop
;Vielleicht ein richtiges Exit statt ExitLoop? Ich bin mir nämlich nicht ganz sicher, was du erreichen willst aber naja
EndSelect
WEnd
Exit
msgBox(0, "", "Hallo hier soll mein Skript hin")
[/autoit]Außerdem dient es der Übersicht n paar tabs einzufügen Aber is deine Sache.