SyMenu Forum

SyMenu

 

HomeGeneral discussion & questions

Talk about SyMenu or post suggestions, requests, or how-to questions

Command line parameter to exit SyMenu Messages in this topic - RSS

peterbonge
peterbonge
Posts: 6


03/11/2017
peterbonge
peterbonge
Posts: 6
It seems that there is no command line parameter to exit SyMenu. It would really be nice if that could be added. In my opinion every portable app should offer this.

On my portable drive I have two scripts. One to start some apps and one to stop these apps. For SyMenu I found nothing to exit it.

--
Regards,
Peter Bonge
link
Gianluca
Gianluca
Administrator
Posts: 1274


06/11/2017
Gianluca
Gianluca
Administrator
Posts: 1274
Hello Peter.
My ambition is that SyMenu could be in charge for starting and quitting any other application through its Autoexec on start and on close features, so my advise is to throw away your two scripts and use SyMenu instead.

But I respect your need and you'll find a new command line with the next version (-quit) that'll do exactly what you need.

But please give a chance to the Autoexec too
https://www.ugmfree.it/SyMenuManual.aspx#Autoexecute
link
peterbonge
peterbonge
Posts: 6


06/11/2017
peterbonge
peterbonge
Posts: 6
Hello,

at the moment I'm already using Autoexec with my exit script. I need this script because the apps I'm using need different methods to exit them and sadly none of them supports an exit command...

--
Regards,
Peter Bonge
link
Gianluca
Gianluca
Administrator
Posts: 1274


07/11/2017
Gianluca
Gianluca
Administrator
Posts: 1274
Ok Peter. Understood.
If you think that some of your "peculiar way" to make an application quit could become a SyMenu feature, please contact me in private and we'll see.
It's literally years I want to implement a way to launch the WM_ENDSESSION message to close an external application but I am not so sure it could be useful for anyone. Maybe your scenario could be a valid example for me.
link
peterbonge
peterbonge
Posts: 6


07/11/2017
peterbonge
peterbonge
Posts: 6
I'm not sure if my methods could be added to SyMenu. And my time is too limited for a private session.

I'm using AutoHotkey for my scripts and ATM I'm ending 3 process with it. I'm trying to reduce the amount of permanently running apps.

1. I have a background script running which I'm just killing with:
Process, Close, AutoHotkey.exe

2. I'm using the app AquaSnap, which shouldn't be killed. It doesn't have a main window, but with the help of a portable apps website I've learned that there is an invisible window. So I'm closing it with:
WinClose, AquaSnapTrayWindow
(This sends a WM_CLOSE command to that window.)

In the AutoHotkey help I also found this command:
PostMessage, 0x112, 0xF060,,, WinTitle
(0x112 = WM_SYSCOMMAND, 0xF060 = SC_CLOSE)

That should be a little less forceful, but I haven't tested it yet.

3. I have one more app which I'm closing with the WinClose command, but here with a visible window.

So there are many ways to kill or close an app and I don't have an idea how this could be added to SyMenu (yet).

But I found another small problem: I've just tested a label item and it shows just the first 5 chars. And the alignment is a little bit strange. It's shown like an app, with an empty icon and the text just shifted a little bit to the left. Too much space at the beginning. Maybe options for the alignment would be a good idea.

--
Regards,
Peter Bonge
link
Gianluca
Gianluca
Administrator
Posts: 1274


08/11/2017
Gianluca
Gianluca
Administrator
Posts: 1274
If you can post the label image I can evaluate it. Are you sure the text you are using for the label is a simple text? No special characters in it? Otherwise it is a bug.

Regarding the method you use to close the app, IMHO it's a bit rude.
Closing a process that way doesn't allow you to save unsaved work and above all it doesn't let the programs close correctly.


I strongly prefer the WM_ENDSESSION that gently asks a program to close even if I don't know what can happened with an invisible window (AquaSnap). Your example is very useful for this reason.

My idea for SyMenu was to create a simple program where the user can write a list of process names. When this program is launched it checks for the processes existence and, in case, it closes the corresponding main windows with WM_ENDSESSION.
Any process can be flagged for forced closing. In this case the program is allowed to kill the process even if the program disagrees.
But as I told you my project is not enough clear yet to start the development.
If someone has any idea to improve this project, please get in touch with me.
link
peterbonge
peterbonge
Posts: 6


08/11/2017
peterbonge
peterbonge
Posts: 6
Gianluca wrote:
If you can post the label image I can evaluate it. Are you sure the text you are using for the label is a simple text? No special characters in it? Otherwise it is a bug.

I've tried 2 simple labels with "Autostart" and "Autoexit". Here is a pic of the test menu:
https://imgur.com/deD9NOx


Gianluca wrote:
Regarding the method you use to close the app, IMHO it's a bit rude.
Closing a process that way doesn't allow you to save unsaved work and above all it doesn't let the programs close correctly.

I strongly prefer the WM_ENDSESSION that gently asks a program to close even if I don't know what can happened with an invisible window (AquaSnap).


I've tested WM_SYSCOMMAND/SC_CLOSE now and that works fine. The AutoHotkey help says that this is like Alt+F4 or the X in the title bar. So it should be "soft" enough. With WM_ENDSESSION I had no success so far.

--
Regards,
Peter Bonge
link
Gianluca
Gianluca
Administrator
Posts: 1274


08/11/2017
Gianluca
Gianluca
Administrator
Posts: 1274
Ok Peter the bug is confirmed.
The problem is that the label alone is not important enough to push the menu width to cover its entire length. Only the other SyItems are considered for this automatic calculation.
I have to check if it is possible to workaround the problem.
Thank you for your report.
link



UGMFree © 2002-2024
PayPal BTC TON