Page 1 of 1
How to (Re-)Focus XY window?
Posted: 28 Mar 2015 07:27
by bdeshi
Is there anything in scripting to focus an inactive XY window, ie, bring it to front ?
Re: How to (Re-)Focus XY window?
Posted: 28 Mar 2015 12:53
by admin
<hwnd> will return the window handle. Maybe you can do something with it.
Re: How to (Re-)Focus XY window?
Posted: 28 Mar 2015 13:10
by bdeshi
Not entirely in XYScript though.
Re: How to (Re-)Focus XY window?
Posted: 28 Mar 2015 15:58
by klownboy
It does seem a bit odd to me anyway, that you can't get the original XY window in focus or should I say "activated" after running a new or fresh instance of XY without resorting to other external methods. At least I haven't been able to do it. Obviously if you click on it, it will become active. I've tried many variations of simple scripts like the following and it just doesn't happen (i.e., the original XY window will be on top but not focused or be the active window). If the new or fresh XY window is closed sure then the original is active, but not if it's still around or existing.
Code: Select all
perm $hwnd=<hwnd>;
run """<xy>"" /fresh /win=min", , 0, 1;
run """<xy>"" /flg=2 /hwnd=$hwnd", , 0, 1;