本帖最后由 leon460 于 2011-7-20 16:09 编辑 #include <File.au3>
#include <array.au3>
Opt("TrayIconHide",1)
$i=1
Do
Dim $szDrive, $szDir, $szFName, $szExt, $MaxNum = 0, $exeName, $workDir
$iniVar = IniReadSection($szDrive & $szDir & "Setting.ini", "List")
$sleeptime=IniRead($szDrive & $szDir & "Setting.ini", "sleeptime","sleeptime",10)
If @error Then
Exit
Else
For $j = 1 To $iniVar[0][0]
$TestPath = _PathSplit($iniVar[$j][1], $szDrive, $szDir, $szFName, $szExt)
$exeName = $szFName & $szExt
$workDir = $szDrive & $szDir
If Not ProcessExists($exeName) Then
If FileExists($workDir & $exeName) Then
ShellExecute($workDir & $exeName, "", $workDir, "", @SW_MINIMIZE)
Sleep(1500)
If WinActivate($szFName) Then
SendKeepActive($szFName)
Send("{ALT}+F+S")
EndIf
EndIf
EndIf
Next
EndIf
Sleep(60000*$sleeptime)
Until $i=0
|