Re: Script preview
Re: Script preview
- Subject: Re: Script preview
- From: Emmanuel <email@hidden>
- Date: Mon, 24 Jun 2002 20:28:00 +0200
At 3:50 PM +0200 24/6/02, Philippe GRUCHET wrote:
>
Found a coercion based on Jon9s Commands osaxen:
>
>
--start script
>
load script "HD:" as alias --> put there your path
>
set x to result as styled text --> coercion based on Jon9s Commands osaxen
>
>
tell application "Tex-Edit Plus"
>
activate
>
make new window with properties {bounds:{14, 43, 498, 714}, background
>
color:{marble}}
>
set contents of window 1 to x
>
>
set the_name to (name of window 1) as text
>
set my_File to ((path to desktop folder) & the_name & ".scpt" as text)
>
copy (result as string) to my_File
>
save window 1 in file my_File
>
select insertion point before (contents of window 1)
>
end tell
>
>
--end script
Excellent. Similarly with Smile:
-- start script (untested)
open "HD:blah blah"
set x to (get text of result as styled text)
make new text window
set text of window 1 to x
set the_name to (name of window 1) as text
set my_File to ((path to desktop folder) & the_name & ".scpt" as text)
copy (result as string) to my_File
save window 1 in file my_File
-- end script
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.