Hi all,
I have looked everywhere but can’t seem to find out how to pass a variable from one script to another script on a remote machine.
What I want to do is:-
pass a set of instructions from one script - on local machine (in variables) to another script on a remote server on my network (via eppc://ipnumber) this then queries an sql database via SQL Grinder, I then want to send a dialog back to the original machine that sent the request.
The only way I can think of to do this is by getting the ip address on the local machine - send this to the remote script as a variable (along with the query) to enable the remote script to send a dialog back as a reply.
I need this to work on OS9 as well or would try to use shell script to do this, does anyone have any ideas please?
thanks in advance to anyone that can help me :lol:
if your local script is telling a remote script to run a routine, the local script will actually wait on a response by default. So all you have to do is package up the information from your remote script, say in a variable called “myInfo”. Then do a “return myInfo” at the end of the remote routine. This info will be passed back into your local script.
Some caveats:
I have tried this on OS 9, and never had much luck. Never seemed very stable. I am using it in OSX, and it works very well.
You probably don’t want your local script waiting on your remote script to respond. Just sounds a bit prone to problems. Instead, you could have the remote set a “busy” flag in itself, and store the information. The local script could occasionaly poll the remote script to find out when it is done, and retrieve the stored information from the remote machine when it was ready. I actually use a combination of master (local) scripts, and 2 remote scripts, messenger and slave. I use the messenger script as a go-between for the master and slave. In order to not wait for a remote script to answer, it is important to use the “ignoring application responses”.
There are many options for doing this. But I think all of them have limitations and strengths. You will just have to look for a good combination.