[Release] Unofficial Tray Notification Program for FS

Chat about anything and everything Frozen Synapse

Moderator: Admins

User avatar
mosimo
Posts: 50
Joined: Fri Apr 23, 2010 2:05 pm

[Release] Unofficial Tray Notification Program for FS

Postby mosimo » Thu May 06, 2010 12:15 pm

Latest Update: 07/05/2010 4:22pm

mosimo's unofficial FS Tray Notification Program (windows only)
---------------------------

Ok, well I'm one of those people that opens Frozen Synapse but then just leaves it running in the background checking it every so often for new turns. I know I could close it and get E-Mail notifications but I still keep it open. There is a built in notification icon atm, but many people don't know about it until specifically told about it, it's difficult to notice and isn't the greatest of solutions.

So here is my take on it. I've asked Omroth about this and he's added a new log file for tray notifications so I can pull the info of whats happening. When a new game/turn or anything that should show the notification happens it writes to this log file. What I've done is written a c# program that sit in your system tray and monitor this file until it changes. When it changes it parses the data within and shows a nice windows popup notification + sound (or which ever you decide on)

Image


I've added a few options to the program to make it more user friendly (Normally I don't do this, soon as a program works enough for me I stop coding).

If you right click the tray Icon you get this menu:
Image
Exit Closes the program
Run/Load Frozen Synapse will either Run FS or if it's already running it will make it the active window (Bring it to the front)
Settings Will show this:

Image

Quick run down of what these options do:
1: If ticked you get the balloon popup window on new game/new turn notifications (see screenshot 1) Default: On
2: If ticked you get a small notification sound on new game/turn. This sound will be your windows Asterisk sound. Default: On
3: If ticked the notifications will display even if Frozen Synapse is the active window. If not they will only be display when it is minimized or not the currently selected window Default: On
4: Depending on which you select, "Frozen Synapse" or "Settings" will depend on what happens when you double click the icon in the system tray. If it is set to "Settings" the settings window will show. If "Frozen Synapse" the game will either load or be made the active window. Default: Settings
5: If this is ticked Frozen Synapse will load when you load the Tray Notification program. Default: Off (I have a shortcut to the program in my start menu -> startup folder
6: This Button allows you to set the installation path for Frozen Synapse. This needs to be correct in the box to the left of it to work. This information is pulled originally from the registry. If it is blank you will need to set the path manually.
7: Various Links. One to my Clan's site (shameless plug), one to the Frozen Synapse site, and the last to this forum


Now, I have probably missed something off here, so feel free to post comments/questions/suggestions. I am also around IRC as "mosimo" or "mosi|work"

The program is made in c# and requires .net Framework 3.5
I am not releasing the source, but I will provide it to one of the devs if they want to check the source to make sure it's legit.

So yea, thats it really apart from: Thanks to the Dev's for making such an awesome game, keep up the good work. And cheers for adding the traynotification log so I could make this program :)

---------------------------
Installation Instructions
(Requires: .NET Framework 3.5, RC5 or above FS client)

1. Extract the file somewhere.
2. Run "FS_Tray_Notify.exe"
3. Change settings you want.

---------------------------
Download
14/06/2011
http://dl.dropbox.com/u/1647033/FS_Tray ... 110614.zip


OLD BUILDS

13/06/2011 - http://dl.dropbox.com/u/1647033/FS_Tray ... 110613.zip
08/05/2010 - 6:33pm - http://dl.dropbox.com/u/1647033/FS_Tray ... 081831.zip
07/05/2010 - 4:22pm - http://dl.dropbox.com/u/1647033/FS_Tray ... 071622.zip
06/05/2010 - 4:33pm - http://dl.dropbox.com/u/1647033/FS_Tray ... 061632.zip
06/05/2010 1:08pm - http://r3dcloud.net/files/FS_Tray_Notify1005061308.zip


---------------------------
Changelog
FS_Tray_Notify20110614.zip
- Setting own path should now work
- Should detect steam directory first (A fix for those with old registry entries still in)

FS_Tray_Notify20110613.zip
- Hopefully added steam support
- Should auto detect FS from your steam install now too

FS_Tray_Notify1005071622.zip
- Removed default path for file watcher (oops :/) may have fixed the start up crash
- Added logging. log.txt file will be made where you run the program from.

FS_Tray_Notify1005061632.zip
- Added boss mode. Notifications can now show as high cpu / ram usage in the balloon tip.
- Might have fixed some loading bugs
- Fixed the problem with getting the incorrect path on 32bit machines (maybe)
- You can now only spawn a single instance of the program.
Last edited by mosimo on Tue Jun 14, 2011 9:34 am, edited 6 times in total.
[DTE] Dirty Tubular Excavators- http://dtegaming.com/ - #DTE @ irc.gamesurge.net

Frozen Synapse Tray Notification Program- view download thread here
User avatar
Omroth
Site Admin
Posts: 1723
Joined: Sun Nov 07, 2004 7:07 pm

Re: [Release] Unofficial Tray Notification Program for FS

Postby Omroth » Thu May 06, 2010 12:17 pm

Love it mosimo, nice work.
User avatar
zoog
Posts: 41
Joined: Fri Apr 30, 2010 2:09 pm
Location: Netherlands
Contact:

Re: [Release] Unofficial Tray Notification Program for FS

Postby zoog » Thu May 06, 2010 12:24 pm

Awesome!

EDIT:
maybe add something that you can only run one notify .exe at once, now it's possible to start multiple instances of the software. Don't know how much work it is, but if it's easy it would be nice :)
Image
User avatar
mosimo
Posts: 50
Joined: Fri Apr 23, 2010 2:05 pm

Re: [Release] Unofficial Tray Notification Program for FS

Postby mosimo » Thu May 06, 2010 1:27 pm

Had a few people saying the launcher part crashes , one on vista and one on xp. I'll see what I can do about that. I've only tested this so far on my 2 PCs running win7 64bit. Got another here with xp, so I'll do some more testing.

I'll also make it so you can only run the program once too. Might add boss mode too so instead of "new games" it could say "ram at 80%" or something. Or just custom text.
[DTE] Dirty Tubular Excavators- http://dtegaming.com/ - #DTE @ irc.gamesurge.net

Frozen Synapse Tray Notification Program- view download thread here
Ramsar
Posts: 136
Joined: Mon Apr 26, 2010 6:48 am
Location: Belgium

Re: [Release] Unofficial Tray Notification Program for FS

Postby Ramsar » Thu May 06, 2010 1:33 pm

Excellent! This was one of the features I really missed. Great work mosimo 8)
User avatar
mosimo
Posts: 50
Joined: Fri Apr 23, 2010 2:05 pm

