topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday April 18, 2024, 4:28 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: IDEA: Windows Control  (Read 5872 times)

Smobu

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 51
    • View Profile
    • Donate to Member
IDEA: Windows Control
« on: January 17, 2009, 03:26 PM »
Function: Restore or Maximize Windows with Double Click with the Right Mouse Anywhere Inside a Window

When a window is in restore mode then double clicking with the right mouse anywhere inside the window will maximize the window.
If the window is in maximized view then doubling clicking with the right mouse will restore the window.

kwacky1

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 182
  • i am Cody's cousin
    • View Profile
    • CrazyLittleWebsite
    • Donate to Member
Re: IDEA: Windows Control
« Reply #1 on: January 18, 2009, 05:25 AM »
Here you go, try RestMax

Edit: Uploaded correct AHK
« Last Edit: January 19, 2009, 04:41 AM by kwacky1 »

Smobu

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 51
    • View Profile
    • Donate to Member
Re: IDEA: Windows Control
« Reply #2 on: January 18, 2009, 11:53 AM »
Thanks for filling out the request.

The exe works fine, but I'm not quite sure why but the ahk file is causing me to get a screen distortion when using this.

Before:
http://i42.tinypic.com/2ezu04y.jpg

After:
http://i43.tinypic.com/5l2g6f.png

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Windows Control
« Reply #3 on: January 18, 2009, 02:57 PM »
 :) Try RightMax!

This one catches the rightclicks! It slows down single rightclicks, though...

Skrommel

;RightMax.ahk
; Doublerightclick in a window to maximize or restore it
;Skrommel @ 2009

#NoEnv
#SingleInstance,Force
SetWinDelay,0
CoordMode,Mouse,Screen
SendMode Input

RegRead,dblclickspeed,HKEY_CURRENT_USER,Control Panel\Mouse,DoubleClickSpeed
SysGet,dblclickx,36
SysGet,dblclicky,37
time:=A_TickCount
Return

$RButton::
oldmx:=mx
oldmy:=my
oldmwin:=mwin
oldmctrl:=mctrl
MouseGetPos,mx,my,mwin,mctrl
oldtime:=time
time:=A_TickCount
SetTimer,RIGHT,% "-" dblclickspeed
If (mx<oldmx-dblclickx Or mx>oldmx+dblclickx Or my<oldmy-dblclicky Or my>oldmy+dblclicky Or time-oldtime>dblclickspeed Or mwin<>oldmwin)
  Return
SetTimer,RIGHT,Off
WinGet,minmax,MinMax,ahk_id %mwin%
If minmax=0
  WinMaximize,ahk_id %mwin%
Else
  WinRestore,ahk_id %mwin%
Return

RIGHT:
Click,Right
Return

Smobu

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 51
    • View Profile
    • Donate to Member
Re: IDEA: Windows Control
« Reply #4 on: January 18, 2009, 06:38 PM »
Would someone be kind enough to tweak the script to detect dragging of the right mouse button because it interferes with mouse gestures on Opera.

kwacky1

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 182
  • i am Cody's cousin
    • View Profile
    • CrazyLittleWebsite
    • Donate to Member
Re: IDEA: Windows Control
« Reply #5 on: January 19, 2009, 03:31 AM »
The exe works fine, but I'm not quite sure why but the ahk file is causing me to get a screen distortion when using this.

Sorry about that  :-[, I uploaded the wrong ahk, change line 20
from
Click, Right
to
Send, {Alt}