Jump to content
To block spammers, this forum has suspended new user registration ×
Comet Forums
To block spammers, this forum has suspended new user registration

Windows messages or hotkeys for bringing up main window from tray

Recommended Posts

I've been pulling my hair out trying for days to automate and streamline my workflow by using the PostMessage command of AutoHotkey (https://autohotkey.c...SendMessage.htm) and Microsoft Spy++ (included in VS 2013) to no avail (FWIW, Winspector Spy and any other similar tools are do not work on Win 7 x64).

What I'm trying to achieve is equivalent to right-clicking on the tray icon and select each of the following items when BitComet is sitting in the tray, in the order of importance:

1. Show BitComet

2. Exit

3. Open Torrent from URL

Can you let me know the required message ID, wParam and lParam values?

If that is somehow not feasible, can you implement configurable, global keyboard shortcuts for the above three?

I've already looked into the possibility of using the boss key, but that turned out to be futile, due to it making the tray icon completely disappear.


Edited by performeur (see edit history)
Link to comment
Share on other sites

Interesting idea, but I'm not sure about how to do this with the tools you're using. If you speak Mandarin you can ask your question in Bitcomet's chinese forum and may get a response from one of the developers.

You may be able to do something similar using commandline scripts like DOS batch files. You can display a list of commandline switches by opening a command prompt and going to your install folder and typing

bitcomet --help

There is a command for opening torrents from a link, I believe it's...

bitcomet --url arg

Exit Bitcomet...

bitcomet --exit

There is a resume command that may open bitcomet from system tray, but you'd have to confirm this...

bitcomet --resume

and there is a command to return it to tray

bitcomet --tray

Beyond this I probably cannot be much help, but I'll leave the topic open in case anyone else has a suggestion.

  • Like 1
Link to comment
Share on other sites

...If you speak Mandarin you can...

Unfortunately, I don't speak Mandarin. If I did, I would've posted a question there already. ^_^ I wish I did, though. I wish I spoke German, too, for that matter. Apart from the Anglosphere, these two language communities seem to produce more developers than other communities.


bitcomet --help


Not only did your second suggestion provide solutions for 2. and 3., it effectively ended up producing one for 1., too.

The help message for the switch --tray says it causes the main window to "minimize to system tray", which turned out to be wrong. And this is a blessing in disguise for me.

I tried

bitcomet --tray

and found that it actually brought it out of the tray!

Thanks a ton, Guardian Eagle. :D

p.s. 1. For anyone interested, to send the BitComet window to the tray, I've set the "Main window placement:" option to "Minimize to system tray" and either press Alt + F4 or another hotkey that I've set up to activate the following AutoHotkey command:

PostMessage, 0x112, 0xF060,,, A  ; 0x112 = WM_SYSCOMMAND, 0xF060 = SC_CLOSE

p.s. 2. Maybe it'd help other users to update the help message and the wiki page to reflect the above finding. Other parts of them seem to be outdated or incomplete as well.

Edited by performeur (see edit history)
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
  • Create New...