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

Re: newbie tries to define variables


  • Subject: Re: newbie tries to define variables
  • From: Emmanuel <email@hidden>
  • Date: Wed, 2 Oct 2002 17:44:44 +0200

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.

on open theFolder
set old_delimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"

Looks like you're not aware of what parameter is passed to open. When you drop two folders onto the applet, "theFolder" is a list of (two) file references. Whence the mess when you make that into a string and then parse it.

Also, something else you may want to know: "item (nitem-1)" is "item -2".

Should help.
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.

References: 
 >newbie tries to define variables (From: Rick Norman <email@hidden>)

  • Prev by Date: Re: Regex on OS X
  • Next by Date: Re: Regex on OS X
  • Previous by thread: newbie tries to define variables
  • Next by thread: Re: newbie tries to define variables
  • Index(es):
    • Date
    • Thread