on open the_file
display dialog "Prompt text here " & the_file default answer "" with icon note buttons ["Cancel", "Tag", "Tag & OCR"] default button "Tag"
set tag_string to text returned of result
-------------------------------------------------------------------------
if button returned of result is "Cancel" then
return
else if button returned of result is "Tag" then
set do_OCR to false
else
set do_OCR to true
end if
--------------------------------------------------------------------------
tell application "Finder"
set the_comment to get comment of (the_file as alias)
set comment of (the_file as alias) to the_comment & " " & tag_string
end tell
…
return
end open
So tell me how the code to process the button returned can change the text returned (stored in variable tag_string) into something that AppleScript can't get class <<bhit>> of. WTF?