Hi y'all!  Here is a little script I wrote, which I set to RunFile when 
I push win+1.
It is for a dual-monitor setup so that it opens Notepad2 on whichever 
monitor has the mouse cursor.
Now this will only work if you have the secondary monitor set to be a 
right-hand extension of the primary monitor.


local mp = xmouse
local xs = xscreen

do("C:/Program Files/notepad2/Notepad2.exe")
wait.for(500)
local NP2= win.handle("active")

local R = win.getrect(NP2)
local Rx = word(R, 1)
local Rt = word(R, 2)


If (mp > xs) do
    win.move(NP2, Rx+xs, Rt)
EndIf

quit


Reply via email to