AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The ultimate KDE-style window move/resize/drag script?
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Mon Jan 31, 2005 5:00 am    Post subject: The ultimate KDE-style window move/resize/drag script? Reply with quote

Ok. So far I've looked at these scripts:

Easy Window Dragging (Script Showcase)
ck's "Convenience" Alt+Grab
KDE/FVM-like Resizing
This one.
My personal Alt+Left Click script (no, I'm not publishing my frankenstein Laughing )

I've taken some of the best elements of each, renamed all the variables with a prefix of "KDE_" in keeping with the inspiration/origin, and (kind of) optimized it. If anyone thinks of a more original name, which is just about anything, I'll run my funky search-and-replace on those darn caps. Also, 'bout the "configuration," I didn't actually find much that could be configured, except for the hotkeys. I have the two sets, but I could change it so they're directly configurable. But you wouldn't really need a variable config section at the top for "directly configurable hotkeys." Very Happy Anyway, ya... suggestions very welcome.

The current features are: KDE style moving and resizing (Alt+Left Click and Alt+Right Click, respectively), new double-alt mode (see script for details), and an alternate set if you prefer (or just set 'em yourself Rolling Eyes ). If I missed a script in my search, or you thought of a new feature, or you think I shouldn't have omitted your favorite feature (whatever it may be) of Aurelian's script, speak up!

Edit: This first version is legacy code now. Please see the showcase script (shown further down) if you want to actually use this.

Code:
/*
 _  _______  ______          _         _
| |/ /  __ \|  ____|        | |       | |
| ' /| |  | | |__ ______ ___| |_ _   _| | ___
|  < | |  | |  __|______/ __| __| | | | |/ _ \
| . \| |__| | |____     \__ \ |_| |_| | |  __/
|_|\_\_____/|______|    |___/\__|\__, |_|\___|
__          ___           _       __/ |
\ \        / (_)         | |     |___/
 \ \  /\  / / _ _ __   __| | _____      __
  \ \/  \/ / | | '_ \ / _` |/ _ \ \ /\ / /
   \  /\  /  | | | | | (_| | (_) \ V  V /
    \/  \/   |_|_| |_|\__,_|\___/ \_/\_/
 _____                        _
|  __ \                      (_)
| |  | |_ __ __ _  __ _  __ _ _ _ __   __ _
| |  | | '__/ _` |/ _` |/ _` | | '_ \ / _` |
| |__| | | | (_| | (_| | (_| | | | | | (_| |
|_____/|_|  \__,_|\__, |\__, |_|_| |_|\__, |
                   __/ | __/ |         __/ |
                  |___/ |___/         |___/


This script was made to improve the way you work
with your windows, by introducing KDE-style window
dragging and resizing, as well as some new
functions that should make things easier for you!

None of these actions require the window they're
working on to be active. Since they all use the
mouse (unless you change it via preference), they
all work on the window currently under it.

2Alt = Two Alt's in rapid succession, like a double click.

Alt + Left Click   : Drag window.
Alt + Right Click  : Resize window.
2Alt + Left Click  : Minimize window.
2Alt + Right Click : Maximize/Restore window.
2Alt + Middle      : Close window.

Or, set the Alternate variable to true for this set:

Alt + Left Click   : Drag Window.
Alt + Right Click  : Resize window.
Left + Right Click : Minimize window.
Right + Left Click : Maximize/Restore window.
Either + Middle    : Close Window.

As a side note, big kudos to Chris for the built-in
boolean variables. They reduced the Var = 0 | 1
type stuff in this script to about zero. If anyone
else thought those things were super annoying, high five.

))) Requires NT/2000/XP and AutoHotkey v1.0.25.7 or later (((

*/

;==============================================================
Alternate := false ; Set to true for the alternate set. I bet
                   ; that was tough to figure out, huh?
SetWinDelay,2 ; The lower, the faster. Keep in mind that faster
              ; doesn't necessarily mean better.
;==============================================================

; If you like having fun breaking scripts, remove
; the line below. I haven't tried it yet. ;-D
CoordMode,Mouse
If Alternate
{
   Hotkey,!LButton,Alternate1
   Hotkey,!RButton,Alternate2
   Hotkey,!MButton,off
   Hotkey,~Alt,off
}
Else
{
   Hotkey,~RButton & LButton,off
   Hotkey,~LButton & RButton,off
   Hotkey,~MButton & RButton,off
   Hotkey,~MButton & LButton,off
   Hotkey,~RButton & MButton,off
   Hotkey,~LButton & MButton,off
}
return

!LButton::
If DoubleAlt ; Remember, this is saying, "If DoubleAlt is true"
{
   ; The below is equivalent to WinMinimize. I
   ; used this version to work around a reported bug.
     MouseGetPos,,,KDE_id
   PostMessage,0x112,0xf020,,,ahk_id %KDE_id%
   DoubleAlt := false ; Re-initialize it.
   return
}
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
; The code below checks if the window's
; maximized. Obviously, it terminates
; if it is.
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
If KDE_Win
   return
WinGetPos,KDE_WinX1,KDE_WinY1,,,ahk_id %KDE_id%
Loop ; I took the timer off. For some reason I like loops better.
{
   GetKeyState,KDE_Button,LButton,P                  ; 1
   If KDE_Button = U                                 ; 2
      break                                        ; 3
   MouseGetPos,KDE_X2,KDE_Y2                         ; 4
   KDE_X2 -= KDE_X1                                  ; 5
   KDE_Y2 -= KDE_Y1                                  ; 6
   KDE_WinX2 := (KDE_WinX1 + KDE_X2)                 ; 7
   KDE_WinY2 := (KDE_WinY1 + KDE_Y2)                 ; 8
   WinMove,ahk_id %KDE_id%,,%KDE_WinX2%,%KDE_WinY2%  ; 9
   ; WHOA, right? I'll try to explain:
   ; 1-3: Check the LButton state. If up, break.
   ; 4: Grab the current mouse position.
   ; 5-6: Subtract the current mouse position from the original one.
   ;   This generates an offset from the current position.
   ; 7-8: Add the offset to the original position of the window.
   ; 9: The only part that actually does something. Guess what it is.
}
return

; This is the above code without the unused double-alt.
Alternate1:
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
If KDE_Win
   return
WinGetPos,KDE_WinX1,KDE_WinY1,,,ahk_id %KDE_id%
Loop
{
   GetKeyState,KDE_Button,LButton,P
   If KDE_Button = U
      break
   MouseGetPos,KDE_X2,KDE_Y2
   KDE_X2 -= KDE_X1
   KDE_Y2 -= KDE_Y1
   KDE_WinX2 := (KDE_WinX1 + KDE_X2)
   KDE_WinY2 := (KDE_WinY1 + KDE_Y2)
   WinMove,ahk_id %KDE_id%,,%KDE_WinX2%,%KDE_WinY2%
}
return

!RButton::
If DoubleAlt
{
   ; Fairly self-explanatory. Gets the ID of
   ; the hovered window, then checks whether
   ; it's restored or maxed, acting accordingly.
     MouseGetPos,,,KDE_id
   WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
   If KDE_Win
      WinRestore,ahk_id %KDE_id%
   Else
      WinMaximize,ahk_id %KDE_id%
   DoubleAlt := false
   return
}
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
; Again, just checking if it's already
; maximized. I'm surprised none of this
; script's predecessors had this.
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
If KDE_Win
   return
WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id%
; Ok, now we're checking to see what corner the mouse is
; in. This basically sets up 4 "regions" in the window and
; lets the Loop formula below know which one to act in.
; Translation of formula: If Mouse X is less than Window X
; and half of Window Width.
If (KDE_X1 < KDE_WinX1 + KDE_WinW / 2)
   KDE_WinLeft := true
Else
   KDE_WinLeft := false
If (KDE_Y1 < KDE_WinY1 + KDE_WinH / 2)
   KDE_WinUp := true
Else
   KDE_WinUp := false

Loop
{
   GetKeyState,KDE_Button,RButton,P    ; 1
   If KDE_Button = U                   ; 2
      break                          ; 3
   MouseGetPos,KDE_X2,KDE_Y2           ; 4
   WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id%  ; 5
   KDE_X2 -= %KDE_X1%                  ; 6
   KDE_Y2 -= %KDE_Y1%                  ; 7
   If KDE_WinLeft                      ; 8
   {                                   ; 9
      KDE_WinX1 += %KDE_X2%          ; 10
      KDE_WinW -= %KDE_X2%           ; 11
   }                                   ; 12
   Else                                ; 13
      KDE_WinW += %KDE_X2%           ; 14
   If KDE_WinUp                        ; 15
   {                                   ; 16
      KDE_WinY1 += %KDE_Y2%          ; 17
      KDE_WinH -= %KDE_Y2%           ; 18
   }                                   ; 19
   Else                                ; 20
      KDE_WinH += %KDE_Y2%           ; 21
   WinMove,ahk_id %KDE_id%,,%KDE_WinX1%,%KDE_WinY1%,%KDE_WinW%,%KDE_WinH% ; 22
   KDE_X1 := (KDE_X2 + KDE_X1)         ; 23
   KDE_Y1 := (KDE_Y2 + KDE_Y1)         ; 24
   ; Ya, um... ok. Wow. This was hard to
   ; wade through and figure out at first,
   ; but eventually I got this working.
   ; I'll TRY to explain:
   ; 1-3: Check the RButton state. If up, break.
   ; 4-5: Grabs the necessary info. If you don't think it's necessary
   ;   to grab the WinPos again, well, you might be right. Just be
   ;   prepared to make some big changes to the formula below it.
   ; 6-7: Subtract to get an offset from the current position.
   ; 8-12: If the mouse was found to be on the left side,
   ;   subtract the offset from the width (to reverse it.)
   ;   Then, add the offset to the X axis to correct the
   ;   window's position. If you don't think that's necessary,
   ;   screw with this a little and see for yourself.
   ; 13-14: If not, add the offset to the width. No correction
   ;   is necessary.
   ; 15-19: Same as above, but for the Y axis and height.
   ; 20-21: Ditto.
   ; 22: Move the window to it's new size, and yes: position.
   ;   As shown above, it requires a correction if the offset
   ;   was reversed. Hope it makes sense. :-/
   ; 23-24: Set the current mouse position to "old" for the
   ;   next iteration. I changed it to this expression-based
   ;   version to avoid adding yet another variable.
}
return

Alternate2:
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
If KDE_Win
   return
WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id%
If (KDE_X1 < KDE_WinX1 + KDE_WinW / 2)
   KDE_WinLeft := true
Else
   KDE_WinLeft := false
If (KDE_Y1 < KDE_WinY1 + KDE_WinH / 2)
   KDE_WinUp := true
Else
   KDE_WinUp := false
Loop
{
   GetKeyState,KDE_Button,RButton,P
   If KDE_Button = U
      break
   MouseGetPos,KDE_X2,KDE_Y2
   WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id%
   KDE_X2 -= %KDE_X1%
   KDE_Y2 -= %KDE_Y1%
   If KDE_WinLeft
   {
      KDE_WinX1 += %KDE_X2%
      KDE_WinW -= %KDE_X2%
   }
   Else
      KDE_WinW += %KDE_X2%
   If KDE_WinUp
   {
      KDE_WinY1 += %KDE_Y2%
      KDE_WinH -= %KDE_Y2%
   }
   Else
      KDE_WinH += %KDE_Y2%
   WinMove,ahk_id %KDE_id%,,%KDE_WinX1%,%KDE_WinY1%,%KDE_WinW%,%KDE_WinH%
   KDE_X1 := (KDE_X2 + KDE_X1)
   KDE_Y1 := (KDE_Y2 + KDE_Y1)
}
return

!MButton::
If DoubleAlt
{
   MouseGetPos,,,KDE_id
   WinClose,ahk_id %KDE_id%
   DoubleAlt := false
   return
}
return

~Alt::              ; Runs when Alt is pressed alone.
DoubleAlt := false  ; Re-initialize it to false,
KeyWait,Alt         ; Wait for Alt to be released,
KeyWait,Alt,D T0.6  ; Wait for it to be pressed again;
If Errorlevel       ; If the above line took too long,
   return           ; terminate.
DoubleAlt := true   ; Otherwise, set DoubleAlt to true.
return

; Urk. Yes, I know the pass-through is
; superbly annoying, but I swear I tried
; for at least half an hour, tweaking with
; these darn combos and this is the best
; working stuff I got. Either think up
; different combos or make this work right
; if you're too annoyed to live with it.
~RButton & LButton::
MouseGetPos,,,KDE_id
PostMessage,0x112,0xf020,,,ahk_id %KDE_id%
return

~LButton & RButton::
MouseGetPos,,,KDE_id
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
If KDE_Win
   WinRestore,ahk_id %KDE_id%
Else
   WinMaximize,ahk_id %KDE_id%
return

~MButton & RButton::
~MButton & LButton::
~RButton & MButton::
~LButton & MButton::
MouseGetPos,,,KDE_id
WinClose,ahk_id %KDE_id%
return


This is the version that is synchronous with the showcase one, and may be more recently updated than the above:

Code:
; This script was inspired by and built on many like it
; in the forum. Thanks go out to ck, thinkstorm, Chris,
; and aurelian for a job well done.

; Change history:
; November 07, 2006: Optimized resizing code in !RButton, courtesy of bluedawn.
; February 05, 2006: Fixed double-alt (the ~Alt hotkey) to work with latest versions of AHK.

; The Double-Alt modifier is activated by pressing
; Alt twice, much like a double-click. Hold the second
; press down until you click.
;
; The shortcuts:
;  Alt + Left Button  : Drag to move a window.
;  Alt + Right Button : Drag to resize a window.
;  Double-Alt + Left Button   : Minimize a window.
;  Double-Alt + Right Button  : Maximize/Restore a window.
;  Double-Alt + Middle Button : Close a window.
;
; You can optionally release Alt after the first
; click rather than holding it down the whole time.

If (A_AhkVersion < "1.0.39.00")
{
    MsgBox,20,,This script may not work properly with your version of AutoHotkey. Continue?
    IfMsgBox,No
    ExitApp
}


; This is the setting that runs smoothest on my
; system. Depending on your video card and cpu
; power, you may want to raise or lower this value.
SetWinDelay,2

CoordMode,Mouse
return

!LButton::
If DoubleAlt
{
    MouseGetPos,,,KDE_id
    ; This message is mostly equivalent to WinMinimize,
    ; but it avoids a bug with PSPad.
    PostMessage,0x112,0xf020,,,ahk_id %KDE_id%
    DoubleAlt := false
    return
}
; Get the initial mouse position and window id, and
; abort if the window is maximized.
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
If KDE_Win
    return
; Get the initial window position.
WinGetPos,KDE_WinX1,KDE_WinY1,,,ahk_id %KDE_id%
Loop
{
    GetKeyState,KDE_Button,LButton,P ; Break if button has been released.
    If KDE_Button = U
        break
    MouseGetPos,KDE_X2,KDE_Y2 ; Get the current mouse position.
    KDE_X2 -= KDE_X1 ; Obtain an offset from the initial mouse position.
    KDE_Y2 -= KDE_Y1
    KDE_WinX2 := (KDE_WinX1 + KDE_X2) ; Apply this offset to the window position.
    KDE_WinY2 := (KDE_WinY1 + KDE_Y2)
    WinMove,ahk_id %KDE_id%,,%KDE_WinX2%,%KDE_WinY2% ; Move the window to the new position.
}
return

!RButton::
If DoubleAlt
{
    MouseGetPos,,,KDE_id
    ; Toggle between maximized and restored state.
    WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
    If KDE_Win
        WinRestore,ahk_id %KDE_id%
    Else
        WinMaximize,ahk_id %KDE_id%
    DoubleAlt := false
    return
}
; Get the initial mouse position and window id, and
; abort if the window is maximized.
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
If KDE_Win
    return
; Get the initial window position and size.
WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id%
; Define the window region the mouse is currently in.
; The four regions are Up and Left, Up and Right, Down and Left, Down and Right.
If (KDE_X1 < KDE_WinX1 + KDE_WinW / 2)
   KDE_WinLeft := 1
Else
   KDE_WinLeft := -1
If (KDE_Y1 < KDE_WinY1 + KDE_WinH / 2)
   KDE_WinUp := 1
Else
   KDE_WinUp := -1
Loop
{
    GetKeyState,KDE_Button,RButton,P ; Break if button has been released.
    If KDE_Button = U
        break
    MouseGetPos,KDE_X2,KDE_Y2 ; Get the current mouse position.
    ; Get the current window position and size.
    WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id%
    KDE_X2 -= KDE_X1 ; Obtain an offset from the initial mouse position.
    KDE_Y2 -= KDE_Y1
    ; Then, act according to the defined region.
    WinMove,ahk_id %KDE_id%,, KDE_WinX1 + (KDE_WinLeft+1)/2*KDE_X2  ; X of resized window
                            , KDE_WinY1 +   (KDE_WinUp+1)/2*KDE_Y2  ; Y of resized window
                            , KDE_WinW  -     KDE_WinLeft  *KDE_X2  ; W of resized window
                            , KDE_WinH  -       KDE_WinUp  *KDE_Y2  ; H of resized window
    KDE_X1 := (KDE_X2 + KDE_X1) ; Reset the initial position for the next iteration.
    KDE_Y1 := (KDE_Y2 + KDE_Y1)
}
return

; "Alt + MButton" may be simpler, but I
; like an extra measure of security for
; an operation like this.
!MButton::
If DoubleAlt
{
    MouseGetPos,,,KDE_id
    WinClose,ahk_id %KDE_id%
    DoubleAlt := false
    return
}
return

; This detects "double-clicks" of the alt key.
~Alt::
DoubleAlt := A_PriorHotKey = "~Alt" AND A_TimeSincePriorHotkey < 400
Sleep 0
KeyWait Alt  ; This prevents the keyboard's auto-repeat feature from interfering.
return


Last edited by jonny on Thu Nov 09, 2006 2:44 am; edited 2 times in total
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Jan 31, 2005 2:13 pm    Post subject: Reply with quote

jonny wrote:
I've taken some of the best elements of each, renamed all the variables with a prefix of "KDE_" in keeping with the inspiration/origin, and (kind of) optimized it.
Wow, looks great Jonny.

Quote:
I didn't actually find much that could be configured, except for the hotkeys. I have the two sets, but I could change it so they're directly configurable.
As long as it's clear to someone reading the script for the first time how to reconfigure it, I think it's fine.

Quote:
If I missed a script in my search, or you thought of a new feature, or you think I shouldn't have omitted your favorite feature (whatever it may be) of Aurelian's script, speak up!
To help get the word out, I've posted an announcement in the other two topics.

Quote:
... I'm including this barebones version too. The below is what I consider the *real* first, rough draft type thingy.
So it's the same script, just without comments?

Quote:
Feel free to move it to it's own topic if you want.
I have done so, in the hopes that a few more people will try it and give feedback.
Back to top
View user's profile Send private message Send e-mail
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Mon Jan 31, 2005 4:11 pm    Post subject: Reply with quote

Quote:
So it's the same script, just without comments?


Yes. I might sit down and make some nicer ones (without mondo ascii Laughing ) later on. My goal is to have any semi-technical AHKer who reads this to understand what every line of code does. (my line-numbering was a step in that direction, however I don't think that's the best way of doing it)

Quote:
As long as it's clear to someone reading the script for the first time how to reconfigure it, I think it's fine.


You read my mind. Wink

Quote:
To help get the word out, I've posted an announcement in the other two topics.


I noticed. Smile Thanks.

Possibly my first idea for an improvement: making a new set for the keyboard. Also, I could put in a whole new way to set the hotkeys, which is less restrictive; setting them in variables. I like my double-alt doodad, though, if I did that I'd probably try to introduce some new symbol (@ maybe) to make the modifier that follows it a double-click. Anyway, I'll keep tinkering with it.
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Mon Feb 14, 2005 9:39 pm    Post subject: Reply with quote

This script has now officially been submitted to Chris for showcase consideration (in truth, the "considering" part is mostly over, it just sounds official). I'll keep this informally commented version up in case anyone finds it easier to understand than the showcase version.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Feb 15, 2005 1:19 am    Post subject: Reply with quote

Thanks Jonny; the script looks and works great. It has been posted at http://www.autohotkey.com/docs/scripts/EasyWindowDrag_(KDE).htm
Back to top
View user's profile Send private message Send e-mail
Hotfoot
Guest





PostPosted: Wed Feb 16, 2005 6:19 am    Post subject: Reply with quote

Cool script, jonny.

There's a program that I like to use called allSnap that can snap the edges of windows to edges of the screen or other windows. I was just wondering if your script (with AutoHotkey) can implement something like this.

allSnap
Back to top
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Feb 16, 2005 6:48 am    Post subject: Reply with quote

That is both a great program (I have it on both my computers) and a great idea. I'll think about it later. It fits with the theme of "window management," too.
Back to top
View user's profile Send private message
delta



Joined: 16 Feb 2005
Posts: 44

PostPosted: Wed Feb 16, 2005 5:45 pm    Post subject: Reply with quote

First of all: Thanks for this programm and thanks for the script, I love them both! Very Happy

Moreover, I also have a suggestion for this script. Wink The Double-Alt detection disables the Single-Alt feature, that is with a single stroke of Alt you can normally jump to the menu bar and then navigate there using the cursor keys. I use this function a lot, because Alt + F (File menu) won't work with German programms (it's Alt + D there). Single Alt is universal, so it's good. Laughing

A perfect work-around is just to send an extra Alt-Stroke:
Code:
~Alt::
DoubleAlt := false ; Re-initialize DoubleAlt.
KeyWait,Alt ; Wait for release...

   Send, {ALT}

KeyWait,Alt,D T0.6 ; ... and the next press.
If Errorlevel ; If it never comes or takes too long, DoubleAlt remains false.
   return
DoubleAlt := true ; Otherwise, it's true until Alt is released (activating this hotkey again).
return
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Wed Feb 16, 2005 6:05 pm    Post subject: Reply with quote

English: Alt + F = File
German: Alt + D = Datei (Jonny's Deutsch Kurs - Lektion I Wink )
Back to top
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Feb 16, 2005 6:13 pm    Post subject: Reply with quote

Thanks for noting that. I might've noticed that myself, but I always use the direct hotkeys rather than pressing alt by itself first. One adverse side effect of fixing this, though, is that when activating double mode, the menu bar briefly flashes. For that reason, it is commented out by default and those wishing to have Single-Alt functionality can still enable it.

@Chris: I have updated the first post so that the "barebones" is now the showcase cersion. The only changes I've made are removing the first KeyWait, since it's redundant due to the hotkey being activated on the up stroke, and adding a commented line which enables Single-Alt at the cost of the menu flashing. Please update the showcase when you have time.
Back to top
View user's profile Send private message
delta



Joined: 16 Feb 2005
Posts: 44

PostPosted: Wed Feb 16, 2005 6:14 pm    Post subject: Reply with quote

BoBo wrote:
English: Alt + F = File
German: Alt + D = Datei (Jonny's Deutsch Kurs - Lektion I Wink )

Actually I'm German. Laughing I just don't want to bother if it is Alt + F, Alt + D or something else I have to press.

@Jonny:
Well, that's true, there is some flashing visible, but even without the modification the underlinings flash on double Alt. Aesthetically speaking it's both unacceptable. Laughing Wink
Back to top
View user's profile Send private message
Iulian
Guest





PostPosted: Mon Mar 20, 2006 5:34 pm    Post subject: lbutton for Alt-Tab Replacement Reply with quote

I would like to use your script, but I also like Alt-Tab Replacement
( http://file.autohotkey.net/evl/AltTab/AltTab.ahk ).
Running both scripts, makes imposible the selection in the task list
(alt+left click) because the kde window moving is triggered.
Is there an work around for this ?

Iulian T.
Back to top
evl



Joined: 24 Aug 2005
Posts: 1238

PostPosted: Mon Mar 20, 2006 6:14 pm    Post subject: Reply with quote

@Iulian:
Glad you like my script. Probably the easiest way around this (although I haven't really looked over this script so may be wrong), is to disable the hotkeys if the Alt-Tab replacement window is active, by using #IfWinNotActive on each line before the hotkeys are defined:

Code:

#IfWinNotActive, Alt-Tab Replacement ; that's the title of the window
Back to top
View user's profile Send private message
Iulian
Guest





PostPosted: Tue Mar 21, 2006 10:38 am    Post subject: Reply with quote

@evl
I never looked into an ahk script but adding your line just before the first occurence of LButton (which for me looked like a hotkey definition area) did the trick.
Big thanks to you and jonny for sharing those scripts.

Iulian T.
Back to top
ranlun



Joined: 19 Jan 2006
Posts: 11

PostPosted: Thu May 04, 2006 10:13 pm    Post subject: Reply with quote

Have you thought about adding minimize to sys tray by rightclicking the minimize button? Perhaps always on top by rightclicking max/restore button.
Also, what about prconfigured sizes and positions on windows? Like the Sizer program. It let's you define postions and sizes that can be accesses through a little pop-up box.
Yes, titan has a script that sounds like it, but I would really like to see a script that collects all of them.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group