Sign in to follow this  
Followers 0
hypertyper

Tray icon only disappears once I move over it with my mouse...

3 posts in this topic

Here's another complete beginners question:

I've got a counter that get's started by a function and then usually gets closed via "ProcessClose" unless something goes wrong. The timer is my backup so to speak. It works fine except that every time the counter gets closed the tray icon remains and when he restarts another one is added which meas after a while the whole tray is full of icons.

How do I make the icon disappear everytime the process gets ended? Can I just hide the icon in the first place?

Less important but I'd still like to know:

At the moment the counter is in a window that is always on top and I cant even move. Is there a script somewhere with a similar function where the outup gets logged in a gui window? I haven't figured out yet how to display a string a window inside a GUI.

here's the code of the counter that I found on the internet:

SplashTextOn("Timer","0 Seconds",125,25)
 
$BeginTime = TimerInit()
$CountTo = 15
$SecondsLapsed = 0
 
While $SecondsLapsed<$CountTo
    $TimeDifference = TimerDiff($BeginTime)
    $SecondsLapsed = Round($TimeDifference/1000,0)
 
    ControlSetText("Timer", "", "Static1", $SecondsLapsed & " Seconds")
    Sleep(1000)
WEnd

Thank you!

Share this post


Link to post
Share on other sites



Use #NoTrayIcon on the top of your script to make the icon go away :)

Here's an example on displaying a string in a GUI:

Global $count
Opt("GUIOnEventMode",1)
GUICreate("Test",300,200)
$label=GUICtrlCreateLabel("",10,10,280,180)
GUISetOnEvent(-3,"close")
GUISetState()
while 1
    Sleep(100)
    $count+=1
    GUICtrlSetData($label,$count)
WEnd

Func close()
    Exit
EndFunc

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
:) That is perferct. Thanks a lot for solving both of my problems in a way that even I understand :)

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