- Timestamp:
- Dec 4, 2009 5:11:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expgui
- Property rcs:date changed from 2003/12/05 13:00:13 to 2003/12/05 18:56:47
- Property rcs:lines changed from +39 -2 to +16 -3
- Property rcs:rev changed from 1.66 to 1.67
r760 r761 612 612 # create a local script directory, if it does not exist 613 613 if {![file exists ~/Library/Scripts]} {file mkdir ~/Library/Scripts} 614 set tmpfile [file nativename ~/tmpscriptfile] 615 set startdir [tk_chooseDirectory -initialdir [pwd] -mustexist 1 \ 616 -title "Choose GSAS starting directory"] 617 if {$startdir == ""} {set startdir "~"} 614 618 set dir [file nativename ~/Library/Scripts] 615 set file [tk_getSaveFile -initialdir $dir -initialfile EXPGUI.scpt] 616 set tmpfile [file nativename ~/tmpscriptfile] 619 if {[set xterm [auto_execok xterm]] == ""} { 620 MyMessageBox -parent . -title "xterm not found " \ 621 -message "The AppleScript could not be created because the X11 xterm application was not found. Please correct your path and try again." \ 622 -icon "error" -type Sorry -default sorry 623 # -helplink "expguierr.html Customizewarning" 624 return 625 } 626 set file [tk_getSaveFile -initialdir $dir -initialfile EXPGUI.scpt \ 627 -title "Choose location to save script"] 628 set path {$PATH:} 629 append path [file dirname $xterm] 617 630 set fp [open $tmpfile w] 618 631 # the applescript starts here … … 621 634 puts $fp { launch application "X11"} 622 635 puts $fp { end tell} 623 puts $fp " set results to do shell script \"cd ~; DISPLAY=:0.0; export DISPLAY;$wishshell $expgui(script) > /dev/null 2>&1 &\""636 puts $fp " set results to do shell script \"cd $startdir; DISPLAY=:0.0 PATH=$path $wishshell $expgui(script) > /dev/null 2>&1 &\"" 624 637 puts $fp {end run} 625 638 # someday, perhaps we can get drag & drop to work
Note: See TracChangeset
for help on using the changeset viewer.