Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



UglyCrackBaby posted:

Yes, the customer fills out a form for the background check. We then rewrite that info into our bound-books.

For the program, just the full name and purchase date would be required. From the purchase date and name I can always go into the bound book for more information. The main problem now, is finding the date in the first place.

As it is now, if I need to find a name with no date associated. I need to go through paperwork manually for YEARS of information.
You could actually use some calendar application for this, if that's really all you want to do with it.

I've used Sunbird for a while to keep a searchable history of what was happening. Each event has different fields, you could enter the weapon's name and serial number along with the customer's name and so on. All that would be searchable.

It seems that Sunbird isn't under development anymore, though. But I'm sure there are plenty of other options in the calendar department.

Adbot
ADBOT LOVES YOU

ToxicFrog
Apr 26, 2008


Moey posted:

Since I have not done any java programming in the better half of a decade, I figured I would put this out there.

What I am looking for is a little stand alone app that can run on Ubuntu 12.04 that when double clicked, will open a small window with with a pre-set message (legal notice), then have three text boxes. One for user name, password and PC name. Once those fields are populated and they press the login button, it will launch rdesktop from command line with those values added to the correct switches.

Since nothing will be stored, I don't think there should be any security issues with it, but if there are, someone please let me know.

...does it have to be in Java?

Also, is it allowed to depend on anything in the repositories, or just stuff that's installed by default?

E: also, is there a reason it can't just display the legal notice, then launch one of the existing rdesktop frontends like grdesktop, tsclient, or gnome-rdp? Or are those too complex for the intended audience?

E2: also, if this is a multi-user system, sending the password to rdesktop via command line is a security risk; are you sure you don't want to just let rdesktop prompt them for the password automatically?

ToxicFrog fucked around with this message at 00:30 on Jun 26, 2012

Moey
Oct 22, 2010

I LIKE TO MOVE IT

ToxicFrog posted:

...does it have to be in Java?

Also, is it allowed to depend on anything in the repositories, or just stuff that's installed by default?

E: also, is there a reason it can't just display the legal notice, then launch one of the existing rdesktop frontends like grdesktop, tsclient, or gnome-rdp? Or are those too complex for the intended audience?

E2: also, if this is a multi-user system, sending the password to rdesktop via command line is a security risk; are you sure you don't want to just let rdesktop prompt them for the password automatically?

Could depend on other things, for the purpose of these builds we already have openJDK installed, I just assumed Java would be the simplest to do this in.

I would like it to be as straight forward as possible since I have some "special" users.

The reason I would prefer to handle the legal notice, UN and PW before the RDP session connects is because these are doing rdesktop spanned across 2 monitors, and since rdesktop doesn't have the same features as MSTSC 6.0/6.1, it cannot do true multiple monitor mode, only span. This means if they just connect, the legal notice, UN and PW all end up right between the two monitors, making it look ugly and possibly confusing for the end user.

These are single user systems. All they are being used for is to connect to a VPN then rdp into a virtual workstation.

ToxicFrog
Apr 26, 2008


Moey posted:

Could depend on other things, for the purpose of these builds we already have openJDK installed, I just assumed Java would be the simplest to do this in.

I would like it to be as straight forward as possible since I have some "special" users.

The reason I would prefer to handle the legal notice, UN and PW before the RDP session connects is because these are doing rdesktop spanned across 2 monitors, and since rdesktop doesn't have the same features as MSTSC 6.0/6.1, it cannot do true multiple monitor mode, only span. This means if they just connect, the legal notice, UN and PW all end up right between the two monitors, making it look ugly and possibly confusing for the end user.

These are single user systems. All they are being used for is to connect to a VPN then rdp into a virtual workstation.

In that case here is a dirt simple bash implementation. Download, make executable, double-click. Uses zenity, which should already be installed - if not just "sudo apt-get install zenity". It is (hopefully) obvious where to edit in the window title, rdesktop options, and legal notice you want.

