Garry's Mod G15 0.1

Ok guys, the very basic and first version of the Logitech G15 Applet is here. This doesn’t interface with Garry’s Mod by any means. All it does is read a textfile that is updated by a Lua script. If you don’t have a Logitech G15 you can stop reading.

For the moment it has like zero features. Screenshot of zero features and Lua not liking Unicode:

http://img246.imageshack.us/img246/111/g15kb7.th.jpg

It has problems with Unicode names at the moment, or maybe Lua has since it doesn’t support Unicode, either way, things like “åäö” looks a bit weird.

I will add more features tomorrow like an undo-list and similiar stuff, this is just here to show people that I’m actually doing anything.

Here’s the README:



Garry's Mod G15 Applet v0.2 by Skurmedel
	http://simon.otter.se
	
Welcome. The installation of this applet is dead easy!
Just unzip the contents into "Steam/steamapps/username/
garrysmod". Then run the gmg15.js file to start both 
Garry's Mod and my applet. If you don't want to use the 
script you'll have to start "GarrysModG15Applet.exe" 
manually.

If you want to change what it displays, you can just edit
the Lua script, or make your own, just make sure to remove
the existing one, "lua/autorun/client/G15InfoDump.lua".

Also be aware that the program has no clue whether Garry's
Mod is running or not, so it will display whatever is in
"data/G15InfoDump.txt" regardless of GMods state.

Usage:
	
	Button 1 and 2 on the G15 navigates through the pages.
	The fourth button shuts down the applet.. it's the 
	recommended way of turning it off.

Changelog:

	0.2:	Added Undo-list at page 2, Nick-row now shows 
			health.
	0.1:	Initial release.

Note to customizers:
	
	To display stuff, just write to "G15InfoDump.txt" in
	the data directory. It supports 4 pages, so to write
	to the 4 lines at page 1, you write 4 lines. The
	following 4 lines will be page 2 etc. The program
	reads a total of 16 lines, 4 lines per page.


Please post any problems you have here. But make sure you’ve read the README extensively first!

Fix for the Windows Scripting Host error:
For some the default script work, for others not so here’s a fix for the unfortunate ones. If you open the .js file with Notepad you can fix it quite easily yourself. You’ll need to add the Shell.CurrentDirectory property and change “C” to whatever the drive letter of the harddrive which Steam is installed on (If Steam is installed on X:, this becomes “X:\”. You’ll need to convert all the backslashes to “/” or escape them, “” becomes “\”. Example:



Shell.CurrentDirectory = "C:\\" 
Shell.Run("C:\\Spel\\Steam\\Steam.exe -applaunch 4000 -console")


Note that the .js script is not needed to use the applet, it’s just there as an convienience.

Download!

Why do i always get a bad feeling about this?

Which means?

I don’t get it. What does this do?

It’s an applet and script for the Logitech G15. Updated the title. If you don’t know what a Logitech G15 is I suggest you use Google.

You could at least give a basic description or a link to a description of what the keyboard is.

Basically this script writes those three lines to the LCD screen on the keyboard.

I’m sorry but I kind of assumed people did, and those who didn’t wouldn’t care anyway.

Mainly I want to know if it works for others than me so I can extend it C++ and Lua wise.

Well come on people there must be some kind of positive feedback, it’s the first G15 app that i know of, even if it is fairly empty at the moment, you could call it a Proof of Concept and people could work on it.

Edit:

Added Garry’s Mod 10 to the supported list.

He does need some gold stars :smiley:

Nice job too bad I don’t have the keyboard.

Holy shit! Downloading now!

I keep getting this error when trying to run the .js.

http://img373.imageshack.us/img373/4508/capturety0.png

I’m running Vista x64 6.0.6000

logitech g15 is a gaming keyboard that has up to 54 macro keys, (3 modes 18 per mode) with an lcd screen that gives specs of games… thanks, downloading now

18*3=54 :eng101:

shh don’t tell.

That is a great idea, I have the G15, but it says the system can not open the file when I try to launch the .js thing.

Ah… hmm. Make sure it’s in the first “garrysmod” directory, the launch script relies on it lying in the first one.

You can use the .exe on its own though, although it will show up an ugly box. What does the path to your garrysmod-folder look like (Don’t forget to mask any private stuff like your accountname)?

Edit:

Added fix at the top.

I’ve always wondered… Is there a way to do a similar thing with the Logitech MX5000 screen? Because that’s what I have. Anyway, nice work I guess. (I’d get it if I had a G15 :P)


var Shell = WScript.CreateObject("WScript.Shell")
Shell.Run("GarrysModG15Applet.exe", 0, false)
Shell.Run("X:\Panda's Files\Games\Steam\Steam.exe -applaunch 4000 -console")

Like that?

I’m sorry but it’s not possible. The G15 is the only LCD-fitted Logitech product with a SDK available to the public :frowning:

Yes that is almost correct, you just need “CurrentDirectory” above the last line too. and escape the back slashes.



var Shell = WScript.CreateObject("WScript.Shell")
Shell.Run("GarrysModG15Applet.exe", 0, false)
Shell.CurrentDirectory = "X:\\"
Shell.Run("X:\\Panda's Files\\Games\\Steam\\Steam.exe -applaunch 4000 -console")