• 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
Re: List of aliases contains alias
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List of aliases contains alias


  • Subject: Re: List of aliases contains alias
  • From: Jim Skibbie <email@hidden>
  • Date: Fri, 11 May 2012 20:51:27 +0000
  • Thread-topic: List of aliases contains alias

On 5/11/12 12:59 PM, "Mark Alldritt" <email@hidden> wrote:


>There are two issues within Script Debugger.
>
>1) How bookmark values are displayed.  Script Debugger relies on
>AppleScript to 'display' the list of values passed to the open handler,
>and AppleScript presents the values as aliases when in fact they are
>bookmarks.  This is happening behind Script Debugger's back and is
>unfortunate.  The only way to see the truth within Script Debugger is to
>switch its viewers to AEPrint mode which bypasses AppleScript.
>
>2) How 'on open' events are simulated within Script Debugger.  Script
>Debugger 4 generates alias for files dropped onto a script window.  This
>causes scripts to behave differently when 'on open' events are simulated
>in this way.  To get bookmarks, you must drop files onto your applet's
>Finder or Dock icon.  This causes an external debugging session to begin,
>and bookmarks will be passed to Script Debugger by the Finder.  For the
>upcoming Script Debugger 5 release the 'on open' event simulators
>correctly generate bookmarks.
>
>Cheers
>-Mark

Can you explain the steps needed to perform option #2 above in Script
Debugger 4.5 (I'm on OS X 10.6.8? This is what I did:

1. Made the script below with the 'on open' handler:

on open DroppedFiles
  set x to "Macintosh HD:Users:jim:Desktop:GraphicElements.pdf"
  try
    set x to x as alias
    display dialog ((DroppedFiles does not contain x) as string)
  end try
end open

2. Saved this as an application .app file (with debug mode turned on) and
left the file open in Script Debugger.
3. I dragged and dropped a file onto this application's icon on the
desktop.

I get an error: "Could not run this script because of a program error
-1762".


I get this whether or not the Script Debugger app is running and the
window with this script is open. If the script is saved without the debug
mode, then it just runs like it was saved out of Applescript Editor.

I'm unclear how I can simulate the on open handler short of dropping a
file onto the script window in Script Debugger.

Thanks.
Jim



 _______________________________________________
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: List of aliases contains alias
      • From: Mark Alldritt <email@hidden>
References: 
 >Re: List of aliases contains alias (From: Mark Alldritt <email@hidden>)

  • Prev by Date: Re: List of aliases contains alias
  • Next by Date: Re: List of aliases contains alias
  • Previous by thread: Re: List of aliases contains alias
  • Next by thread: Re: List of aliases contains alias
  • Index(es):
    • Date
    • Thread