Due to limitations in how zenity works this asks the questions one after another, each in their own window; if you need it all in one window I can toss together a python version that does that instead.

E: there's also no error checking, eg, it'll happily proceed and let rdesktop complain if "username" is left blank. If you do want to go ahead with this version, I'll add that.

ToxicFrog fucked around with this message at 01:05 on Jun 26, 2012

Moey
Oct 22, 2010

I LIKE TO MOVE IT

ToxicFrog posted:

In that case here is a dirt simple bash implementation. Download, make executable, double-click. Uses zenity, which should already be installed - if not just "sudo apt-get install zenity". It is (hopefully) obvious where to edit in the window title, rdesktop options, and legal notice you want.

Due to limitations in how zenity works this asks the questions one after another, each in their own window; if you need it all in one window I can toss together a python version that does that instead.

Awesome! I will do some testing tonight or tomorrow. Thanks.

I was doing something similar, but wanted to have the nice little GUI which is why I figured Java. Never knew about Zenity.

ToxicFrog
Apr 26, 2008


Moey posted:

Awesome! I will do some testing tonight or tomorrow. Thanks.

I was doing something similar, but wanted to have the nice little GUI which is why I figured Java. Never knew about Zenity.

For simple "fill out a form" type stuff, it's generally way faster to do it in a scripting language with builtin bindings to a small gui library. Python/Tkinter and TCL/Tk come to mind; neither is my favorite language, but Tk is nice and simple and both are pretty much standard on linux (python especially).

For even simpler question-and-answer things, zenity is fine. It's incapable of anything more complex, but sometimes that's all you need.

Moey
Oct 22, 2010

I LIKE TO MOVE IT

ToxicFrog posted:

For simple "fill out a form" type stuff, it's generally way faster to do it in a scripting language with builtin bindings to a small gui library. Python/Tkinter and TCL/Tk come to mind; neither is my favorite language, but Tk is nice and simple and both are pretty much standard on linux (python especially).

For even simpler question-and-answer things, zenity is fine. It's incapable of anything more complex, but sometimes that's all you need.

Hmm. To get the text input boxes on the same window, would I have to move to something a little more powerful?

ToxicFrog
Apr 26, 2008


Moey posted:

Hmm. To get the text input boxes on the same window, would I have to move to something a little more powerful?

Yes.

Someone more experienced with Python could probably tighten this up some.

ToxicFrog fucked around with this message at 03:36 on Jun 26, 2012

Moey
Oct 22, 2010

I LIKE TO MOVE IT

ToxicFrog posted:

Yes.

Someone more experienced with Python could probably tighten this up some.

Awesome, thanks! I will be playing around with this tomorrow at work.

MeKeV
Aug 10, 2010

UglyCrackBaby posted:

Yes, the customer fills out a form for the background check. We then rewrite that info into our bound-books.

For the program, just the full name and purchase date would be required. From the purchase date and name I can always go into the bound book for more information. The main problem now, is finding the date in the first place.

As it is now, if I need to find a name with no date associated. I need to go through paperwork manually for YEARS of information.

I'm sure there's a better solution but all I would do is set up a file structure of /YEAR/MONTH/ and then for each name create an empty file LASTNAME.Firstname.YYMMDD

I'd then just use the super quick Everything to search.

Bonus being the files are very small, so you could back up years worth using something like spideroak or drop box, and you could possibly create new files from a mobile ile device and sync them to the main folder.

If you really wanted to you could add additional information into the file as plain text.

the littlest prince
Sep 23, 2006


I think you guys are overthinking this gun registration thing. The guy wants to enter two fields and be able to search through it.

Why don't you use Excel (or the free OpenOffice version if you don't have Office). It will be easy to pick up for pretty much everyone and when he decides to add more fields, it'll be easy as poo poo to do so. Create new worksheets for each month/year if you want. I don't know what your volume is but I can't imagine it's enough to warrant creating forms in Access that won't be easily modifiable by the people running the place. The only benefit you would gain is that searches would be a little more precise, maybe. Doubt it's worth it.

