• 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
do shell script vs. do script with command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

do shell script vs. do script with command


  • Subject: do shell script vs. do script with command
  • From: "EU - Luca Pozzato" <email@hidden>
  • Date: Sun, 10 Feb 2008 18:46:37 +0100

Hi everyboby,
I’m struggling tryng working with ujac (http://ujac.sourceforge.net/) – by the way I’m not a java
expert, but since I was able
to achieve some results with applescript and iText pdf library (http://www.lowagie.com/iText/),
I decide to try ujac components
in order to transform Xml to Pdf.

So far I’m able to produce a viable result thru the terminal or calling the terminal with
applescript,
but for some reason the "do shell script" command does not produce the expected result.

any help will be highly appreciated.
If the conversation will move from applescript to java  (how to properly configure ujac, ect.)
I’ll be interested to continue it privately…

Thanks

Luca

--set up the classpath
set thepath to "/Library/Java/Extensions/"
set ujac_path to thepath & "ujac.jar"
set itext_path to thepath & "iText.jar"
set commons_path to thepath & "commons-logging.jar"


set theclasspath to ujac_path & ":" & itext_path & ":" & commons_path
--------------------------------------


--the string command
set thescript to "java -classpath " & theclasspath & " org.ujac.print.DocumentPrinter
/TEST_001/font-test.xml /TEST_001/font-test.pdf"

---------

----------------------------- test do shell script

--this produce an empty pdf (zero kb)
set mycommand to do shell script thescript




----------------------------- test terminal

--this produce the correct pdf

tell application "Terminal"
	do script with command thescript
end tell



 _______________________________________________
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: do shell script vs. do script with command
      • From: Ed Stockly <email@hidden>
    • Re: do shell script vs. do script with command
      • From: Skeeve <email@hidden>
References: 
 >Re: A date IS a date (From: Jason Bruce <email@hidden>)

  • Prev by Date: Re: PHP and Applescript
  • Next by Date: Re: PHP and Applescript
  • Previous by thread: Re: A date IS a date
  • Next by thread: Re: do shell script vs. do script with command
  • Index(es):
    • Date
    • Thread