• Blitz Shadow Player
  • Caius
  • redboot
  • Rules
  • Chain of Command
  • Members
  • Supported Ladders & Games
  • Downloads


Hot Key Assignment?
12-01-2012, 02:31 AM,
#31
RE: Hot Key Assignment?
76mm, by accident I omitted # before If statement in my yesterday’s script. The result is the script assigned hotkeys will be active in any active/focused window not just active/focused PzC window. Here I post a corrected .AHK file.

Sorry for that mistake. Angel

Code:
#If WinActive("ahk_class AfxFrameOrView80") or WinActive("ahk_class AfxFrameOrView80s")

Insert your Send commands here

return

Regards


Attached Files
.zip   PzC.zip (Size: 622 bytes / Downloads: 17)
Send this user an email
Quote this message in a reply
12-03-2012, 04:07 AM, (This post was last modified: 12-03-2012, 03:27 PM by 76mm.)
#32
RE: Hot Key Assignment?
Vsadek, it looks like you deleted all of your toolbar shortcuts in the zip you loaded? I've added them all back as menu shortcuts, and added a few more, here is a complete list:

Ctrl+a - Resolve Assault
Ctrl+b - To Bottom of Stack
Ctrl+c - Combine/Breakdown
Ctrl+d - toggle Disrupted or Broken
Ctrl+e - toggle Elevation Contours
Ctrl+f - toggle Fixed Units
Ctrl+g - Go On Foot
Ctrl+h - toggle Hide Unit Counters
Ctrl+l - toggle Low Ammo or Fuel
Ctrl+m - toggle Used Movement Points
Ctrl+p - toggle Patrolling
Ctrl+r - Recon Spotting
Ctrl+s - toggle Spotted Units
Ctrl+t - highlight Travel Mode
Ctrl+u - To Top of Stack
Ctrl+w - View Weather

Not many downloads, looks like just you and me are using this, I hope you're enjoying it as much as I am!

[EDIT] I forgot to mention that the file in the zip is an exe file, ie, this is a compiled script. If someone wants the ahk file I can also post that.


Attached Files
.zip   PzC Hotkeys v4.zip (Size: 549.64 KB / Downloads: 13)
Quote this message in a reply
12-03-2012, 02:54 PM,
#33
RE: Hot Key Assignment?
I've also created a Blankbox which lists all the hotkeys; not as easy on the eye as some of the other Blankboxes I've seen, but very functional:
[Image: BlankboxV-hotkey%20v2.bmp]



Attached Files
.zip   BlankboxV-hotkey v2.zip (Size: 30.43 KB / Downloads: 12)
Quote this message in a reply
12-03-2012, 07:59 PM,
#34
RE: Hot Key Assignment?
76mm, thank you for your effort. Yes, I removed all of hotkey shortcuts that I assigned in my previous attempt by using Click method (with toolbar buttons coordinates). Your solution with Send command is much better and works perfectly.

As for you, this little improvement of “user/player experience”, is working for me as well. What I like the most is the possibility to remap and customize my own hotkeys any way I like or prefer to use them. I really like the AutoHotkey concept as such, and fairly easy to understand end execute effective automated tasks.

Many happy games! Helmet Smile

Regards
Send this user an email
Quote this message in a reply
12-03-2012, 08:14 PM, (This post was last modified: 12-03-2012, 08:20 PM by 76mm.)
#35
RE: Hot Key Assignment?
(12-03-2012, 07:59 PM)vsadek Wrote: What I like the most is the possibility to remap and customize my own hotkeys any way I like or prefer to use them.

I also like AutoHotKey very much, so thanks again for pointing it out. It makes a huge difference for me, although it is not quite perfect, because we can't in fact "remap..hotkeys any way we like"; for instance, we can't--as far as I know--turn off the game's existing hotkeys. For instance, I would rather ditch some of the game's hotkeys that I don't use and use them for some of the functions that we can do with with AutoHotKey, but only with "Contrl+X".

This is a quibble, however, generally this solution is completely satisfactory and a vast improvement over the alternative.

I might tweak this once I've used it a bit more; for instance I use the "To Top/To Bottom" hotkeys many times each turn as I move units around, but their current positions (Ctrl+U, Ctrl+B), are not very convenient, being in the center of the keyboard. I'm thinking Ctrl+X and Ctrl+Z might be better...

Quote this message in a reply
12-03-2012, 09:31 PM,
#36
RE: Hot Key Assignment?
76 mm, yes, your point is right. It is not possible to override default hotkeys.

Here, I played around some more with other possibilities of AutoHotkey. I have put four icons into .DLL library and this is a resource file .AHK script is using.

Next, I made some additional code to the script that adds menu items to tray icon when script is active. This additional menu enables user to change tray icon dynamically using icons from .DLL library. In order to function .DLL library had to be in the same location/directory as script/executable.

This is just to demonstrate some other aspects of AutoHotkey and it does not have any effect on script functionality itself.

[Image: 6e9514a7c2trayicons_variants.png]

Screenshot represents four possible different tray icons and additional menu that enables user to change them dynamically.
Send this user an email
Quote this message in a reply
12-14-2012, 09:39 PM,
#37
RE: Hot Key Assignment?
I've rearranged some of these keys as follows:
--Ctrl-U is now Show Maximum Range for Arty units (which I've found pretty useful).
--Ctrl-Z is now Move to Bottom of Stack
--Ctrl-X is Move to top of Stack

I won't bother to upload, since no one seems to care, but if you want it let me know and I'll e-mail it to you.

I've also partially tracked down how to restart the script when it stops working sometimes--I usually keep place names on by pressing Shift-Alt, and if the script stops working I can get it working again by pressing Shift-Alt again a couple of times. Not sure why, but this seems to fix it.
Quote this message in a reply
12-15-2012, 02:40 AM,
#38
RE: Hot Key Assignment?
76mm, thank you. I made some of my own rearrangements already. Like:

Ctrl+L – I like to know how local supply stands
Ctrl+E – I like to know where my engineers are Helmet Smile

I still haven’t encountered issue with script stopping so far. I will try to press Shift+Alt more often than I do normally (usually, I mostly quick check place names with short Shift press) and maybe I can manage to recreate this and try to find what is going on. I am running on Win 7, 32-bit.

Happy gaming!
Send this user an email
Quote this message in a reply
12-15-2012, 07:11 AM,
#39
RE: Hot Key Assignment?
I've got Win7 64 bit.

I keep place names on all the time, hotkeys usually work and then suddenly they don't; Shift+Alt a couple times, and they work again. I thought that the script file might have contained a default key combo of Alt-Shift which suspended the script or something, but I don't see anything, so dunno...
Quote this message in a reply
12-20-2012, 06:22 AM, (This post was last modified: 12-20-2012, 01:48 PM by 76mm.)
#40
RE: Hot Key Assignment?
Vsadek, I can't get the hotkeys to work with a different PzC title (Minsk 44). Any idea why? I don't see anything in the script file that specifically refers to M42.

[EDIT: Fixed it, problem with Shift+Alt again...]
Quote this message in a reply


Forum Jump:


Users browsing this thread: 1 Guest(s)