AutoHotkey Community

It is currently May 26th, 2012, 10:53 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Remap Pause in CoH game
PostPosted: August 23rd, 2008, 9:03 pm 
Offline

Joined: August 23rd, 2008, 8:55 pm
Posts: 4
Can anyone help me here :?:

I am trying to figure out how to remap the pause command for Company of Heroes. CoH does not provide remapping features.

I have a laptop and I actually have to hit the Fn + Pause/Break key to pause the game. I want to make the pause key the SPACEBAR. Could someone help me with the script please? And, do I load Company of Heroes then run the script or vice versa? Will the script apply to everything or just CoH?

Thanks!

[Title edited. Please write descriptive titles for your topics. ~jaco0646]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2008, 11:01 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
If you want the hotkey to only be active in Company of Heroes, use the #IfWinActive command. It doesn't matter which order you run the script and the game, although running the script first will save you having to navigate to it if the game runs fullscreen.

Code:
#IfWinActive Company of Heroes
   Space::Send, {Pause}
   ; or
   Space::Send, {Break}
#IfWinActive

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2008, 11:12 pm 
Offline

Joined: August 23rd, 2008, 8:55 pm
Posts: 4
Thanks Serenity,

It still isn't working and I tried both of the ways with the Pause and then the Break. I am thinking I am going to have to do something with the Fn key. I have to hit Fn+Pause in order for my game to pause.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2008, 11:28 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
You could try SendInput instead of Send, also try getting the window title with Window Spy in case it is not "Company of Heroes". You can check if the remap is working by double clicking the script tray menu icon and selecting View/Key history and script info.

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 24th, 2008, 12:39 am 
Quote:
Very new n00b!
Nice to know. But that isn't really an issue to care about. As a result its an useless subject line. :?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 24th, 2008, 2:55 am 
Offline

Joined: August 23rd, 2008, 8:55 pm
Posts: 4
BoBo, gee thanks! I would change my subject line, but I can't now. I guess I can repost it, but then I would probably get spanked for that.

Serenity,

This is what I get when I look at the history:

My Documents\My Auto Hotkey Scripts\Company of Heroes Script.ahk -
Keybd hook: yes
Mouse hook: no
Enabled Timers: 0 of 0 ()
Interrupted threads: 0
Paused threads: 0 of 0 (0 layers)
Modifiers (GetKeyState() now) =
Modifiers (Hook's Logical) =
Modifiers (Hook's Physical) =
Prefix key is down: no

As far as Window Spy goes, This is what I get:
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
Company Of Heroes


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: [VxE], Bing [Bot], iBob35555VR, Klark92 and 64 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group