• 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
newbie tries to define variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

newbie tries to define variables


  • Subject: newbie tries to define variables
  • From: Rick Norman <email@hidden>
  • Date: Wed, 02 Oct 2002 09:51:43 -0500

What I'm trying to achieve with the following is to be able to drop multiple
folders onto an applet and have each one processed using parts of the name
of the folder. The folders are named in this manner "02personsnameaddress",
"03personsnameaddress" and so on. What is wrong here is that if I drop these
two folders onto this applet "theName" will match "03personsnameaddress",
"recNum" will match "03personsnameaddress", "theFolder" will match
"03personsnameaddress" but "a_folder" will match "02personsnameaddress". How
do I have all these variables identify with the same folder? Also, maybe of
some importance, Mac OS 9.1 and AS 1.5.5.
Thanks in advance for your help,
Rick Norman

on open theFolder
set old_delimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
set n_items to the number of text items in (theFolder as string)
set theName to text item (n_items - 1) in (theFolder as string)
set AppleScript's text item delimiters to old_delimiters
set recNum to text 1 thru 2 of theName as integer
repeat with a_folder in theFolder
display dialog "theName" & "-" & theName
display dialog "recNum" & "-" & recNum
display dialog "theFolder" & "-" & theFolder
display dialog "a_folder" & "-" & a_folder
end repeat
end open
_______________________________________________
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.

  • Follow-Ups:
    • Re: newbie tries to define variables
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Regex on OS X
  • Next by Date: Re: [OT] BBC (was Re: Lookalikes...)
  • Previous by thread: Re: [OT] BBC (was Re: Lookalikes...)
  • Next by thread: Re: newbie tries to define variables
  • Index(es):
    • Date
    • Thread