1
Skrommel's Software / changed MoveInactiveWin to be a tool for recording screen sessions
« on: March 26, 2008, 07:27 AM »
Hi, I changed your MoveInactiveWin to become a MoveRecordingAreaWin - it is for recording screen session where you record only part of the screen. Now with Left WinKey and Left Mouse Key you can move the window you are recording (as the recording area stays at it is in most recording tools like Wink etc.). I put a remark that it is a derivative of your work, but just want to ask, if it is ok to use this.
Marcus
Here is the code of my script (some changes done to your original):
; MoveRecordingAreaWin.ahk
; baseed on MoveInactiveWin.ahk from Skrimmel
; move a windows under a recording area for screen capturing
; use left windows key to activate movement
; mac, (c)2008
#SingleInstance,Force
CoordMode,Mouse,Screen
Gosub,TRAYMENU
Return
#LButton::
MouseGetPos,oldmx,oldmy,mwin,mctrl
Loop
{
GetKeyState,lbutton,LButton,P
GetKeyState,LWin,LWin,P
If (lbutton="U" Or LWin="U")
Break
MouseGetPos,mx,my
If (mx<>oldmy Or my<>oldmy) {
; mouse hat sich bewegt
vx:=mx-oldmx
vy:=my-oldmy
;oldmx:=mx
;oldmy:=my
}
WinGetPos,wx,wy,ww,wh,ahk_id %mwin%
wx:=wx-vx
wy:=wy-vy
mousemove, %oldmx%, %oldmy%, 0
SetWinDelay, -1
WinMove,ahk_id %mwin%,,%wx%,%wy%
}
Return
TRAYMENU:
Menu,Tray,NoStandard
Menu,Tray,DeleteAll
Menu,Tray,Add,MoveInactiveWin,ABOUT
Menu,Tray,Add,
Menu,Tray,Add,&About...,ABOUT
Menu,Tray,Add,E&xit,EXIT
Menu,Tray,Default,MoveInactiveWin
Return
ABOUT:
Gui,Destroy
Gui,Add,Picture,Icon1,MoveRecordingAreaWin.exe
Gui,Font,Bold
Gui,Add,Text,x+10 yp+10,MoveRecordingAreaWin v1.0
Gui,Font
Gui,Add,Text,xm,Move a window under a recording area without activating it.
Gui,Add,Text,xm,- Left Windows Key + Left Mouse Click and drag to move.
Gui,Add,Text,xm,- Click anywhere within a window to move it.
Gui,Add,Text,xm,`t
Gui,Add,Picture,Icon2,MoveRecordingAreaWin.exe
Gui,Font,Bold
Gui,Add,Text,x+10 yp+10,based on 1 Hour Software by Skrommel (www.dcmembers.com)
Gui,Font
Gui,Add,Button,GABOUTOK Default xm+220 y+20 w75,&OK
Gui,Show
about=
Return
ABOUTOK:
Gui,Destroy
Return
EXIT:
ExitApp
Marcus
Here is the code of my script (some changes done to your original):
; MoveRecordingAreaWin.ahk
; baseed on MoveInactiveWin.ahk from Skrimmel
; move a windows under a recording area for screen capturing
; use left windows key to activate movement
; mac, (c)2008
#SingleInstance,Force
CoordMode,Mouse,Screen
Gosub,TRAYMENU
Return
#LButton::
MouseGetPos,oldmx,oldmy,mwin,mctrl
Loop
{
GetKeyState,lbutton,LButton,P
GetKeyState,LWin,LWin,P
If (lbutton="U" Or LWin="U")
Break
MouseGetPos,mx,my
If (mx<>oldmy Or my<>oldmy) {
; mouse hat sich bewegt
vx:=mx-oldmx
vy:=my-oldmy
;oldmx:=mx
;oldmy:=my
}
WinGetPos,wx,wy,ww,wh,ahk_id %mwin%
wx:=wx-vx
wy:=wy-vy
mousemove, %oldmx%, %oldmy%, 0
SetWinDelay, -1
WinMove,ahk_id %mwin%,,%wx%,%wy%
}
Return
TRAYMENU:
Menu,Tray,NoStandard
Menu,Tray,DeleteAll
Menu,Tray,Add,MoveInactiveWin,ABOUT
Menu,Tray,Add,
Menu,Tray,Add,&About...,ABOUT
Menu,Tray,Add,E&xit,EXIT
Menu,Tray,Default,MoveInactiveWin
Return
ABOUT:
Gui,Destroy
Gui,Add,Picture,Icon1,MoveRecordingAreaWin.exe
Gui,Font,Bold
Gui,Add,Text,x+10 yp+10,MoveRecordingAreaWin v1.0
Gui,Font
Gui,Add,Text,xm,Move a window under a recording area without activating it.
Gui,Add,Text,xm,- Left Windows Key + Left Mouse Click and drag to move.
Gui,Add,Text,xm,- Click anywhere within a window to move it.
Gui,Add,Text,xm,`t
Gui,Add,Picture,Icon2,MoveRecordingAreaWin.exe
Gui,Font,Bold
Gui,Add,Text,x+10 yp+10,based on 1 Hour Software by Skrommel (www.dcmembers.com)
Gui,Font
Gui,Add,Button,GABOUTOK Default xm+220 y+20 w75,&OK
Gui,Show
about=
Return
ABOUTOK:
Gui,Destroy
Return
EXIT:
ExitApp