Okay, I think I found a strange little bug. I'm doing a little text manipulation trying to decipher the hour and minute of a string such as "2:04". Take a look at the following script:
Set Text [at_word] to '2:04'
Set Text [at_look for] to ':'
Set integer [at_txtPos] value to 0
Set Text [at_position] to '{TXTPOS:at_look for:at_word:at_txtPos}'
Write 'at_position = "{TXT:at_position}"' to log
Set Text [at_hour] to '{EXP:SUBSTRING('{TXT:at_word}', 1, {TXT:at_position})}'
Set Text [at_minute] to '{EXP:SUBSTRING('{TXT:at_word}', {TXT:at_position} + 2, 2)}'
Write 'Hour is "{TXT:at_hour}". Minute is "{TXT:at_minute}".' to log
When you run this script, it outputs the hour and minute to the event log. However, it evaluate the minute as "4" instead of "04". This is not a mistake in the text manipulating itself. For example if you use a time such as "2:34", then the minute will evaluate correctly as "34". It APPEARS that when the text variable is assigned by the expression, the expression is seeing it as a number, and dropping the 0. Try it yourself, and see what you think.