AutoHotkey Community

It is currently May 27th, 2012, 11:01 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 139 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10  Next
Author Message
 Post subject:
PostPosted: June 8th, 2010, 7:35 pm 
Offline

Joined: August 25th, 2007, 9:25 pm
Posts: 110
Hey Sean.

Is it possible to retrieve, if an Tray-Icon has changed?
I have hidden my entirely taskbar through AHK and want to get a message, if my instant messenger retrieves a message, which it indicates with a blinking tray icon. But the info, that is shown by your script is always the same :(

I hope you have an advice :)
Greets, flashkid


Last edited by flashkid on June 17th, 2010, 1:34 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 17th, 2010, 8:12 am 
Hi Sean,

i worked for some reason with your great script and understand - something, something works without understandig ;-)

Now i have a problem to get infos from a Taskicon. The program "Office Upload Center" have the Tooltip "Microsoft Office Upload Center" and in the next line "Es steht kein Upload von Dateien aus.". How can i get the Infos from the second line?

sTooltip contains only the first line (Microsoft Office Upload Center).

The Reason: I like to set a timer, that checks if the program is active (upload) or not. If there is no upload active or in pipe, i like to kill the process.

Thanks,
Wätsch


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 17th, 2010, 4:55 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
I don't think you can with this method. MSOSYNC.EXE uses its own tooltip window to display its dynamic content.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 17th, 2010, 5:01 pm 
Offline

Joined: August 25th, 2007, 9:25 pm
Posts: 110
What do you think about my question, Sean? :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 17th, 2010, 5:21 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
What you meant by blinking trayicon? Is the trayicon changed? The script contains unused value, locate hIcon in the script. If the trayicon is changed, hIcon should be changed too.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 17th, 2010, 5:58 pm 
Offline

Joined: August 25th, 2007, 9:25 pm
Posts: 110
Thank's it works great :)

I meant that the Icon changes from the default to a message symbol that flashes every second ;)
Now I can recognize this.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2010, 11:44 am 
I'm running Win7 and the original script only returns information about trayicons not hidden by the OS

Is it somehow possible to retrieve information about the hidden tray icons as well?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2010, 12:05 pm 
Offline

Joined: August 25th, 2007, 9:25 pm
Posts: 110
http://www.autohotkey.com/forum/post-328110.html#328110
Works.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 7th, 2010, 5:04 pm 
Offline

Joined: June 7th, 2007, 1:33 pm
Posts: 1019
I need to click a tray icon (with either right or left mouse click) and close that program

can it be done? any help?

thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 7th, 2010, 6:35 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
It's possible. It depends on your skill.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2010, 4:28 am 
Offline

Joined: November 8th, 2009, 2:46 am
Posts: 234
Location: Canberra Oz
I've upgraded to Win7/64bit.

My TrayIcon_CleanUp() version posted earlier (end page 6) no longer works.

I tried the Win7 changes Sean posted to his original script but no luck.

Now I'm thinking it can't work in 64 bit mode as the OpenProcess & VirtualAllocEx won't work across a 32/64 bit process.

Can anyone confirm? Any suggestions would be welcome.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2010, 11:32 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
Michael@oz wrote:
Now I'm thinking it can't work in 64 bit mode as the OpenProcess & VirtualAllocEx won't work across a 32/64 bit process.
No, they'll still work, the expected problem does not lie there. Anyway, out of curiosity, I just tested my original script, after some adjustment necessary for UNICODE build, and it still worked with 32bit UNIOCDE AHK_L in my 64bit Win7. I'm delighted, although I'm expecting it'll be eventually broken, either totally or partially, and recommend porting the script to 64bit AHK_L.

BTW, Win7 actually uses three ToolbarWindow32's for the trayicons, so you have to retrieve all of them.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2010, 10:11 pm 
Sean wrote:
recommend porting the script to 64bit AHK_L.

BTW, Win7 actually uses three ToolbarWindow32's for the trayicons, so you have to retrieve all of them.


Thanks Sean. I've been away from here for a while, I noticed 64bit version yesterday, I'll be giving that a go now.


Report this post
Top
  
Reply with quote  
 Post subject: win7 64bit
PostPosted: January 7th, 2011, 5:17 am 
Sean wrote:
Michael@oz wrote:
Now I'm thinking it can't work in 64 bit mode as the OpenProcess & VirtualAllocEx won't work across a 32/64 bit process.
No, they'll still work, the expected problem does not lie there. Anyway, out of curiosity, I just tested my original script, after some adjustment necessary for UNICODE build, and it still worked with 32bit UNIOCDE AHK_L in my 64bit Win7. I'm delighted, although I'm expecting it'll be eventually broken, either totally or partially, and recommend porting the script to 64bit AHK_L.

BTW, Win7 actually uses three ToolbarWindow32's for the trayicons, so you have to retrieve all of them.


can you post the script that works on win7 64bit? thanks.
I tried the one on the 1st post, and tried modified version too, neither could work. thanks.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 24th, 2011, 10:26 pm 
Offline

Joined: February 19th, 2010, 8:07 pm
Posts: 615
amazing little code, I modified it a bit so I could parse the information correctly, because tooltip information contains a new line so i cant parse by newline... corrected code is here:

Code:
If !sExeName || (sExeName = sProcess) || (sExeName = pid)
         VarSetCapacity(sTooltip,128), VarSetCapacity(wTooltip,128*2)
      ,   DllCall("ReadProcessMemory", "Uint", hProc, "Uint", iString, "Uint", &wTooltip, "Uint", 128*2, "Uint", 0)
      ,   DllCall("WideCharToMultiByte", "Uint", 0, "Uint", 0, "str", wTooltip, "int", -1, "str", sTooltip, "int", 128, "Uint", 0, "Uint", 0)
      ,   sTrayIcons .= "idx: " . A_Index-1 . " | idn: " . idn . " | Pid: " . pid . " | uID: " . uID . " | MessageID: " . nMsg . " | hWnd: " . hWnd . " | Class: " . sClass . " | Process: " . sProcess . " | Tooltip: " . sTooltip . "|`n"
   }


it allows you to do something like this:

Code:
tIcons := TrayIcons()
Loop, Parse, tIcons, |
{
    if a_loopfield contains idx:
        icon .= a_loopfield " | "
    if a_loopfield contains process:
        icon .= a_loopfield "`n"
}
msgbox % icon


Quote:
---------------------------
TrayIcon.ahk
---------------------------
idx: 0 | Process: AutoHotkey.exe

idx: 1 | Process: TSNotifier.exe

idx: 2 | Process: Azureus.exe

idx: 3 | Process: winamp.exe

idx: 4 | Process: Skype.exe

idx: 5 | Process: explorer.exe

idx: 6 | Process: DTLite.exe

idx: 7 | Process: TeamViewer.exe

idx: 8 | Process: procexp.exe

idx: 9 | Process: hamachi-2-ui.exe

idx: 10 | Process: AutoHotkey.exe

idx: 11 | Process: xnViewer.exe

idx: 12 | Process: Dropbox.exe

idx: 13 | Process: explorer.exe

idx: 14 | Process: explorer.exe

idx: 15 | Process: explorer.exe

idx: 16 | Process: explorer.exe

idx: 17 | Process: explorer.exe

idx: 18 | Process: rundll32.exe

---------------------------
OK
---------------------------


That can be use to create a script that might list the current programs that contain icons in a GUI (something that i am doing at the moment) or something similar ... :)

_________________
Main Project: AutoHotkey Toolkit
Unless specified otherwise all my code is written for the latest Autohotkey L Unicode version.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 139 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: iDrug and 59 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group