topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 10:02 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: SOLVED: ahk script similar to winkey + space on Win 7  (Read 6196 times)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
SOLVED: ahk script similar to winkey + space on Win 7
« on: September 03, 2010, 10:49 AM »
(as usual, i've tried to do this and decided after an hour of searching/messing about - i can't do it.)

i'd like an .ahk script that performs similar to the "winkey + space" combo on Win7 - which makes all visible windows transparent UNTIL THE WINKEY IS RELEASED.

that's the important bit - i want to enable something whilst keys are down, then disable the action when releasing the windows key (very much like how alt+tab works, or winkey + tab).

it seems like it ought to be simple and i'm sure it is if you a well versed with the language of ahk.

so, to be a little more precise, here's what i'd like to do.

1. hit winkey + anotherkey

2. action happens, e.g. focussed window becomes transparent (temporarily). note: winkey is still held down.

3. release winkey, action stops, e.g. focussed window returns to opaque.

i'd like to have other actions happen with other winkey combos so the ahk script just needs to "Send" keys as the action. hopefully, i can then just edit the script to perform other Send hotkey combinations (which will, mainly, trigger ActualWindowManager actions).

i know AHK can perform transparency and roll-up but i've already got this covered with AWM - it's just the toggle feature with the winkey that i need AHK for.

i've found there is a problem with holding the combo keys down as it cycles the action continuously, i.e. windows cycles through transparency to opaque to transparent to opaque, etc., etc.

so, the down hotkeys need to initiate the action, which "Sends" the associated hotkeys to ActualWindowManager...

...then, whilst the winkey is still down, the AWM hotkeys are released and remain released - thus, preventing the rapid cycling problem...

...then, the winkey is released, which then triggers the very same ActualWindowManager hotkey combination that was used in the first place.

hopefully that makes sense - and isn't impossible to do with AutoHotKey.

Thanks



nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: ahk script similar to winkey + space on Win 7
« Reply #1 on: September 06, 2010, 09:23 AM »
okay. i've figured this out myself - i did more searching in the AHK forum and found stuff about "Keywait".