Re: [Release] Unofficial Tray Notification Program for FS

Postby mosimo » Thu May 06, 2010 3:34 pm

Glad you guys like the idea.

Updated a new version.

FS_Tray_Notify1005061632.zip
- Added boss mode. Notifications can now show as high cpu / ram usage in the balloon tip.
- Might have fixed some loading bugs
- Fixed the problem with getting the incorrect path on 32bit machines (maybe)
- You can now only spawn a single instance of the program.

Link is in the first post.
[DTE] Dirty Tubular Excavators- http://dtegaming.com/ - #DTE @ irc.gamesurge.net

Frozen Synapse Tray Notification Program- view download thread here
makr
Posts: 23
Joined: Tue Apr 20, 2010 9:50 pm

Re: [Release] Unofficial Tray Notification Program for FS

Postby makr » Thu May 06, 2010 4:57 pm

I can't get this to run at all, it crashes right after doubleclicking the exe with a "Frozen Synapse Tray Notification has stopped working" dialog. :? I'm on Win7 x64, and I have tried using the older build, running it as administrator, setting compatibility mode for Vista and XP, but nothing helped. If there is anything I can do to get a more useful error message, please let me know!
xgreen
Posts: 55
Joined: Thu Apr 29, 2010 5:18 pm
Location: Germany

Re: [Release] Unofficial Tray Notification Program for FS

Postby xgreen » Fri May 07, 2010 2:34 pm

makr wrote:I can't get this to run at all, it crashes right after doubleclicking the exe with a "Frozen Synapse Tray Notification has stopped working" dialog. :? I'm on Win7 x64, and I have tried using the older build, running it as administrator, setting compatibility mode for Vista and XP, but nothing helped. If there is anything I can do to get a more useful error message, please let me know!


Dito, same problem for me. I'm running XP though.
VGrossman
Posts: 10
Joined: Wed Apr 21, 2010 6:18 am

Re: [Release] Unofficial Tray Notification Program for FS

Postby VGrossman » Fri May 07, 2010 2:44 pm

Same here xp also.
User avatar
mosimo
Posts: 50
Joined: Fri Apr 23, 2010 2:05 pm

Re: [Release] Unofficial Tray Notification Program for FS

Postby mosimo » Fri May 07, 2010 3:19 pm

http://dl.dropbox.com/u/1647033/FS_Tray ... 071622.zip - 07/05/2010 - 4:20pm

Latest version, added logging to it this time too.
Where ever you extract it to and run it from will be a log.txt file.

I did notice one bug I left in from testing first time round which was when I set up the file watcher I left my default path in there which should have been empty.


Thanks for the interest in this btw guys :)
[DTE] Dirty Tubular Excavators- http://dtegaming.com/ - #DTE @ irc.gamesurge.net

Frozen Synapse Tray Notification Program- view download thread here
xgreen
Posts: 55
Joined: Thu Apr 29, 2010 5:18 pm
Location: Germany

Re: [Release] Unofficial Tray Notification Program for FS

Postby xgreen » Fri May 07, 2010 5:09 pm

Downloaded the new version and works! Great prog :D
makr
Posts: 23
Joined: Tue Apr 20, 2010 9:50 pm

Re: [Release] Unofficial Tray Notification Program for FS

Postby makr » Fri May 07, 2010 7:34 pm

The latest version works perfectly with admin privileges, as a normal user it crashes like before.
Also, it took me a while to find the log file, I only found the string "C:\log.txt" in process explorer by accident. :)

edit: Just found out about the Windows Reliability Monitor, here are the problem details for the crash: http://pastebin.com/tnZGqFJV
On the older versions "Problem Signature 09" was "System.ArgumentException" but now it's "System.UnauthorizedAccess". Is it crashing because of the log file's location?
User avatar
mosimo
Posts: 50
Joined: Fri Apr 23, 2010 2:05 pm

Re: [Release] Unofficial Tray Notification Program for FS

Postby mosimo » Sat May 08, 2010 5:32 pm

Ah thanks for that makr. I didn't have it create the log file before. The way my program works is it reads the file:
"<FS_install_dir>\psychoff\trayInfo.txt"
(the file omroth kindly added when a new game/turn is done)

It also attempts to read the registry entries:
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Frozen Synapse_is1\InstallLocation
and
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Frozen Synapse_is1\InstallLocation

If it's trying to create the log file in c:\log.txt that could also do it if the program isn't run from there. I've edited that bit so it saves it in it's currently location, and I' uploaded one that doesn't have logging. If you could try both and let me know please :)

With Logging: (will now be in the same dir as the program)
http://dl.dropbox.com/u/1647033/FS_Tray ... 081831.rar

Without Logging:
http://dl.dropbox.com/u/1647033/FS_Tray ... 081831.zip
[DTE] Dirty Tubular Excavators- http://dtegaming.com/ - #DTE @ irc.gamesurge.net

Frozen Synapse Tray Notification Program- view download thread here
Ramsar
Posts: 136
Joined: Mon Apr 26, 2010 6:48 am
Location: Belgium

Re: [Release] Unofficial Tray Notification Program for FS

Postby Ramsar » Sat May 08, 2010 6:40 pm

I tried it but it loses my settings when I close and re-open it
makr
Posts: 23
Joined: Tue Apr 20, 2010 9:50 pm

Re: [Release] Unofficial Tray Notification Program for FS

Postby makr » Sun May 09, 2010 12:39 am

Both versions work, but the one with logging has to be in a folder that is not protected by UAC. To test, I put it somewhere in C:\Program Files\ and it crashed like before with "System.UnauthorizedAccess", while the log-less version ran fine from everywhere I tried it.

I've just noticed that a generic icon appears in the tray when there's a new turn for me: (to the left of the Tray Notification Program)
Image
It doesn't do anything and it disappears when I mouse over it like a crashed programs does. Are tray notifications already in the game but broken?

Ramsar wrote:I tried it but it loses my settings when I close and re-open it

It saves my settings here but I've noticed some strange things when I run it from different places, it's like the settings are tied somehow to the program's path. I'll try to find out what's going on there.

edit: Looks like settings are tied to the path and filename of the program:
I unzipped FS_Tray_Notify.exe to two folders A and B, set all settings in A to on, in B to off, checked that they were saved and switched the exes. The settings in A remained all on, and in B all off. FS_Tray_Notify_Log.exe doesn't care about these settings and shows the defaults, but if it is renamed to FS_Tray_Notify.exe, it will have all settings on or off depending on which folder it is in.

I've also found a thread on Stack Overflow about handling UAC-protected paths in C#, if you want to look into that.
Last edited by makr on Sun May 09, 2010 1:41 am, edited 2 times in total.

Return to “General”

Who is online

Users browsing this forum: Yahoo [Bot]