Page 1 of 1

run(), minimize to tray + custom icon

Posted: 16 Dec 2022 00:18
by WirlyWirly
Not sure if this can be done from XY, but a very common use case I have for the run() function is to start scripts that continue processing in the background, even after the XY instance is terminated. Tasks such as; monitoring a folder for new files, processing files, uploading files, performing backups, launching servers, etc.

It'd be nice to have a flag for run() that would minimize the opened window to the tray where it can continue its work and not clutter the taskbar.

Also (though this sounds like it'd be outside the capabilities of XY) since there are usually a handful of these scripts running at any given time, it'd help to distinguishing each processes if there was an option to specify a custom icon that would be displayed when the process is minimized.

Something like...

Code: Select all

run lax("python" "monitor_folder.py"), 3:=4(minimize window to tray), 4:=<xyicons>\scripts\monitor_folder.ico;
Thoughts?

RBTray is a small utility that will minimize any program to the tray, which works great, so I was curious if it could be done through XY scripting.

Re: run(), minimize to tray + custom icon

Posted: 16 Dec 2022 02:09
by jupe
You can pretty much already do what you are requesting eg. run "XYplorer.exe /new /win=min /script=::run etc";, you can specify 3 diff icons using appicon, but you can set a titlebar template and use /title to differentiate too.