Just create the two columns and then format it as a table so you can easily sort it. Easy.

Tip: Press CTRL-; to put in today's date. Don't use NOW() or TODAY(), those update each time the file is opened.

LLJKSiLk
Jul 7, 2005

by Athanatos

the littlest prince posted:

I think you guys are overthinking this gun registration thing. The guy wants to enter two fields and be able to search through it.

Why don't you use Excel (or the free OpenOffice version if you don't have Office). It will be easy to pick up for pretty much everyone and when he decides to add more fields, it'll be easy as poo poo to do so. Create new worksheets for each month/year if you want. I don't know what your volume is but I can't imagine it's enough to warrant creating forms in Access that won't be easily modifiable by the people running the place. The only benefit you would gain is that searches would be a little more precise, maybe. Doubt it's worth it.

Just create the two columns and then format it as a table so you can easily sort it. Easy.

Tip: Press CTRL-; to put in today's date. Don't use NOW() or TODAY(), those update each time the file is opened.

He can do that, or I can probably whip up something quick in Access if he wants. I'm only overthinking to the point where he wants an accurate and quick reference that will go back a long time. I doubt he wants anything to change or more robust since he's basically using it as a searchable index for paper records.

ArmTheHomeless
Jan 10, 2003

LLJKSiLk posted:

He can do that, or I can probably whip up something quick in Access if he wants. I'm only overthinking to the point where he wants an accurate and quick reference that will go back a long time. I doubt he wants anything to change or more robust since he's basically using it as a searchable index for paper records.

I'd love it if you could do this for me.

If you need any firearms/fishing/hunting items, let me know and I can get you a wholesale discount for doing this for us. Or, if you're in the area (NW Indiana) you could stop by.

LLJKSiLk
Jul 7, 2005

by Athanatos

UglyCrackBaby posted:

I'd love it if you could do this for me.

If you need any firearms/fishing/hunting items, let me know and I can get you a wholesale discount for doing this for us. Or, if you're in the area (NW Indiana) you could stop by.

lljksilk at yahoo.com

Send me your email, and I'll zip up and send the file to you so you can check it out when I finish it. I'm letting a database import program run at work so I'm bored and can do this.

Here is the finished program:



Very bare bones, but you can search partial names, leave out the First, Middle, or Last, and a check box allows you to limit by date of purchase of the last 5 days. As soon as you give me an email, I'll send it to you. I developed it in VB.Net to make sure there weren't any problems with access incompatibility or anything, although I'm still using an accdb as the backend.

LLJKSiLk fucked around with this message at 18:43 on Jun 26, 2012

Moey
Oct 22, 2010

I LIKE TO MOVE IT

ToxicFrog posted:

Yes.

Someone more experienced with Python could probably tighten this up some.



Sorry to be such a pain, but how do I launch this?

Copied your script to a file on the desktop called rc.py. Went into terminal and made it executable (chmod +x rc.py). When I go to run it, I am not seeing anything happen. Looks like the base install of Ubuntu 12.04 does have python.

ToxicFrog
Apr 26, 2008


Moey posted:

Sorry to be such a pain, but how do I launch this?

Copied your script to a file on the desktop called rc.py. Went into terminal and made it executable (chmod +x rc.py). When I go to run it, I am not seeing anything happen. Looks like the base install of Ubuntu 12.04 does have python.

That should work fine. What happens when you try running it from the terminal (./rc.py)?

I don't have 12.04 handy right now to test on, so my best guess is that either (a) it doesn't come with tkinter by default (easy to fix with apt-get) or (b) it's defaulting to python3 rather than python2 as earlier versions did, which will require some minor changes to the program.

ToxicFrog fucked around with this message at 17:58 on Jun 26, 2012

