Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Program to use keys in background applications
New Posts  All Forums:Forum Nav:

Program to use keys in background applications

post #1 of 8
Thread Starter 
I wasn't sure where to put this, or even if it's possible. But I like to have I-Tunes running while gaming, and stuff like SC2 doesn't like to be minimized. So if I want to change a song, I need to stop for a few min and then continue. Is there anyway I can make a batch file of sorts that hits the play/pause/next function within I-tunes(While it's in the background), and set it as program it to a key on my Tactx? I've never coded outside of HTML, so this may be a stretch.
Green Dragon
(19 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i7 3930K ASrock Extreme4 X79 LGA 2011 EVGA GTX 780 6GB EVGA GTX 780 6GB 
RAMHard DriveHard DriveCooling
12GB (3x4) Samsung 2133 Mhz Sandisk SSD 500GB Samsung Spinpoint F3 Corsair H100 
OSMonitorMonitorMonitor
Windows 10 Professional 64-bit Acer G7 G237HLbi Acer G7 G237HLbi Acer G7 G237HLbi 
KeyboardPowerCaseMouse
Razer Black Widow Chroma Corsair HX 750 Lancool K62 Dragonlord Razer taipan 
AudioAudio
Creative Soundblaster Z Razer Krakeen 7.1 Chroma 
  hide details  
Reply
Green Dragon
(19 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i7 3930K ASrock Extreme4 X79 LGA 2011 EVGA GTX 780 6GB EVGA GTX 780 6GB 
RAMHard DriveHard DriveCooling
12GB (3x4) Samsung 2133 Mhz Sandisk SSD 500GB Samsung Spinpoint F3 Corsair H100 
OSMonitorMonitorMonitor
Windows 10 Professional 64-bit Acer G7 G237HLbi Acer G7 G237HLbi Acer G7 G237HLbi 
KeyboardPowerCaseMouse
Razer Black Widow Chroma Corsair HX 750 Lancool K62 Dragonlord Razer taipan 
AudioAudio
Creative Soundblaster Z Razer Krakeen 7.1 Chroma 
  hide details  
Reply
post #2 of 8
Hmm... Are there any media buttons on the keyboard? All the tactx keyboards I've seen have buttons along the top for this. If so, you should be able to just install some drivers or something and have it work. Mine work fine on my G15 so long as I have the drivers installed, for iTunes, WMP, Winamp, and others.
post #3 of 8
Try Sharpkeys or Autohotkeys. There's a 3rd one but I can't remember what it's called.

Autohotkey is more powerful but more complicated to use, but sometimes it doesn't work in games.
Omicron Lyrae
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X3 720 BE @3.6 Asus M4A785TD-V EVO Sapphire HD5770 V2 OCZ 2x2GB Gold DDR3-1333 
Hard DriveOptical DriveOSMonitor
Samsung Spinpoint F3 1TB Sony Lightscribe DVD-RW Windows 7 Professional 64-bit AOC F22+ 1080p 
KeyboardPowerCaseMouse
Cherry Scissor Switch Flat Keyboard OCZ StealthXstream 600W Cooler Master Elite 334 Microsoft Sidewinder 
  hide details  
Reply
Omicron Lyrae
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X3 720 BE @3.6 Asus M4A785TD-V EVO Sapphire HD5770 V2 OCZ 2x2GB Gold DDR3-1333 
Hard DriveOptical DriveOSMonitor
Samsung Spinpoint F3 1TB Sony Lightscribe DVD-RW Windows 7 Professional 64-bit AOC F22+ 1080p 
KeyboardPowerCaseMouse
Cherry Scissor Switch Flat Keyboard OCZ StealthXstream 600W Cooler Master Elite 334 Microsoft Sidewinder 
  hide details  
Reply
post #4 of 8
you can capture kepresses in C# and use the iTunes API to control iTunes.

http://www.ohscope.com/2009/04/02/itunes-com-api-in-c/

simple if statements, really

void keypress(Sender e)
{
if (e.keychar == 'l') itunesobj.nexttrack();
}

that would advance the song when l is pressed
AMD POWERHOUSE
(13 items)
 
  
CPUMotherboardGraphicsRAM
PHENOM X6 1090T OHHH YEAH ERR ASUS AMD SOMETHING AMD 5970 SLI W00T AMD? 
Hard DriveOptical DriveOSMonitor
AMD... AMD AMD OS AMD 24" 
PowerCase
AMD POWERRRRRRRRHOUSE COOLER MASTER AMD CASE 
  hide details  
Reply
AMD POWERHOUSE
(13 items)
 
  
CPUMotherboardGraphicsRAM
PHENOM X6 1090T OHHH YEAH ERR ASUS AMD SOMETHING AMD 5970 SLI W00T AMD? 
Hard DriveOptical DriveOSMonitor
AMD... AMD AMD OS AMD 24" 
PowerCase
AMD POWERRRRRRRRHOUSE COOLER MASTER AMD CASE 
  hide details  
Reply
post #5 of 8
Im using Winamp and you can find hotkeys in options list
Ferhat
(15 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II 955 GigaByte GA-MA790XT-UD4P xfx 6950 Kingston 
Hard DriveHard DriveCoolingOS
Seagate Western Digital freezer 64 Windows 7 64BIT 
MonitorPowerMouse
Samsung SyncMaster 2043BW be quiet! Pure Power 350W Razer Deathadder  
  hide details  
Reply
Ferhat
(15 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II 955 GigaByte GA-MA790XT-UD4P xfx 6950 Kingston 
Hard DriveHard DriveCoolingOS
Seagate Western Digital freezer 64 Windows 7 64BIT 
MonitorPowerMouse
Samsung SyncMaster 2043BW be quiet! Pure Power 350W Razer Deathadder  
  hide details  
Reply
post #6 of 8
For most of the above solutions the app you write would still have to be in the foreground to capture the keypresses.
What you need to do is write an app that runs as a service and captures all kepress events > parses for your special keys > if matched sendkeypress to itunes process > continue and send all keypresses to original destination.
    
CPUMotherboardGraphicsRAM
I7 920 Gigabyte EX58 XFX Radeon 4870 X2 6GB Corsair 
Hard DriveOptical DriveOSMonitor
500GB Maxtor LG DVDRW Vista Ultimate x64 2 x Edge IO 22" 
KeyboardPowerMouseMouse Pad
Razer Arctosa XFX 800w BTC Cheetah Gaming Mouse None 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
I7 920 Gigabyte EX58 XFX Radeon 4870 X2 6GB Corsair 
Hard DriveOptical DriveOSMonitor
500GB Maxtor LG DVDRW Vista Ultimate x64 2 x Edge IO 22" 
KeyboardPowerMouseMouse Pad
Razer Arctosa XFX 800w BTC Cheetah Gaming Mouse None 
  hide details  
Reply
post #7 of 8
Use sharp keys.
map something to media keys.
voila (i have ctrl 1-5 as previous volume down pause volume and next)
CRAY lite
(13 items)
 
  
CPUMotherboardGraphicsRAM
phenom II X4 955 asus M4A79T Deluxe AMD 790FX 460 OCZ Platinum 4GB 1600mhz 
Hard DrivePowerCase
G.Skill Falcon 64GB (SSD) OCZ StealthXStream 700w Antec 902 
  hide details  
Reply
CRAY lite
(13 items)
 
  
CPUMotherboardGraphicsRAM
phenom II X4 955 asus M4A79T Deluxe AMD 790FX 460 OCZ Platinum 4GB 1600mhz 
Hard DrivePowerCase
G.Skill Falcon 64GB (SSD) OCZ StealthXStream 700w Antec 902 
  hide details  
Reply
post #8 of 8
Thread Starter 
Quote:
Originally Posted by Sunriselad View Post
For most of the above solutions the app you write would still have to be in the foreground to capture the keypresses.
What you need to do is write an app that runs as a service and captures all kepress events > parses for your special keys > if matched sendkeypress to itunes process > continue and send all keypresses to original destination.
I just have to figure out how to write it though, as my programming skills are next to nothing unless it's JavaScript >.>;
Green Dragon
(19 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i7 3930K ASrock Extreme4 X79 LGA 2011 EVGA GTX 780 6GB EVGA GTX 780 6GB 
RAMHard DriveHard DriveCooling
12GB (3x4) Samsung 2133 Mhz Sandisk SSD 500GB Samsung Spinpoint F3 Corsair H100 
OSMonitorMonitorMonitor
Windows 10 Professional 64-bit Acer G7 G237HLbi Acer G7 G237HLbi Acer G7 G237HLbi 
KeyboardPowerCaseMouse
Razer Black Widow Chroma Corsair HX 750 Lancool K62 Dragonlord Razer taipan 
AudioAudio
Creative Soundblaster Z Razer Krakeen 7.1 Chroma 
  hide details  
Reply
Green Dragon
(19 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i7 3930K ASrock Extreme4 X79 LGA 2011 EVGA GTX 780 6GB EVGA GTX 780 6GB 
RAMHard DriveHard DriveCooling
12GB (3x4) Samsung 2133 Mhz Sandisk SSD 500GB Samsung Spinpoint F3 Corsair H100 
OSMonitorMonitorMonitor
Windows 10 Professional 64-bit Acer G7 G237HLbi Acer G7 G237HLbi Acer G7 G237HLbi 
KeyboardPowerCaseMouse
Razer Black Widow Chroma Corsair HX 750 Lancool K62 Dragonlord Razer taipan 
AudioAudio
Creative Soundblaster Z Razer Krakeen 7.1 Chroma 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Program to use keys in background applications