osascript problems
osascript problems
- Subject: osascript problems
- From: "Philip T. Gonia" <email@hidden>
- Date: Fri, 3 Jan 2003 14:15:14 -0800
Any MAC OS X (Unix) and Applescript guru's out there?
I am trying to use osascript in a bash shell to get input from a user.
The bash script is as follows:
#! /bin/bash
CVSROOT=`osascript getCVSRootDirectory.applescript`
echo CVSROOT
The applescript is as follows:
display dialog "Location of CVS root repository." default answer "Enter
your CVS root directory here."
set cvsRoot to (text returned of result)
return cvsRoot
With both scripts located in the same directory and permissions set to
755 (rwxr-xr-x) for both files I ran the bash script in terminal
with the following command.
./getCVSRepository
(The name I gave to the bash script.)
What I am seeing is that the dialog is displayed with the default text
hi-lighted as you would expect. But when typing into the dialog the
default text or text field is not updated. Also while typing into the
dialog the input typed is echoed right out to the terminal window.
Selecting the "OK" button will not close the dialog either. You have to
use control-c to terminate the script. (WARNING -- If you run this bash
script in the background by using the "&" char. you will have to use
the kill command twice. Once to kill off the applescript process and
once to kill off the dialog or child process.)
What I am wishing to do is to create a ProjectBuilder User Script that
extends the CVS features for PB. This combination of PB user scripting
with standard unix tools and applescript is very powerful. My hopes are
that someone on this list can help explain what is going on with this.
Philip Gonia
------------------
email@hidden
------------------
Will Rogers;
"On account of being a democracy and run by the people, we are the only
nation in the world that has to keep a government four years, no matter
what it does."
------------------
_______________________________________________
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.