ArmTheHomeless
Jan 10, 2003

LLJKSiLk posted:

lljksilk at yahoo.com

Send me your email, and I'll zip up and send the file to you so you can check it out when I finish it. I'm letting a database import program run at work so I'm bored and can do this.

Here is the finished program:



Very bare bones, but you can search partial names, leave out the First, Middle, or Last, and a check box allows you to limit by date of purchase of the last 5 days. As soon as you give me an email, I'll send it to you. I developed it in VB.Net to make sure there weren't any problems with access incompatibility or anything, although I'm still using an accdb as the backend.

You are so awesome! :swoon:
Sales@WestforthSports.com

Moey
Oct 22, 2010

I LIKE TO MOVE IT

ToxicFrog posted:

That should work fine. What happens when you try running it from the terminal (./rc.py)?

I don't have 12.04 handy right now to test on, so my best guess is that either (a) it doesn't come with tkinter by default (easy to fix with apt-get) or (b) it's defaulting to python3 rather than python2 as earlier versions did, which will require some minor changes to the program.

You rock. ./rc.py showed that it was missing tkinter. apt-get install python-tk fixed that up real good.

This may be geared to the linux thread, but is there a way to get Ubuntu to just directly launch the python script without all the extra options?



Or change the image for it, so it is not the little script/text symbol?

Moey fucked around with this message at 19:29 on Jun 26, 2012

ToxicFrog
Apr 26, 2008


Moey posted:

You rock. ./rc.py showed that it was missing tkinter. apt-get install python-tk fixed that up real good.

This may be geared to the linux thread, but is there a way to get Ubuntu to just directly launch the python script without all the extra options?



Or change the image for it, so it is not the little script/text symbol?



Somewhere in Nautilus there's an option to change this globally (for all python scripts, or possibly for all scripts of any kind). You probably don't want that, though.

What you probably do want is to create a .desktop file, like this:
code:
[Desktop Entry]
Name=RDesktop Launcher
Comment=Asks some simple questions and then runs rdesktop
Exec=python /path/to/rdesktop-launcher.py
Icon=applications-internet
Type=Application
Categories=Network;Utility
Terminal=false
Edit as needed, save as /usr/share/applications/rdestop-launcher.desktop, and it should show up in the applications menu (under the listed Categories).

TysonR
Jul 13, 2004
=)
I'm hoping this might be a tiny custom app but if it isn't just ignore.

A program in C++ [for windows] that takes 2 string inputs and sends POST data to a URL. The URL will return content with 1 or 0, which the program needs to display Valid if the response was 1 and Invalid if 0.

The test web URL is at: heytysonray.appspot.com/verify
post data is labeled as "email" and "license".

A valid combination that will return a 1 is a/a

TysonR fucked around with this message at 21:39 on Jun 26, 2012

Moey
Oct 22, 2010

I LIKE TO MOVE IT

ToxicFrog posted:

What you probably do want is to create a .desktop file, like this:

You seriously rock! The amount of googling the wrong terms I would have done to figure that out would have been embarrassing.

ToxicFrog
Apr 26, 2008


TysonR posted:

I'm hoping this might be a tiny custom app but if it isn't just ignore.

A program in C++ [for windows] that takes 2 string inputs and sends POST data to a URL. The URL will return content with 1 or 0, which the program needs to display Valid if the response was 1 and Invalid if 0.

The test web URL is at: heytysonray.appspot.com/verify
post data is labeled as "email" and "license".

A valid combination that will return a 1 is a/a

Does it have to be C++?

Moey posted:

You seriously rock! The amount of googling the wrong terms I would have done to figure that out would have been embarrassing.

I have all the answers because these are all things I've banged my head against in the past (and spent embarrassing amounts of time figuring out). ;) I hope the app works well for you.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

TysonR posted:

I'm hoping this might be a tiny custom app but if it isn't just ignore.

