• 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: Today's Question - poke a character in a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Today's Question - poke a character in a string


  • Subject: Re: Today's Question - poke a character in a string
  • From: Andy Wylie <email@hidden>
  • Date: Thu, 01 Aug 2002 20:32:28 +1200

on 8/1/02 5:50 PM +1200: Michael Sullivan wrote:

>> Begin forwarded message:
>>
>> On Wednesday, July 31, 2002, at 02:37 AM, Andy Wylie wrote:
>>
>>> set (MyLongString's text items)'s item 400 to ">"
>
>> set foo to "1234567890"
>> set (foo's text items)'s item 5 to "E"
>> foo
>
>> --> "1234567890"
>
> But oddly enough it works if you do this:
>
> set (MyLongString's text items)'s item 400 to ">"
> set MyLongString to result as string
>
result is ">" here... 8.6/1.3.7

> Or in classic functional fashion:
>
> set foo to (set (foo's text items)'s item 400 to ">") as string
>
no way can I compile a 'double set' like that, only twist its ear until it
coughs...

tell (foo's text items)
set its item 5 to "E"
return it as string
end tell

_____________________________ Andy
_______________________________________________
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: 
 >Re: Today's Question - poke a character in a string (From: email@hidden (Michael Sullivan))

  • Prev by Date: Re: Display dialog + compiled scripts
  • Next by Date: Re: scripting mail
  • Previous by thread: Re: Today's Question - poke a character in a string
  • Next by thread: Re: Today's Question - poke a character in a string
  • Index(es):
    • Date
    • Thread