New Problem...
If I run script from within ANY tell block, if fails.
on fnd(findStr, dataSource, caseSensitive, allOccurrences, stringResult)
try
set findResult to find text findStr in dataSource ¬
case sensitive caseSensitive ¬
all occurrences allOccurrences ¬
string result stringResult ¬
with regexp
return findResult
on error
return false
end try
end fnd
------------------------------------------------------------------------------------------------
-- tell application "Smile" -- fails
-- tell application "Finder" -- fails
-- tell window 1 to tell its list view options -- fails
tell application "Finder" to tell window 1 to tell its list view options -- fails
set maxName to "Broadband2Go - 3G Mobile Broadband Service | Virgin Mobile"
set foundString to fnd("[A-Zm0-9\\s]", maxName, true, true, true)
set stringCount to length of foundString
end tell
Robert Poland - Fort Collins, CO