Can you tell me how I’d get results in a format I could use? For example, set urlTest to search text theURL matching pattern “facebook” It gives me the result {{text:“facebook”, offset:12}} which is fine, but what if I wanted to programmatically access the ‘12’ and work with it? I can’t seem to force the result into a string or access item 1 of the result.
Hi Peter - glad to hear you are enjoying the app! A problem some others have run into is trying to use the results of the search outside the scope of the “tell” block that is addressing FastScripts. For example, does this script work for you?
tell application "FastScripts"
set theURL to "https://facebook.com/test"
set urlTest to search text theURL matching pattern "facebook"
offset of item 1 of urlTest
end tell
Does that work for you? If so the key might be to just make sure you either wrap all your management of FastScripts results inside a “tell” block for FastScripts, or wrap your whole script in:
using terms from app "FastScripts"
<your script>
end
Oh, thanks. That is probably the case. It sounds like maybe I should consider revising the dictionary to use more unique names. If I do that I’ll keep the existing names as aliases so that anybody who’s worked around the problem can have their scripts keep working, I think.