start minimized in notification icon
Is it possible to start a script in background ? Right now it is possible to start a acript with the command line
freepie.exe myscript.py /r
but this open a new windows of freepie. Is it possible to avoid this and start freepie minimized in the notification icon
No, there is nothing built it for this sorry. But might soimething that can be fixed in future.
I will see if I can do something. I noticed you command line parser is executed after the first appearance of the main window.
I tried your freepie.console.exe without success. What is the purpose of this console project ?
FYI GlovePIE had the same issue. It was possible to start GlovePIE with commands /run and /tray but these commands were executed after the first appearance of the main windows. The issue is that when you want to start a script in background when playing a game you lost the focus of your game. Sometime you are ejected of your game.
Problem is the commands uses features in the WPF windows, would be a huge rewrite to change that. But it could be done.
The console project should compile as far as I know, what does the compiler say?
I have been thinking some more abut this. The best solution I think would be to introduce two new commands. DefaultStartupCommand that executes this code https://github.com/AndersMalmgren/FreePIE/blob/master/FreePIE.GUI/Bootstrap/BootStrapper.cs#L51
Which will load FreePIE like normal. And then another command TrayStartupCommand that loads FreePIE into tray mode
For the tray mode you need to add a tray icon. This mean adding System.Windows.Form as reference to be able to use NotifyIcon. What do you think about this?
There seems to be libraries for WPF like http://www.hardcodet.net/wpf-notifyicon
I have changed in the Bootstrapper so my link above does not point to the right line its this code that loads the app in Window mode
DisplayRootViewFor<MainShellViewModel>()
By now I'm using a warkround with ahk script
Run, "C:\Program Files (x86)\FreePIE\FreePIE.exe" "C:\Program Files (x86)\FreePIE\scripts\DolphinExit.py" /r,,,AutoHidePieDolphinPID
WinWait ahk_pid %AutoHidePieDolphinPID%
WinHide
I could offcourse fix a /h or /hide feature that simply minimizes FreePIE after start, but I do not think that is what @B4st13n wants?
This script really "hide" de window, don't appear on taskbar, only on task manager. If is easy make the "hide" I belive thats good enough.
I'm also looking for this feature. A System tray icon would be great, but it would be helpful to at least have it minimize to the main task bar.