Ошибок мульён
Код:
#NoTrayIcon
#include <Misc.au3>
_Singleton(@ScriptName)
Opt("TrayMenuMode", 1)
$nAbout_TrayItem = TrayCreateItem("О Программе")
TrayCreateItem("")
$nExit = TrayCreateItem("Exit")
TraySetToolTip("test")
TraySetIcon("Shell32.dll", 22)
TraySetClick(8)
TraySetState()
Global $sPathFull = @ProgramFilesDir & "\test"
Global $aRun_Apps = StringSplit("test.exe|test2.exe|test3.exe", "|")
;~ If RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName) = "" Then _
;~ RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", '"' & @ScriptFullPath & '"')
Call("_Check_Run_Proc")
AdlibEnable("_Check_Run_Proc", 3000)
While 1
Switch TrayGetMsg()
Case $nAbout_TrayItem
MsgBox(270400,"О Программе", "2009г.", 5)
Case $nExit
Exit
EndSwitch
WEnd
Func _Check_Run_Proc()
For $i = 1 To $aRun_Apps[0]
If Not ProcessExists($aRun_Apps[$i]) Then
Run($sPathFull & "\" & $aRun_Apps[$i])
ConsoleWrite("Run - " & $aRun_Apps[$i] & @CRLF)
Sleep(300) ; -------- !!!
EndIf
Next
EndFunc