Applescript newbie questions
Applescript newbie questions
- Subject: Applescript newbie questions
- From: Lui <email@hidden>
- Date: Wed, 19 Jun 2002 19:11:09 -0700 (PDT)
Newbie questions... Please refer to the following
script. I am basically trying to pass parameters from
a FileMaker Pro layout into a java program and taking
the results from the java program to update the
FileMaker Pro data base. I would appreciate your help
and/or point me to your favorite tutorials.
Thank you in advance,
Sharon
Questions:
1. How do I pass fields entered on the FileMaker Pro
layout as parameters into my java program? I am using
a dialog box in my script as a work-around for now.
How do I put two fields on the same dialog box?
2. How do I make the Applescript wait for the java
program to finish first before displaying the result
dialog box?
3. How do I update the database with the result?
Applescript:
-- ask for input
set _fieldA to "AAA"
set _fieldB to "BBB"
set _result to " "
repeat
try
display dialog "Update" & return & return & "Enter
field A : " default answer _fieldA
set _fieldA to the text returned of the result
display dialog "Update" & return & return & "Enter
field B: " default answer _fieldB
set _fieldB to the text returned of the result
exit repeat
on error number error_number
if error_number is -128 then error number -128
beep
end try
end repeat
-- call the java pgm
ignoring application responses
tell application "Terminal"
activate
do script with command "cd /Users/sharon/java; java
-classpath .:/Users/sharon/jar/mail.jar test.java" &
_fieldA & " " & _fieldB & " " & _result
end tell
end ignoring
- - display the result
set the response_text to "Display Result" & the
_result
display dialog reponse_text buttons {"OK"} default
button 1
-- update the data base
try
if the text returned of the _result is not " " then
set the confirmation to the text returned of the
_result
end if
end try
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.