A program in C++ [for windows] that takes 2 string inputs and sends POST data to a URL. The URL will return content with 1 or 0, which the program needs to display Valid if the response was 1 and Invalid if 0.

The test web URL is at: heytysonray.appspot.com/verify
post data is labeled as "email" and "license".

A valid combination that will return a 1 is a/a

Couldn't you just do this in shell script (Perl, Bash, .bat, powershell) and something like cURL/ncat?

ToxicFrog
Apr 26, 2008


Scaramouche posted:

Couldn't you just do this in shell script (Perl, Bash, .bat, powershell) and something like cURL/ncat?

I was going to do it in lua so it could be contained in a single file, but yeah, those would also work just fine. Hence my question about whether it has to be C++.

Hoborg
Oct 19, 2006

by T. Mascis

ToxicFrog posted:

I was going to do it in lua so it could be contained in a single file, but yeah, those would also work just fine. Hence my question about whether it has to be C++.

My homeworksense is tingling.

I suspect the OP is tasked with some C++ coursework for making web-requests, and by having a simple bare-bones implementation provided for him he can flesh it out as needed by the assignment dictates.

However, it's June. Academic season is off... so maybe he says "C++" because he wants something native, as opposed to something that runs on Python, the JVM, or the CLR.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

I was thinking it could be used to find spam susceptible blog comments/guestbooks/forums but didn't want to say anything...

ToxicFrog
Apr 26, 2008


Hoborg posted:

My homeworksense is tingling.

I suspect the OP is tasked with some C++ coursework for making web-requests, and by having a simple bare-bones implementation provided for him he can flesh it out as needed by the assignment dictates.

However, it's June. Academic season is off... so maybe he says "C++" because he wants something native, as opposed to something that runs on Python, the JVM, or the CLR.

From an end-user perspective, though, there's no difference these days between a CLR app, a native app, and a py2exe/enceladus/etc script + embedded interpreter.

TysonR
Jul 13, 2004
=)

ToxicFrog posted:

Does it have to be C++?

I'm requesting C++ because I would like to integrate this functionality into a program that is already written in C++. I think I could do this after playing around with urllib2 in python, but the program that this would be put into is in C++, and googling and asking around about the best way to implement this in C++ is still leaving me with more questions than answers. Hence, I figure if this app can be done in a small amount of time it would be a lot easier for me to understand it from the source code.

The end-result is that I am basically trying to integrate a license check that pings my url, and have my url respond back from checking a cached database to see if the entered license key was valid, and if valid have the program unlocked/return as registered.

edit: not for homework. the index page of the site I linked is random units from the udacity course when I was learning about web dev in python.

TysonR fucked around with this message at 23:05 on Jun 26, 2012

ToxicFrog
Apr 26, 2008


TysonR posted:

I'm requesting C++ because I would like to integrate this functionality into a program that is already written in C++. I think I could do this after playing around with urllib2 in python, but the program that this would be put into is in C++, and googling and asking around about the best way to implement this in C++ is still leaving me with more questions than answers. Hence, I figure if this app can be done in a small amount of time it would be a lot easier for me to understand it from the source code.

The end-result is that I am basically trying to integrate a license check that pings my url, and have my url respond back from checking a cached database to see if the entered license key was valid, and if valid have the program unlocked/return as registered.

This is pretty fragile even for DRM, but at least it's easily bypassed, so there's that.

If you control the authentication server as well, switching to GET instead of POST will make your life a lot easier on the client side as you can construct an appropriate GET query in just a few lines even without using libcurl or something, whereas POST, in my experience, is a pain in the rear end whether you're using an http library or not.

Hoborg
Oct 19, 2006

by T. Mascis

ToxicFrog posted:

switching to GET instead of POST will make your life a lot easier on the client side as you can construct an appropriate GET query in just a few lines even without using libcurl or something, whereas POST, in my experience, is a pain in the rear end whether you're using an http library or not.

