Re: Changing a list to path
Re: Changing a list to path
- Subject: Re: Changing a list to path
- From: Mark Lively <email@hidden>
- Date: Mon, 30 Jan 2006 16:40:59 -0500
On 1/30/06, Steven Valenti <email@hidden> wrote:
> Is there a command that will insert the ":" between the items in your
> list or is the only way to make a repeat loop?
> Thanks
>
>
>
> set PathToFolder to "Macintosh
> HD:Users:username:Desktop:JobsToDo:TestJob"
> set AppleScript's text item delimiters to ":"
> set ListPath to text items of PathToFolder
> set NewPathToFolder to (items 1 thru 4 of ListPath) & "JobsDone" &
> (item 6 of ListPath)
>
> set PathToFolder to ""
> repeat with i in NewPathToFolder
> set PathToFolder to PathToFolder & i & ":"
> end repeat
>
>
Same way you got there.
set foo to "a:b:c"
set tid to applescript's text item delimiters
set applescript's text item delimiters to ":"
set foo to every text item of foo
log foo
set foo to foo as text
set applescript's text item delimiters to tid
-Mark
Antisymmetric Intransigence
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden