[SOLVED] Default position for Copy window
[SOLVED] Default position for Copy window
When using the classic Windows copy (I'm not using Custom Copy), is there any way to specify the default position of the Copy window? I'd like to make it always open on the lower right part of my screen, instead of in the middle-ish.
Last edited by Leito on 08 Apr 2018 12:10, edited 1 time in total.
Re: Default position for Copy window
Apart from writing (or finding) a tool that automatically moves that window in the correct position once it pops up?
No
No
One of my scripts helped you out? Please donate via Paypal
Re: Default position for Copy window
I was wondering if Don could send the position to the Window when creating it.
I can easily write an AutoHotKey program to move the window to the correct position, but I have no clue when to execute it. Thought maybe XYplorer could run a script after starting the copy...
I can easily write an AutoHotKey program to move the window to the correct position, but I have no clue when to execute it. Thought maybe XYplorer could run a script after starting the copy...
Code: Select all
WinGetPos,,, copyWindowWidth, copyWindowHeight, ahk_exe XYcopy.exe
WinMove, ahk_exe XYcopy.exe,, (A_ScreenWidth)-(copyWindowWidth), (A_ScreenHeight)-(copyWindowHeight)
Re: Default position for Copy window
It's not executing that ahk script after the copy windows was created but letting
it run in the background and check for the windows appearance -> move it
it run in the background and check for the windows appearance -> move it
Code: Select all
#NoTrayIcon
SetTimer, XYCopyCheck, 250
return
XYCopyCheck:
... your check / move code ...
return
One of my scripts helped you out? Please donate via Paypal
Re: Default position for Copy window
I still want to be able to move it, so it should be moved only when it's opening up. Such timer would move it back permanently.
Re: Default position for Copy window
Then add that functionality to your code. Give a new copy window an id,
move it once, ignore that id further on as long as that window still exists and
finally remove the id once the window is closed.
In the end the shell copy feature is a windows api call and I wouldn't expect
to mess XY with modifying window positions afterwards.
move it once, ignore that id further on as long as that window still exists and
finally remove the id once the window is closed.
In the end the shell copy feature is a windows api call and I wouldn't expect
to mess XY with modifying window positions afterwards.
One of my scripts helped you out? Please donate via Paypal
Re: Default position for Copy window
Thanks, will try that!
Re: Default position for Copy window
This seems to be working nicely:
Code: Select all
#Persistent ; Keeps a script permanently running (that is, until the user closes it or ExitApp is encountered).
SetTimer, MoveXYCopyWindow, 250
return
MoveXYCopyWindow:
exeName := "XYcopy.exe"
WinGet, windowHandle, ID, ahk_exe %exeName%
if (windowHandles != "" && windowHandle == "")
{
; Last active window has been closed, clear the list of handles
windowHandles := ""
}
IfNotInString, windowHandles, %windowHandle%
{
; This is the first time we manage this window, add it to the list of handles
windowHandles := windowHandles . "," . windowHandle
; Get the size of the window
WinGetPos,,, windowWidth, windowHeight, ahk_id %windowHandle%
; Move the window to the lower right of the screen
WinMove, ahk_id %windowHandle%,, (A_ScreenWidth)-(windowWidth)+7, (A_ScreenHeight)-(windowHeight)-33
}
return
Re: [SOLVED] Default position for Copy window
Good afternoon all,
I just started working AutoHotKey this week after reading this thread and based on a reply in another one. I took your base script as a starting point and added a few features for my setup. This is my first attempt at a working AHK. I would assume improvements/corrections could be made. With that said, it does work on my setup without any error.
Added
-support for up to 3 monitors
-INI support (in case you compile to EXE, easier to change settings in the INI)
-extracted XYCopy.exe icon (hope this is okay w/Don) to use with the compiled version (if you use the Convert AHK to EXE utility)
-options to have the window move to CENTER, UPPERLEFT, UPPERRIGHT, LOWERLEFT and LOWERRIGHT
Attached are the base files. I am not including a compiled version. This way you can review the AHK and compile yourself.
Being my first AHK, I am open to suggestions, comments, etc. if you have any.
I just started working AutoHotKey this week after reading this thread and based on a reply in another one. I took your base script as a starting point and added a few features for my setup. This is my first attempt at a working AHK. I would assume improvements/corrections could be made. With that said, it does work on my setup without any error.
Added
-support for up to 3 monitors
-INI support (in case you compile to EXE, easier to change settings in the INI)
-extracted XYCopy.exe icon (hope this is okay w/Don) to use with the compiled version (if you use the Convert AHK to EXE utility)
-options to have the window move to CENTER, UPPERLEFT, UPPERRIGHT, LOWERLEFT and LOWERRIGHT
Attached are the base files. I am not including a compiled version. This way you can review the AHK and compile yourself.
Being my first AHK, I am open to suggestions, comments, etc. if you have any.
- Attachments
-
- MoveXYCopyWindow.zip
- (20.99 KiB) Downloaded 84 times
Re: [SOLVED] Default position for Copy window
Looks fine to me. Clean code...I am open to suggestions, comments
One of my scripts helped you out? Please donate via Paypal
Re: [SOLVED] Default position for Copy window
Hi,
I use DisplayFusion to move windows to special positions, resize them, or play a sound when a window closes.
https://www.displayfusion.com
Maybe this is something that helps you.
I use DisplayFusion to move windows to special positions, resize them, or play a sound when a window closes.
https://www.displayfusion.com
Maybe this is something that helps you.
In special cases you may contact me on Discord: http://bit.ly/dsDisco