• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Questions from Newbie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions from Newbie


  • Subject: Re: Questions from Newbie
  • From: "Arthur J Knapp" <email@hidden>
  • Date: Wed, 28 Feb 2001 15:05:00 -0500

> Date: Wed, 28 Feb 2001 09:20:57 -0800
> Subject: Re: Questions from Newbie

Why do newbies think that it is a good idea to say something
like "help, question, etc... from Newbie". A subject line should
always be descriptive of the subject, and not of the person
sending the post.

The ironic thing is that newbies learn this habit from other
newbies, appearently unaware that saying "newbie" in the
subject line is THE most newbie thing one can do. ;-)


>> Also, I'd appreciate tips on how to parse the "item_comments" properly. All
>> I want it to do is take the right 36 characters, and then the left 32
>> characters. In VBScript (ugh) it would be something as simple as this:
>> item_comments = left(right(item_comments,36),32)

> From: Paul Berkowitz <email@hidden>
> Well, that part is even easier in AppleScript:
>
> set item_comments to text -36 thru -5 of item_comments

Right. :)

There is nothing to stop someone from implementing VBScript-like
commands in AppleScript if they are more familiar with them:

-- AppleScript won't accept "left" or "right" as handler names

on s_left(str, x)
try
return text 1 thru x of str
on error
return str
end try
end s_left

on s_right(str, x)
try
return text -x thru -1 of str
on error
return str
end try
end s_right

-- 40 characters
--
set item_comments to "123456789 123456789 123456789 123456789 "

set item_comments to s_left(s_right(item_comments, 36), 32)

-- > "56789 123456789 123456789 123456"


Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden

Hey, check out:
http://www.LateNightSW.com


  • Follow-Ups:
    • Re: Subject title censorship (was Questions from Newbie)
      • From: Dale Saukerson <email@hidden>
  • Prev by Date: Re: global variable not being recognized by script object su
  • Next by Date: RE: Error code to text ?
  • Previous by thread: Re: Questions from Newbie
  • Next by thread: Re: Subject title censorship (was Questions from Newbie)
  • Index(es):
    • Date
    • Thread