Sign in to follow this  
Followers 0
Daywap

Tray Icon click

7 posts in this topic

Hi, I am not new in AutoIt scripting, I already created some scripts for me but... Now I need some help, I wanted to ask you does it is impossible to click right button on tray icon in windows xp? Not using Mouse x,y and tray is another program.. For example TOR. This is tray: Posted Image . I need only to click right click on that tray( GREEN ONION) ;D. Like this: Posted Image. Any ideas?

Share this post


Link to post
Share on other sites



Hi, I am not new in AutoIt scripting, I already created some scripts for me but... Now I need some help, I wanted to ask you does it is impossible to click right button on tray icon in windows xp? Not using Mouse x,y and tray is another program.. For example TOR. This is tray: Posted Image . I need only to click right click on that tray( GREEN ONION) ;D. Like this: Posted Image. Any ideas?

Hi,

this should help you to start coding:

http://www.autoitscript.com/forum/index.php?showtopic=103494&st=0&p=733204&hl=systray_udfau3&fromsearch=1&#entry733204

;-))

Stefan

Share this post


Link to post
Share on other sites

Hi,

this should help you to start coding:

http://www.autoitscript.com/forum/index.php?showtopic=103494&st=0&p=733204&hl=systray_udfau3&fromsearch=1&#entry733204

;-))

Stefan

Thx :) Didn't saw it ;D

Share this post


Link to post
Share on other sites

Damn.. Another problem ;)

Script

#include "SysTray_UDF.au3"
;Left-click Feedreader's icon on system tray
; Press hide inactive icon's button part is from Valik's refresh system tray script!
$oldMatchMode = Opt("WinTitleMatchMode", 4)
$oldChildMode = Opt("WinSearchChildren", 1)
$class = "classname=Shell_TrayWnd"
$hControl = ControlGetHandle($class, "", "Open Skype")
; get tray position and move there. Helps if Auto Hide tray option is used.
$posTray = WinGetPos(_FindTrayToolbarWindow ())
MouseMove($posTray[0], $posTray[1])
$index = _SysTrayIconIndex ("Skype.exe"); Change this to some other application if needed
If $index <> -1 Then
   $pos = _SysTrayIconPos ($index)
   If $pos = -1 Then
      ; ***** Moved by CatchFish *****
      ; If XP and the Hide Inactive Icons mode is active
      If $hControl <> "" And ControlCommand($class, "", $hControl, "IsVisible", "") Then
         ControlClick($class, "", $hControl)
         Sleep(250); Small delay to allow the icons to be drawn
      EndIf
      ; ******************************
      $pos = _SysTrayIconPos ($index)
      If $pos = -1 Then Exit ; ** A real error this time;)
   EndIf
   MouseMove($pos[0], $pos[1])
   Sleep(1000)
   MouseClick("left")
EndIf

Just look to the end. I mean when left button is clicked on tray I need to make it click to second button named "Open Skype". How to do it? Thx :)

Share this post


Link to post
Share on other sites

There should be a shortcut for doing that like for example pressing "O" .

Just send("O").

Share this post


Link to post
Share on other sites

There should be a shortcut for doing that like for example pressing "O" .

Just send("O").

NOPE :)

Share this post


Link to post
Share on other sites

Thx, I got idea ;D. Just simply with keydown and "send" :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0