Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Applescript > Re: AppleScript...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 1594 of 1610
Post > Topic >>

Re: AppleScript wanted to move frontmost (Finder/Application) to e.g. left, right, top, bottom

by John Rethorst <nobody@[EMAIL PROTECTED] > Apr 5, 2008 at 04:03 PM

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




 6 Posts in Topic:
Re: AppleScript wanted to move frontmost (Finder/Application) to
John Rethorst <nobody@  2008-04-05 16:03:33 
Re: AppleScript wanted to move frontmost (Finder/Application) to
Otto van Verseveld <va  2008-04-06 21:19:12 
Re: AppleScript wanted to move frontmost (Finder/Application) to
John Rethorst <nobody@  2008-04-06 14:44:21 
Re: AppleScript wanted to move frontmost (Finder/Application) to
Otto van Verseveld <va  2008-04-08 00:02:05 
Re: AppleScript wanted to move frontmost (Finder/Application) to
John Rethorst <nobody@  2008-04-07 20:40:43 
Re: AppleScript wanted to move frontmost (Finder/Application) to
Otto van Verseveld <va  2008-04-08 23:26:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 4:12:18 CDT 2008.