Uhm, how? I'm genuinely curious.

TysonR
Jul 13, 2004
=)

ToxicFrog posted:

This is pretty fragile even for DRM, but at least it's easily bypassed, so there's that.

If you control the authentication server as well, switching to GET instead of POST will make your life a lot easier on the client side as you can construct an appropriate GET query in just a few lines even without using libcurl or something, whereas POST, in my experience, is a pain in the rear end whether you're using an http library or not.

Yeah, GET/POST doesn't matter to me. As long as it can verify that the input matches the data on the server. I just changed GET to have the same functionality as POST on /verify. I'm not any more closer to figuring out how the end-code is done for C++, but if it makes it easier on anyone else whose generous enough to code this I'll help in any way I can.

ToxicFrog
Apr 26, 2008


Hoborg posted:

Uhm, how? I'm genuinely curious.

code:
fields = {
  user = "me";
  license = "123456";
}

request = "GET /license.php?"
  .. fields:mapkv(f 'k,v -> urlencode(k) .. "=" .. urlencode(v)'):concat('&')
  .. "\r\n"
  .. "Host: www.whatever.com\r\n"
  .. "Accept: text/plain\r\n"
  .. "Connection: close\r\n\r\n"

sock:write(request)
It's uglier in C/C++ but still pretty straightfoward. If you're using an HTTP library it gets even easier, because in most libraries you just end up with something like:

code:
http.request("GET", "www.whatever.com", "/license.php", fields)
In contrast, with POST you need to faff about with generating unique separators for the various fields and setting the content-type properly and whatnot, and I have never seen an HTTP library with a POST module that wasn't absolutely miserable to use.

Hoborg
Oct 19, 2006

by T. Mascis

ToxicFrog posted:

code:
request = "GET /license.php?"
  .. fields:mapkv(f 'k,v -> urlencode(k) .. "=" .. urlencode(v)'):concat('&')
  .. "\r\n"
  .. "Host: [url]www.whatever.com\r\n[/url]"
  .. "Accept: text/plain\r\n"
  .. "Connection: close\r\n\r\n"

sock:write(request)

Ah, I forgot about that.

The idea of encapsulating everything is drilled right into me - the simplicity of just sending a request into a socket reveals itself.

Jiblet
Jan 5, 2004

Limey Bastard
I'm not entirely sure this is the right place for this request but I've seen AutoHotKey bandied about in here as solutions to quite a few people's niggly issues, so I wondered if anyone could help me out here.

I posted the below on the AHK forums, but sadly I've not had a response.

I'm trying to create a very small script that when executed will pass a ctrl + down arrow to TeamSpeak 3 (in order to mute TS3). This is very likely really easy but I keep failing and I wonder if you could help?

I'm have some code that does a similar thing for Spotify (sends a ctrl+lright arrow to skip to next track):
code:
#NoTrayIcon
ControlSend, ahk_parent, ^{Left}, ahk_class SpotifyMainWindow
So I thought I'd take that and use AU3Spy to discover the info I need, here's the full output:


code:
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
TeamSpeak 3
ahk_class QWidget

>>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<<
On Screen:	2415, 730 (less often used)
In Active Window:	1983, 304

>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
Color:	0xF0F0F0 (Blue=F0 Green=F0 Red=F0)

>>>>>>>>>>( Active Window Position )<<<<<<<<<<
left: 432 top: 426 width: 784 height: 560

>>>>>>>>>>>( Status Bar Text )<<<<<<<<<<
>>>>>>>>>>>( Visible Window Text )<<<<<<<<<<<
>>>>>>>>>>>( Hidden Window Text )<<<<<<<<<<<
>>>>( TitleMatchMode=slow Visible Text )<<<<
>>>>( TitleMatchMode=slow Hidden Text )<<<<
So I made this, but it doesn't work:
code:
#NoTrayIcon
ControlSend, ahk_parent, ^{Down}, ahk_class QWidget
I also tried this which also failed:
code:
#NoTrayIcon
ControlSend, ahk_class QWidget, ^{Down}
Presumably I need to get the "TeamSpeak 3" name in there somewhere to specify, but I'm not sure of the syntax, but I tried:
code:
#NoTrayIcon
ControlSend, ahk_parent, ^{Down}, ahk_class QWidget, TeamSpeak 3
Can anyone help?

