Sign in to follow this  
Followers 0
ItsMagic

Photoshop and Windows

4 posts in this topic

hello everyone.

i just discovered this software and don't understand how it works.

I would like to have a script which detect opened photoshop files windows and then when i press ctrl + tab or ctrl + shift + tab (this action select an other file in photoshop), i would like new selected window be aligned and resized with/like the previously selected.

I started coding with autohotkey but a friend of mine told me Autolt was really better.

But i don't understand how it works :)

Could anyone help me with this script basic ?

Share this post


Link to post
Share on other sites



Here is something to get you started. I don't have photoshop, so I can't do much more than this.

;~ set the hotkeys
HotKeySet("+^{tab}", "function"); + = shift and ^ = control
HotKeySet("^{tab}", "function")

;~ endless loop (waits for you to press a hotkey)
While 1
    Sleep(100)
WEnd

Func function()
;~ here's where you have to find out what the newly selected window is,
;~ find out what the position of the previous window is, and then move the first one.
;~ you would probably want to use winmove to move/resize the new window
EndFunc

p.s. use the helpfile, it's a great resource.


The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks.

But i'm still dont understanding :s

Actually i made that with autohotkeys, dunno if it can help to describe what i'm trying to do:

#IfWinActive, ahk_class PSDocC

,::
WinGetPos, X, Y, XA, YA, A; "A" to get the active window's pos.
SendInput, ^+{TAB}
Sleep, 70
WinGetActiveTitle, MoveWin
WinMove ,%MoveWin%, , X, Y, XA, YA
return
`;::
WinGetPos, X, Y, XA, YA, A; "A" to get the active window's pos.
SendInput, ^{TAB}
Sleep, 70
WinGetActiveTitle, MoveWin
WinMove ,%MoveWin%, , X, Y, XA, YA
return
Edited by ItsMagic

Share this post


Link to post
Share on other sites

So basically I want to reinvent the alt tab effect but only for photoshop windows. I would like to use "Win+;" for next and "Win+," for previous. When I switch windows I want to to get the window I switch to to line up with the window I was just using and resize so it is the same size as the window I was just using.

Also I don't know if this is possible but it would be nice if it was the same zoom as well.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0