| View previous topic :: View next topic |
| Author |
Message |
paede
Joined: 10 Mar 2005 Posts: 3
|
Posted: Thu Mar 10, 2005 11:29 am Post subject: |
|
|
How i can make a systray text (like the windows clock)
I want to publish so infos by a systray text (eg. Temp, Mem usage or else) |
|
| Back to top |
|
 |
ILL.1
Joined: 29 Sep 2004 Posts: 84
|
Posted: Thu Mar 10, 2005 12:53 pm Post subject: |
|
|
Look under Menu in the help file. There is a section on how to change the icon and tooltip. Also there are a few examples at the bottom of that help page. Give it a go and see if this is what you're looking for. _________________ ===============
----------ILL.1-----------
=============== |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Thu Mar 10, 2005 6:43 pm Post subject: |
|
|
| The systray is a really difficult area for AutoHotkey... you can change the icon and the tooltip and that's about it. The only application I've ever known to be able to change the clock text is Tclock/Tclock2. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Fri Mar 11, 2005 12:50 am Post subject: |
|
|
| You could try something really crude like a SplashText window that stays on top of a certain section of the task bar. You could also use the on-screen-display example shown at the bottom of the Gui page to make a transparent window, which should cause "floating text" to appear on top of the task bar. |
|
| Back to top |
|
 |
peejay
Joined: 04 Mar 2005 Posts: 40 Location: Netherlands
|
Posted: Fri Mar 11, 2005 10:26 am Post subject: |
|
|
I found an implementation in Visual Basic here, where a form is placed in the systray, and text is shown on it.
In the featured program the original systray (icons and clock) are hidden beneath the form, but it should be possible to place the form next to the contents of the systray (haven't tried that though).
The program also shows a way to widen the systray by adding fake icons to it (those could next be covered by the form).
The program uses lots of API calls, so I'm not so sure the functionality could be ported to AHK, but maybe it gives somebody some ideas? _________________ The Gods smile upon you. Beware - it is probably because they know what is going to happen to you next, and find it amusing. To them, anyway. --- Discworld Horrorscope: http://www.weirdnes.force9.co.uk/stars3.html |
|
| Back to top |
|
 |
peejay
Joined: 04 Mar 2005 Posts: 40 Location: Netherlands
|
Posted: Fri Mar 11, 2005 3:44 pm Post subject: |
|
|
I have been trying to access the system tray, but ahk_class Shell_TrayWnd points to the Taskbar, and I haven't found a way to access the SysTray itself. See the following snippet:
| Code: | ; System Tray Text (TEST only)
; AutoHotkey Version: 1.0.27.01
; Language: English
; Platform: WinXP
; Author: peejay
;
; Script Function:
; Template AutoHotkey script.
;
#NoTrayIcon
#SingleInstance ; Allow only one instance of this script to be running.
; Get the ID of the TrayWindow
WinGet, stt_TrayWindowID, ID, ahk_class Shell_TrayWnd
if stt_TrayWindowID > 0 then
{
winset, Transparent, 120, ahk_class Shell_TrayWnd
msgbox, The Task Bar is half transparent now...
winset, Transparent, 255, ahk_class Shell_TrayWnd
}
else
{
msgbox, TrayWindow NOT found
}
Exit
|
Any ideas? _________________ The Gods smile upon you. Beware - it is probably because they know what is going to happen to you next, and find it amusing. To them, anyway. --- Discworld Horrorscope: http://www.weirdnes.force9.co.uk/stars3.html |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Sat Mar 12, 2005 2:00 am Post subject: |
|
|
| peejay wrote: | | I have been trying to access the system tray, but ahk_class Shell_TrayWnd points to the Taskbar | Window Spy indicates that the tray is part of the task bar window, so I don't think there's any way to operate on the tray independently. |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1276
|
Posted: Sat Mar 12, 2005 5:30 am Post subject: |
|
|
Thanks for posting that link peejay, I hadn't thought of using transparent icons in the systray as spacers. I know TClock2 can change the clock text and redraws the systray width accordingly, so perhaps the source code might be of use to someone? _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
peejay
Joined: 04 Mar 2005 Posts: 40 Location: Netherlands
|
Posted: Fri Apr 08, 2005 3:19 pm Post subject: |
|
|
I'm still looking into this, but not making much progress. I don't program in C, can't much read it, and I am still too inexperienced in AHK to make it do what I want.
One idea is to (ab)use TClock2 itself.
To show what I mean, download a copy of TClock2 (I simply followed the link Serenity provided to get there).
Download TClock2, run it, and access TClock2 Properties. open the tab labelled 'Format', and check 'Custom Format'. Enter something like "Hello World !! "hh:nn in the edit box, and hit 'Apply' (by using double quotes you can enter literal text, by adding hh:nn the current time is still shown by the tray clock).
By changing the text in the edit box, and applying, you can change the text shown in the systray.
Just a raw idea. I don't think I could make AHK do this (yet ). Anybody? _________________ The Gods smile upon you. Beware - it is probably because they know what is going to happen to you next, and find it amusing. To them, anyway. --- Discworld Horrorscope: http://www.weirdnes.force9.co.uk/stars3.html |
|
| Back to top |
|
 |
|