Your code below is much like what I posted in this thread on April 3. This
will
not run as an application since your Applescript application is the
frontmost
app at the time it runs, and that's not what you want. You'll need to run
the
script as a compiled script, either from Apple's script menu or, if
QuickSilver
runs compiled scripts, from that.
In article <cb37d$47f7ec65$5355b012$20166@[EMAIL PROTECTED]
>,
Otto van Verseveld <vanohvxrsxvxld@[EMAIL PROTECTED]
> wrote:
> where a number of scripts seem to do what I want.
> I tried the following script:
>
> <AppleScript>
> --first get name of top most app
> tell application "System Events" to set appList to name of application
> processes whose frontmost is true
> set frontApp to item 1 of appList
>
> --get size of the window we're going to move
> tell application "System Events" to tell process frontApp to set
> {winWidth, winHeight} to size of front window
>
> --move the window
> tell application frontApp to set bounds of window 1 to {0, 0, winWidth,
> winHeight}
> </AppleScript>
>
> which doesn't work even if I save it with the following Script Editor
> settings:
> File format=application
> Options=Run Only
>
> If I run the above save script/application I always get the error:
> NSReceiverEvaluationScriptError: 4
> which puzzles me and for which I currently can't get a fix.
>
--
John Rethorst
jrethorst at post dot com


|