Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Converting a list into an Applescript list

Featured Replies

Alright,

I have an applescript that I want to search for and make changes to a dynamic list of files. The list itself is generated by filemaker, in the following format:

"Item A

Item B

Item C

Item D"

Now, what I need, is to convert this into a list object in Applescript. That is, I need to be able to, for example, say Open Item 1 of List X. Is there anyway to parse a carriage return delimited list to a list in Applescript? I tried converting it into a string formatted like the string versions of applescript lists:

{"Item 1","Item 2","Item 3"}

and then just saying get cell as list, but this just returns a list with one item, that is the string displayed above.

Thoughts? Is there an easier way to have applescript refer to individual elements of the list than making it into an applescript list object? I could theoretically have the script talk to filemaker every time it needs the next list item, but that would be Mucho Slow!

Thanks!

try

set theText to "Item A

Item B

Item C

Item D"

set oldDelim to AppleScript's text item delimiters

set AppleScript's text item delimiters to return

set theList to text items of theText

set AppleScript's text item delimiters to oldDelim

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.