# Java program that displays new TSF posts



## Special2God (Oct 5, 2009)

*Updated: *3/5/12 (See post:19)

Scanned and confirmed *virus free*: Metascan Online | Fast, free malware multi-scanning tool

TSF, 

This small Java program lists new posts made on TSF as well as providing 
a settings menu for configuring/adding notifications for certain events or for all events. 

Attached is the zipped source folder (if you want to look at or modify the source code) along with the compiled .jar file in a zip folder. 

Please tell me what features you think could improve the program and post any bugs you come across (You can start the program from command prompt to get general program output and error messages).


----------



## Ninjaboi (Dec 27, 2010)

Hello Special2God!

Could you provide a brief summary of how to use your application you created? I'm curious to see how well it works. It looks nice by the way!


----------



## Laxer (Dec 28, 2010)

Very nice Special2God!

I can confirm the code is clean and functional!


----------



## Special2God (Oct 5, 2009)

> Could you provide a brief summary of how to use your application you created?


You just start the .jar file or compile the source code and a window will open, after a second or so (due to having to open a socket and query TSF) the list on the left will fill with 5-6 of the latest posts at TSF, then over time the list will update when new posts are made. 

You can click on a post to read details about it in the text box on the right of the window. 

You can open the menu and set how fast the list of new posts should update, along with adding notifications for certain threads, sub-forums, or users. 

When new posts are made the program will check the list of notifications and either display an alert dialog, or play a sound depending on what you selected when you made the notification. 

So basically you can use this to watch for new posts at TSF. 
Some day, depending on the complexity, it might be cool to allow the user to click on a post and reply to it, possibly have them enter their username and password and type a response into a dialog box and send the necessary security and new posts details to the server. 

Thanks Laxer, it's always nice to get encouragement (since my family thinks I'm strange and spend far to much time programing :grin.


----------



## Ninjaboi (Dec 27, 2010)

I just finished using it, and it works nicely.

Great work .


----------



## Special2God (Oct 5, 2009)

Thank you, I'm glad it works. 
I did not have a lot of computers to test it on. 
I used Enums in one or two of the classes so I know you have to have Java 1.5 or later, but other than that I do not know what compatibility issues people may come across.


----------



## Laxer (Dec 28, 2010)

Works great for me.

Win 7 SP1 x64
JRE 1.6.0 30



> Thanks Laxer, it's always nice to get encouragement (since my family thinks I'm strange and spend far to much time programming :grin.


I am always glad to help out. Rather that be scripting myself or providing moral support.

Great little app, I am excited to see what the new versions will bring :grin:


----------



## Laxer (Dec 28, 2010)

From using this for the last hour or so some suggestions:
Can you make the links in this hyperlinks(open the webpage)

either on double click or have a link in the content box would be perfect!

Is there anyway to make this work with subscribed threads?

They can be found here: http://www.techsupportforum.com/forums/usercp.php


----------



## Special2God (Oct 5, 2009)

You mean have the program only list new posts you are subscribed to? 
Yes, that should be possible with some work.

About links, I'm not sure if Java is allowed to open other programs like FF or IE, but I will look into it.


----------



## Laxer (Dec 28, 2010)

Or at least have the option to notify when a subscribed thread is replied to.

I would focus more on links now :grin: I think it would be easier and more useful.


----------



## Special2God (Oct 5, 2009)

Coming right up. 
Found a solution after one search and just need to implement it.


----------



## Laxer (Dec 28, 2010)

You can work at your own pace :rofl:

just because I say does not mean you must do :lol:


----------



## Special2God (Oct 5, 2009)

No, its a great idea, I like do it :grin:


----------



## Special2God (Oct 5, 2009)

The new version of TSF Watcher is here :grin:

I added links to the description panel, so if you click on a post and click on the link in the description panel. If your OS supports the Java browser opening feature, your default web browser will open and a new tab linked to the post you clicked on will be loaded. 

Notifications can now be edited and entire notification categories can be enabled and disabled with a check box. 
Some minor fixes were added, but nothing anyone had noticed yet :wink:
(note: editing the XML settings file can mess up the program. I know about this and am working on some error checking code so that the program starts even if the file is malformed/configured wrong). 

Next I am hoping to add a login option/panel so that TSF members can login to the program and set options such as only receiving notifications for subscribed threads. 
I may even be able to add an option for respond to a post from within the program. 
I also will be trying to learn about the Java sound API to add an option to set your own own notification sound. 

