Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


TrayIcon

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Sep 29, 2016 5:40 am    Post subject: TrayIcon Reply with quote

I forgot to document/explain this feature, oops.

Anyhow, the following code will add an icon in the system tray:
Code:

ti=createComponentClass('TTrayIcon', getApplication())

ti.Icon=getMainForm().Logo.Picture.Graphic
ti.Hint="Something something bla"
ti.visible=true
ti.OnClick=function(sender) showMessage('WEEEEE') end


If you wish to use a better icon, create your own form, and load the image you wish in it's icon property
then instead of getMainForm().Logo.Picture.Graphic give formname.Icon
(getMainForm().Icon does not work)

some other useful properties for the trayicon object:
Code:

    BalloonFlags
    BalloonHint
    BalloonTimeout
    BalloonTitle
    PopUpMenu
    Icon
    Hint
    Visible
    OnClick
    OnDblClick
    OnMouseDown
    OnMouseMove
    OnMouseUp
    OnPaint

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
HyberCode
Cheater
Reputation: 0

Joined: 17 Feb 2016
Posts: 40

PostPosted: Thu Sep 29, 2016 8:49 am    Post subject: Re: TrayIcon Reply with quote

Dark Byte wrote:

Code:

ti=createComponentClass('TTrayIcon', getApplication())

ti.Icon=getMainForm().Logo.Picture.Graphic
ti.Hint="Something something bla"
ti.visible=true
ti.OnClick=function(sender) showMessage('WEEEEE') end

[/code]


thanks but apparently it doesn't work
cheat engine version 6.5.1



Capture.PNG
 Description:
 Filesize:  76.69 KB
 Viewed:  4240 Time(s)

Capture.PNG



TrayIcon Example.CT
 Description:

Download
 Filename:  TrayIcon Example.CT
 Filesize:  15.05 KB
 Downloaded:  635 Time(s)



Last edited by HyberCode on Thu Sep 29, 2016 10:25 am; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Sep 29, 2016 9:27 am    Post subject: Reply with quote

ah ok, i tested it on a 6.5.1 build that was made after the release

anyhow, this works in the upcoming version

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Tue Oct 04, 2016 12:41 pm    Post subject: Reply with quote

with the updated version at http://forum.cheatengine.org/viewtopic.php?t=595082 this will work

also, 6.6 has exposed the application Icon, which you can use for the tray icon, so you can use this code:
Code:

ti=createComponentClass('TTrayIcon', getApplication())

ti.Icon=getApplication().Icon
ti.Hint="Something something bla"
ti.visible=true
ti.OnClick=function(sender) showMessage('WEEEEE') end

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites