Trying to familiarize with Applescript syntax. I am attempting to get the count of characters in a string and return the result to a variable.
This seems to work just fine if I perform the count in the Applescript using a literal string but having a problem when attempting to pass the string as a variable. It always returns 0 so I know I'm doing something wrong here just not certain what.
Within the script I've tried counting all possible permutations of the variable but hitting a blocker.
I'm sure the answer is pretty simple and I "think" I'm not that far off.
The method you’re using to get the variable into your script works for global variables. Since you’re using a local variable you need to use the slightly different method shown in the KM wiki here AppleScript [Keyboard Maestro Wiki]
Not having much luck trying to implement the logic for using Local variables inside the script and returning the result even after using the examples but admittedly I have zero experience working with AS.
Could the posted macro be modified with the appropriate way this should be done as an example? I'd likely have a better understanding of how this should work.