And for those of you who were thinking the program should have those little desktop notifications/popups most messengers use when someone sends a message. 
I thought of those notifications too, but Java is very Non-platform and I will have to find tools for dealing specifically with the windows desktop. :ermm:
Finding such tools may taken a while along with a lot more experience before I can use them, but know that that it is in the back of my mind.

The above ideas, are just ideas, so please report what you would like to see next, as well as posting bugs you find.

Attachments moved to first post


----------



## Special2God (Oct 5, 2009)

Quick Update:
This project has not been forgotten or abandoned. 
I have written a few hundred lines of code since the last version and everyone's various suggestions are being added :smile:. 

The program is able to successfully log a user in allowing for the possibility of viewing subscribed threads. 

The server's is just giving me a hard time whenever I try to post, so I want to work that out and allow users to post before I release the next version.


----------



## Laxer (Dec 28, 2010)

Thanks for the update :thumb:


----------



## Special2God (Oct 5, 2009)

YES! 
Breakthrough, I finally managed to post on TSF from one of my test programs. 
And as long as the functionality still works when integrated into the main program, expect an update in a few days. 
:grin: :grin: :dance: :dance: :grin: :grin:


----------



## Laxer (Dec 28, 2010)

Great news!

Keep us posted :grin:


----------



## Special2God (Oct 5, 2009)

Attached is the next iteration of the TSF Watcher program for displaying new TSF posts (source code also attached). 
New features include:

The ability to login to TSF using your TSF credentials (see below for details)
Post replies from within the program
Logout window
Easier to use slider bar for the update delay speed in the settings menu
Settings menu checkbox to watch subscribed threads only after logging in

Future releases may include the ability to post PMs to other members, view the latest 3-4 posts for a specific thread, and possibly the ability to view any new PMs you may have received. 

Admittedly, this project is of little value since all the features added so far are already built into the TSF website :uhoh:, but I am learning a lot and the problems I come across are forcing me to read and discover good programing practices. 

Note: regarding login capabilities, no login credentials are stored on the computer's hard drive, you cannot stay logged in between opening and closing the program. Your login credentials are encrypted in the same way the TSF website encrypts them before sending them over the internet. If you have questions regarding the exact security measures used by the program, please PM me. 

Thanks to Laxer and Shekka for their suggestions and help. 
Please post any suggestions or bug reports in this thread or PM me directly. 

P.S. Also note that when you logout of the program, you are also logged out in any web browser you are logged into. This is not a bug, but simply the fact that you are logged in at two points with the same credentials and logging out cannot be confined to just one of those points (i.e. the browser or the program). If this feature is annoying, please post and I will change it in the next version; it will not effect the program's security.


----------



## Ninjaboi (Dec 27, 2010)

Sorry that I didn't post on this sooner.

Works really nice, great job Special! I logged in just fine, though I haven't tried posting with the application yet.


----------



## wmorri (May 29, 2008)

I really like what you are doing here, and I think that it would be great to see if we could get a version that works on linux too. I don't know a lot about java but I am always up for a challenge seeing as how I know the linux side of things I would being willing to help.


----------



## Laxer (Dec 28, 2010)

java is known to work on just about any platform...

sure it wouldn't be too hard to convert!


----------



## Special2God (Oct 5, 2009)

Sounds good, I'll see if I can get around to testing it. 

But please feel free to test it out on your own linux machines, post your results :smile: 
What errors are you getting, etc... 

You can run the program from command prompt to see a lot of debugging info and general stuff. 

```
java -jar "C:/path/TSFWatcher.jar"
```
Should start the program, it has no start up parameters.


----------



## wmorri (May 29, 2008)

It is a little different in linux but that is the general idea. It seems to work which is good, but I am thinking even farther, we know that that .jar file works. I might need to learn java a bit here, but I am thinking of making your program able to be compiled on a linux box and then run without having to use the java -jar command each time.


----------



## Shekka (Jan 6, 2012)

I just got around to downloading the new version. It looks great! Keep up the good work!


----------



## Special2God (Oct 5, 2009)

Thanks Shekka, I wasn't sure what else to add so I'm working on another project at the moment. 
I'm learning LWJGL which is a Java binding for OpenGL, so I'm learning 3d graphics and such. 

If you have any suggestions for the program post them and I'll see if I have time to add them. :smile:


----------

