• 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
When a String is not equal to a String
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

When a String is not equal to a String


  • Subject: When a String is not equal to a String
  • From: Dana McDonald <email@hidden>
  • Date: Mon, 15 Apr 2002 17:16:43 -0400

I've been re-writing a large script for Cumulus when they redid their entire
applescript access structure from version 3 to version 5.x.

Anyway, this now happens and I'm not sure why.

I retrieve a file name in cumulus and put it in Str1.
I retrieve a file name from the finder and put it in Str2.

Ok, these two file names (strings) are exactly the same.
BUT when I do:

if str1 is equal to str2 then "do this"
"do this" never gets run. BUT:

if (str1 as string) is equal to (str2 as string) then "do this"

That works...
This is the same thing for numbers also and/or a list of strings.

Am I going to have to do a string coercion every time I check equality?

Just Curious

Using Applescript 1.6 & Facespan 3.5.2 OS 9.2.1

Dana McDonald
Myrtle Beach, SC
_______________________________________________
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: When a String is not equal to a String
      • From: JollyRoger <email@hidden>
    • Re: When a String is not equal to a String
      • From: John W Baxter <email@hidden>
    • Re: When a String is not equal to a String
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Applescript configurable GUI?
  • Next by Date: Re: Making files
  • Previous by thread: Can I log out with AS in OS X
  • Next by thread: Re: When a String is not equal to a String
  • Index(es):
    • Date
    • Thread