• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bizarre "can't get class <<bhit>>" error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bizarre "can't get class <<bhit>>" error


  • Subject: Bizarre "can't get class <<bhit>>" error
  • From: Rob Lewis <email@hidden>
  • Date: Mon, 19 Nov 2007 21:34:59 -0800

Code for a droplet: 

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


If I drag a file onto the icon, I get this error message: 
Can't get class <<bhit>> of "the text I entered in the dialog"

If I comment out the section between the dashed lines, the script works. 
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?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Bizarre "can't get class <<bhit>>" error
      • From: Brett Conlon <email@hidden>
  • Prev by Date: Re: Applescript schedulers
  • Next by Date: Re: Applescript schedulers
  • Previous by thread: Re: simple problem?
  • Next by thread: Re: Bizarre "can't get class <<bhit>>" error
  • Index(es):
    • Date
    • Thread