Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для Creat0R

Must AutoIt


Сообщения: 3054
Благодарности: 1009

Профиль | Сайт | Отправить PM | Цитировать


Вложения
Тип файла: zip SysTray_UDF.zip
(4.1 Kb, 165 просмотров)

Можно по PID:

Код: Выделить весь код
#NoTrayIcon
#include <SysTray_UDF.au3>
;

$Pid = ProcessExists("Opera.exe")

If Not $Pid Then
    MsgBox(16, "Error", "This process not exists")
    Exit
EndIf

$Index = _SysTrayIconIndex($Pid)

If @error Then
    MsgBox(16, "Error", "This process not have tray icon")
    Exit
EndIf

_SysTrayIconClick($Index, "Right")

If @error Then
    MsgBox(16, "Error", "There was an error to click on the icon")
    Exit
EndIf

Func _SysTrayIconClick($iIndex, $sButton="Main")
    Local $TrayIcon_Pos = _SysTrayIconPos($iIndex)
    If Not IsArray($TrayIcon_Pos) Then Return SetError(1, 0, 0)

    Local $Old_Mouse_Pos = MouseGetPos()
    MouseClick($sButton, $TrayIcon_Pos[0], $TrayIcon_Pos[1], 1, 0)
    MouseMove($Old_Mouse_Pos[0], $Old_Mouse_Pos[1], 0)
EndFunc
Рабочий SysTray_UDF.au3 (для последней версиии аутоита) прикрепил к сообщению.

-------
“Сделай так просто, как возможно, но не проще этого.”... “Ты никогда не решишь проблему, если будешь думать так же, как те, кто её создал.”

Альберт Эйнштейн

P.S «Не оказываю техподдержку через ПМ/ICQ, и по email - для этого есть форум. ©»

http://creator-lab.ucoz.ru/Images/Icons/autoit_icon.png Русское сообщество AutoIt | http://creator-lab.ucoz.ru/Images/Ic...eator_icon.png CreatoR's Lab | http://creator-lab.ucoz.ru/Images/Icons/oac_icon.png Opera AC Community

Это сообщение посчитали полезным следующие участники:

Отправлено: 07:01, 13-02-2009 | #2