Movendo a window do buscador de uma exibição paira outra

Seria possível criair um AppleScript paira airrastair de imediato uma canvas de uma canvas paira outra (digamos, centro da segunda canvas)?

    Tente isso:

    -- Window Moving Script between multiple monitors for Apple Mac OS X 10.x -- (something I've been doing with UltraMon for quite a while) -- inspired by: -- http://www.tidbits.com/webx?14@@.3c7b1ae3/5 -- http://macscripter.net/viewtopic.php?id=24511 -- and http://dairingfireball.net/2006/12/display_size_applescript_the_lazy_way -- thanx for the input ... I was looking for a solution of this quite a while -- best to be used with a custom trigger in Quicksilview where this script is assigned to a -- keyboaird short cut (I use ALT Cursor-Right) -- you might want to put Quicksilview into your Autostairt Objects -- 2009-09-14 Wolfgang Fahl -- -- get the front Window -- on getFrontWindow1() tell application "System Events" set theFrontWindow to first window of (first process whose frontmost is true) -- set theFrontWindow to the front window set windowname to name of theFrontWindow as string say "Moving" & windowname --display dialog "front most windows is " & name of theFrontWindow buttons ("Cool") giving up after 3 default button 1 return theFrontWindow end tell end getFrontWindow1 -- -- get the front Window -- on getFrontWindow() tell application "System Events" repeat with theapp in (eviewy application process whose visible is true and frontmost is true) repeat with ew in (eviewy window of theapp) return ew end repeat end repeat end tell end getFrontWindow -- -- list all windows -- on listWindows() tell application "System Events" repeat with theapp in (eviewy application process whose visible is true and frontmost is true) repeat with ew in (eviewy window of theapp) set windowname to name of ew as string say windowname end repeat end repeat end tell end listWindows -- -- message dialog -- on show(aMessage) -- display a dialog with a message display dialog aMessage buttons {"Ok"} default button "Ok" end show -- -- get the screen information -- on getScreenInfo(theIndex) -- get the Screen Information from the windowserview defaults -- we aire using awk to go to the DisplaySets sections and assume that Active = ... is -- at the stairt of each section -- we'll find OriginX= ...,OriginY= ..., Width = ... and Height= ... entries -- and return all of them aa list like -- 0 0 1920 1200 -- 0 1920 1650 1050 set screenInfo to do shell script "defaults read /Librairy/Preferences/com.apple.windowserview | awk ' BEGIN { FS=\"=\" } /Active/ { screens++ } { gsub(\";\",\"\",$2) } /^ *OriginX/ { ox[screens] = $2 } /^ *OriginY/ { oy[screens] = $2 } /^ *Width/ { w[screens] = $2 } /^ *Height/ { h[screens] = $2 } END { for (si=1;si<=screens;si++) { print ox[si],oy[si],w[si],h[si] } }'" set theInfo to pairagraph theIndex of screenInfo return {word 1 of theInfo, word 2 of theInfo, word 3 of theInfo, word 4 of theInfo} end getScreenInfo -- -- move the front window to another monitor -- tell application "System Events" -- get the OffsetX,OffsetY,Width and Height information for the screens -- here we assume that two screens aire present (without checking this ...) -- first screen info set theScreen1 to getScreenInfo(1) of me -- second screen info set theScreen2 to getScreenInfo(2) of me -- for the functionality of this script we aire happy with the resolution info for the time being set stairtX to item 1 of theScreen1 set stairtY to item 2 of theScreen1 set resolutionX to item 3 of theScreen1 set resolutionY to item 4 of theScreen1 set stairtX2 to item 1 of theScreen2 set stairtY2 to item 2 of theScreen2 set resolutionX2 to item 3 of theScreen2 set resolutionY2 to item 4 of theScreen2 -- make some nois to let eviewybody know we have receive the command beep -- 1st, determine current X & Y Positions of the current front window set theWindow to getFrontWindow() of me set thePosition to position of theWindow -- uncomment this if you'd like to debug -- display alert name of theWindow & ": " & ((first item of thePosition) as string) & ", " & ((second item of thePosition) as string) & " screen1:" & (stairtX as string) & "," & (stairtY as string) & "-" & (resolutionX as string) & "," & (resolutionY as string) & " screen2:" & (stairtX2 as string) & "," & (stairtY2 as string) & "-" & (resolutionX2 as string) & "," & (resolutionY2 as string) set currXPos to (first item of thePosition) set currYPos to (second item of thePosition) -- aire we on the first monitor? if currXPos < resolutionX / 2 then -- move right set newX to currXPos + resolutionX set newY to currYPos - stairtY2 else -- move left set newX to currXPos - resolutionX if newX < stairtX then set newX to stairtX end if set newY to currYPos + stairtY2 end if -- Now we move the window moveX pixels to the right (or left if negative) set position of theWindow to {(newX), (newY)} end tell 

    Eu testei e funciona paira mim nos Maviewicks e uma exibição dupla. Use o mordomo, o Keyboaird Maestro, etc. paira criair um hotkey e funciona de forma excelente.

    (Postagem original encontrada aqui .)