Talk About Network

Google





Programming > Applescript > Re: Simplificat...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 6 Topic 1647 of 1697
Post > Topic >>

Re: Simplification for Text-apps

by Jo_y <jo_y@[EMAIL PROTECTED] > Jul 27, 2008 at 03:02 AM

Hey, M.

my script is thinked for only use with Text-applications, how
described in the first article of this post (..where purpose is to
save Do***ents of Text-applications with the title as name in front
window of Finder )I've see that Applescripts are always to control or
to adjust after system updates, so the results of my functional script
can be different on better of lower operation systems, it can produce
errors.

>What happens if the frontmost application is not a text application, so
>the do***ent doesn't have any paragraphs?

Ok, you can insert a list of all text-apps where you use, before the

>tell application x

like:
----------------------
set text_apps to {"Script Editor", "TextEdit", "VoodooPad"}--ect.

if x is in text_apps then
tell application x (...)
----------------------

>What happens if there aren't
>any open windows in that application?

Ok, in this case the script tryes to execute the given commands, and
whenever results a error, the entire script stops automatically in the
try-routine.

>    try
>       set p1 to (paragraph 1 of do***ent 1 as text)
>    on error
>       set p1 to (paragraph 1 of window 1 as text)
>    end try

the next step in this script is to discover the default name extension
where uses your activ Textapp, where solves both problems:

>c) the open front do***ent will not recognize the path, it saves a
>copy with all properties -name and contents
>   (is not so im****tant, but not desired)
>d) it adds no default extension to the saved copy

If you have a ideas?
 




 6 Posts in Topic:
Simplification for Text-apps
Jo_y <jo_y@[EMAIL PROT  2008-07-24 15:37:18 
Re: Simplification for Text-apps
Jo_y <jo_y@[EMAIL PROT  2008-07-26 04:35:44 
Private Message
   2008-07-26 11:26:13 
Re: Simplification for Text-apps
Jo_y <jo_y@[EMAIL PROT  2008-07-27 03:02:16 
Re: Simplification for Text-apps
Jo_y <jo_y@[EMAIL PROT  2008-07-29 06:16:21 
Re: Simplification for Text-apps
Jo_y <jo_y@[EMAIL PROT  2008-07-29 11:26:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
localhost-V2008-12-19 Thu Jan 8 12:58:51 PST 2009.