• 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
Applescript newbie questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Applescript newbie questions


  • Subject: Applescript newbie questions
  • From: Lui <email@hidden>
  • Date: Wed, 19 Jun 2002 18:11:56 -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.

  • Prev by Date: Why does this crash in 9.2.2?
  • Next by Date: Question: Setting up a script to watch a folder in OS X?
  • Previous by thread: Applescript newbie questions
  • Next by thread: Question: Setting up a script to watch a folder in OS X?
  • Index(es):
    • Date
    • Thread