View Full Version : translating a 4.0 script... String.CountDelimitedStrings
sferguson
11-10-2003, 07:37 AM
Hi gang,
I'm attempting to recreate a sample project which TJ_Tigger
recently helped me find, and which Worm was ever so generous to originate and share.
How might the following translate in 5.0?
4.0 script:
//Get the number of files that match the search
%NumFiles% = String.CountDelimitedStrings ("%Files%", ";;")
5.0 script:
?
TJ_Tigger
11-10-2003, 08:45 AM
In AMS5 you will be using the Files.Find function but the information returned is no longer in a delimited string but a table. So now you can use the Table.Count action to count the number of files that were found. The Picture Viewer app that I posted in another thread does that.
sferguson
11-10-2003, 09:29 AM
AWESOME.
Thanks!
Now that you bring it to my attention, I feel like the character in that 1980's commercial for tomato juice - "Wow, I should've had a V8!" :o
I just spent yesterday morning speed-reading over the stuff about tables in the Scripting Guide for AMS 5. However, since a good portion of the hands-on script writing work is new territory for me, I'm cruising up the AMS power-curve at a 90% angle on a project that has built-up some significant internal momentum.
(There's nothin quite like a good old baptism by fire when introducing yourself to a new app or dev environment.)
Anyway, thanks again. I'm looking forward to "sharing-the-love" ASAP, when I can bring more brainstorms/suggestions than green-stick questions to the table.
Best,
-Scott
P.S. AMS has some of the lightest, easiest to read, most applicable and insightful user guides and documentation I have ever come accross. Three cheers for the documentation team (and this forum, of course) for great work, and probably the most practicle form of marketing on the planet!
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.