Im making an applescript application at the moment with xcode, the basics of the program is to run remote scripts when i press buttons, so things happens on another mac via remote apple events.

Firstly, can some one please tell me how to link a text field so that it inputs text into the script ?

so say i have a username, password and server text box which i want to input text into the script "eppc://(usernameinsertedhere)password)@(server.local)"

Secondly how do i run shell scripts on remote apples using applescript, i can get it to work just fine locally, with

do shell script "say hello"

but how do i send this as a remote apple event ? I've tried

set remoteFinder to application "Finder" of machine "eppc://username:pass@comp.local"
using terms from application "Finder"
tell remoteFinder
do shell script "say hello"
end tell
end using terms from

but that gives me an error saying 'Finder got an error: "say hello" doesn’t understand the do shell script message.'

i know these are probably really nooby Q's, but can anyone help me please ?