Changeset 763


Ignore:
Timestamp:
Dec 4, 2009 5:11:36 PM (11 years ago)
Author:
toby
Message:

# on 2003/12/16 18:02:53, toby did:
add droplet capability to AppleScript

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expgui

    • Property rcs:date changed from 2003/12/05 18:56:47 to 2003/12/16 18:02:53
    • Property rcs:lines changed from +16 -3 to +14 -9
    • Property rcs:rev changed from 1.67 to 1.68
    r761 r763  
    636636    puts $fp "  set results to do shell script \"cd $startdir; DISPLAY=:0.0 PATH=$path $wishshell $expgui(script)  > /dev/null 2>&1 &\""
    637637    puts $fp {end run}
    638     # someday, perhaps we can get drag & drop to work
    639     #puts $fp {on open}
    640     #puts $fp {  -- need to get file name and incorporate into command line}
    641     #puts $fp {end open}
     638    # drag & drop
     639    puts $fp {on open these_files}
     640    puts $fp {  tell application "Finder"}
     641    puts $fp {     launch application "X11"}
     642    puts $fp {   end tell}
     643    puts $fp {  repeat with this_file in these_files}
     644    puts $fp "  set results to do shell script \"cd $startdir; DISPLAY=:0.0 PATH=$path $wishshell $expgui(script) \" & the quoted form of the POSIX path of this_file & \" > /dev/null 2>&1 &\""
     645    puts $fp {  end repeat}
     646    puts $fp {end open}
    642647    close $fp
    643648    if {[catch {
     
    646651        MyMessageBox -parent . -title "AppleScript created" \
    647652            -message "Script $file created & compiled. You may wish to use the Script Editor to save this as an application" \
    648             -icon "info" -type OK -default ok
    649 #           -helplink "expguierr.html Customizewarning"
     653            -icon "info" -type OK -default ok \
     654            -helplink "osx.html CompileAppleScript"
    650655    } errmsg]} {
    651656        MyMessageBox -parent . -title "AppleScript warning" \
    652         -message "An error occurred while atempting to create the script. Details:\n$errmsg"\
     657        -message "An error occurred while attempting to create the script. Please report this bug, including these details:\n$errmsg"\
    653658            -icon warning -type Ignore -default ignore
    654659#       -helplink "expguierr.html Customizewarning"
Note: See TracChangeset for help on using the changeset viewer.