Jiblet fucked around with this message at 21:45 on Aug 25, 2012

dotalchemy
Jul 16, 2012

Before they breed, male Mallards have bright green/blue heads. After breeding season, they molt and become brown all over, to make it easier to hide in the brush while nesting.

~SMcD
Not sure if OP is still around / interested / has site code, but I've got hosting available if something like the OP had running is of interest to anyone? Happy to offer it up as this thread is quite awesome.

Also, congratulations to UglyCrackBaby for getting an entire Point of Sale / back office system written in tiny sections. If anyone would like to start out on a tiny kernel first, I'll supply requirements for tiny driver API's / GUI's / distributed filesystems and hypervisor funtionality over the course of the next 12 months.

dotalchemy
Jul 16, 2012

Before they breed, male Mallards have bright green/blue heads. After breeding season, they molt and become brown all over, to make it easier to hide in the brush while nesting.

~SMcD

EDIT - Potentially ignore, after rereading a couple of times, you want to send the keycodes from AHK, as opposed to set the actual hotkey mapping?

Why not just go to the Hotkeys tab of the TS3 preferences.

Jiblet
Jan 5, 2004

Limey Bastard

dotalchemy posted:

Why not just go to the Hotkeys tab of the TS3 preferences.



Sorry, should have said - I'm trying to use the extra keys on a Microsoft Natural 4000 keyboard (the "My Favorites" buttons specifically which I don't use at all and don't want to use). The drivers will let me use assign the button to a keypress or to fire off an application.

So in this case I use the media keys to fire off a compiled AHK script that sends key presses to Spotify for next/prev track etc. And I'm trying to extend this functionality to TS3 mute (and alter to set away/back)

ToxicFrog
Apr 26, 2008


Jiblet posted:

Sorry, should have said - I'm trying to use the extra keys on a Microsoft Natural 4000 keyboard (the "My Favorites" buttons specifically which I don't use at all and don't want to use). The drivers will let me use assign the button to a keypress or to fire off an application.

So in this case I use the media keys to fire off a compiled AHK script that sends key presses to Spotify for next/prev track etc. And I'm trying to extend this functionality to TS3 mute (and alter to set away/back)

...since you can already set the media keys to send other keystrokes, why not just have them send the keystrokes that are already bound to "TS3 mute" and "TS3 toggle away"? Why does AHK have to get involved at all?

Jiblet
Jan 5, 2004

Limey Bastard

ToxicFrog posted:

...since you can already set the media keys to send other keystrokes, why not just have them send the keystrokes that are already bound to "TS3 mute" and "TS3 toggle away"? Why does AHK have to get involved at all?

That's exactly what im trying to do! Except AHK does have to get involved as the media keys can't send keystrokes without AHK. See this part of my original post:

quote:

I have some code that does a similar thing for Spotify (sends a ctrl+lright arrow to skip to next track):
code:
#NoTrayIcon
ControlSend, ahk_parent, ^{Left}, ahk_class SpotifyMainWindow

So the keyboard dirvers are set to trigger that code when I press my "forward" key on the keyboard and I want to do a similar thing that sends "ctrl+down" to Teamspeak (bound to mute), but I'm having trouble getting AHK to target/speak to Teamspeak.

Adbot
ADBOT LOVES YOU

Corla Plankun
May 8, 2007

improve the lives of everyone
Aren't teamspeak's hotkeys global? I don't think many people would use it if they had to alt-tab back to Teamspeak every time they wanted to say something.

  • Locked thread