Здравствуйте.
Использую AutoIt версии 3.3.8.1
Написал цикл проверки, но мучает уверенность, что его же можно написать гораздо короче.
К примеру через
Вот цикл:
Использую AutoIt версии 3.3.8.1
Написал цикл проверки, но мучает уверенность, что его же можно написать гораздо короче.
К примеру через
Код:
For
Вот цикл:
Код:
ProcExist()
Func PrcExist()
While 1
If ProcessExists('opera.exe')Then
MsgBox('', '', 'Закройте браузер Opera и работа продолжиться.')
ProcessWaitClose('opera.exe')
EndIf
If ProcessExists('firefox.exe') Then
MsgBox('', '', 'Закройте браузер Firefox и работа продолжиться.')
ProcessWaitClose('firefox.exe')
EndIf
If ProcessExists('chrome.exe') Then
MsgBox('', '', 'Закройте браузер GoogleChrome и работа продолжиться.')
ProcessWaitClose('chrome.exe')
EndIf
If ProcessExists('safari.exe') Then
MsgBox('', '', 'Закройте браузер Safari и работа продолжиться.')
ProcessWaitClose('safari.exe')
EndIf
If ProcessExists('palemoon.exe') Then
MsgBox('', '', 'Закройте браузер Palemoon и работа продолжиться.')
ProcessWaitClose('palemoon.exe')
EndIf
If ProcessExists('iexplore.exe') Then
MsgBox('', '', 'Закройте браузер IExplore и работа продолжиться.')
ProcessWaitClose('iexplore.exe')
EndIf
If ProcessExists('netscape.exe') Then
MsgBox('', '', 'Закройте браузер Netscape и работа продолжиться.')
ProcessWaitClose('netscape.exe')
EndIf
If ProcessExists('maxthon.exe') Then
MsgBox('', '', 'Закройте браузер Maxthon и работа продолжиться.')
ProcessWaitClose('maxthon.exe')
EndIf
If ProcessExists('thunderbird.exe') Then
MsgBox('', '', 'Закройте Thunderbird и работа продолжиться.')
ProcessWaitClose('thunderbird.exe')
EndIf
ExitLoop
WEnd
EndFunc