Re: Code for a circle
Re: Code for a circle
- Subject: Re: Code for a circle
- From: Emmanuel <email@hidden>
- Date: Fri, 14 Mar 2003 00:58:59 +0100
At 5:40 PM -0500 13/03/03, Deivy Petrescu wrote:
On Thursday, Mar 13, 2003, at 13:49 US/Eastern, Paul Skinner wrote:
Can anyone explain the formula I should use to generate values for
the position of a window such that the values all fall close to
lying on a 30 pixel diameter circle ?
Since you've asked, I'll post it below. However, looking at both I
liked yours better.
Me too! And finally I wrote a still simpler one (pure vertical):
on SkinnerShaker()
set dx to 10
set ddx to 5
tell application "Finder"
activate
try
set frontWindow to window 1
set {y, x} to position of frontWindow
repeat with xx from x to x + dx by ddx
set position of frontWindow to {y, xx}
end repeat
repeat 3 times
set dx to dx - 2
set ddx to ddx - 1
repeat with xx from x + dx to x - dx
by -1 * ddx
set position of frontWindow to {y, xx}
end repeat
repeat with xx from x - dx to x + dx by ddx
set position of frontWindow to {y, xx}
end repeat
end repeat
set dx to dx - 2
set ddx to ddx - 1
repeat with xx from x + dx to x by -1 * ddx
set position of frontWindow to {y, xx}
end repeat
end try
end tell
end SkinnerShaker
Thanks Paul for that great idea!
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.