Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Clicking a systray program's context menu

If you have a question or need help, this is the place to be.
Post Reply
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Clicking a systray program's context menu

Post by Saxtus »

Hello.

I am using the latest EG and I was wondering if it's possible to automate a task of clicking a program's context menu that is hidden in systray.

What I want to do, is to enable a function of a program, that it isn't exposed as command line function, API or any other easy method.
The only way to do it, is to right-click on it's icon in system tray and choose the appropriate option from the context menu.

Is it possible to call that invisibly using windows API or something similar?
It is important to happen transparently, without actually showing the context menu on screen, as I want to do it after receiving a XBMC event, so the screen is going to be fully covered by XBMC playing a video.

Thanks in advance!

P.S. The program is called f.lux and what I want to do is to enable movie mode while playing something in XBMC and disable movie mode afterwards.
dansafe
Posts: 2
Joined: Fri Jul 25, 2014 4:10 pm

Re: Clicking a systray program's context menu

Post by dansafe »

You can not?
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: Clicking a systray program's context menu

Post by Saxtus »

dansafe wrote:You can not?
I can not. :roll:
TRIROG1
Posts: 45
Joined: Fri Aug 08, 2014 10:07 pm

Re: Clicking a systray program's context menu

Post by TRIROG1 »

Just an idea...

If it supports command line parameters it could be quite simple...

Try running "pathtoprogram"/"programexecutable".exe -?
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: Clicking a systray program's context menu

Post by Saxtus »

TRIROG1 wrote:If it supports command line parameters it could be quite simple...
It doesn't.
User avatar
WharfRat
Experienced User
Posts: 159
Joined: Wed Dec 25, 2013 11:56 am

Re: Clicking a systray program's context menu

Post by WharfRat »

I don't use XBMC or f.lux, but you can still try using Winspector Spy to see which messages are sent to f.lux when you click the systray menu items.

Then you create macros with Window.FindWindow and Window.SendMessage to activate those particular commands.

Winspector Spy is not the friendliest program to use, but it is free, and gives you access to the innards of most programs.
I am not 100% sure if it works with something in the systray, but it might...
It is a good tool to use if you are interested in creating a plugin for some arbitrary program.

WharfRat.
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: Clicking a systray program's context menu

Post by Saxtus »

That was the first thing I've tried.
But I've failed miserably...

Doesn't matter now, because I just chose to stop using f.lux.
Thank you for your input anyway.
Post Reply