December 17, 200916 yr I am working with an external Java app that I have to open and pass parameters to. It works great on windows, but I am having difficulty making it work on Mac. Here is the code for windows Send Event["aevt"; "odoc"; "cmd /d /c java -jar " & Quote ( "C:Documents and SettingsNickLocal SettingsTemp1OEtempDxcUploader.jar" ) & " -file " & Quote ( "C:Documents and SettingsNickLocal SettingsTemp1OEtempdxupload.txt" ) & " -password " & PT_Docs::DX_Pass & " -source EDI -url https://somewebsite.com/dci/upload.svl -username " & PT_Docs::DX_User & " -responsefile " & Quote ( "C:Documents and SettingsNickLocal SettingsTemp1OEtempdxresponse.txt" )] On Mac I have tried Send Event and AppleScript and cannot find a solution. In AppleScript I can get the file to open, but do not know how to pass along the parameters. Any help would be greatly appreciated.
December 19, 200916 yr Learn about the applescript do shell script method: Like this (example only) Perform applescript: set cmd to "java -x 123 -y 74 -f" do shell script cmd Simple real example: Set cmd to "cd /applications; ls" do shell script cmd copy result to cell "Result" of current record
December 21, 200916 yr Author I have figured out how to make the java app launch using "do shell script", but you have to put everything after "do shell script" in quotes and several of my arguments have to be in quotes, see example. do shell script "cd /path/to/folder;java -jar DxcUploader.jar -file "dxupload.txt" -password pass -source EDI -url https://website.com/dci/upload.svl -username user -responsefile "dxresponse.txt"" The java app is failing and I believe it is because of the quotes. Is there any other way to make this work?
Create an account or sign in to comment