help with remote scripting

I need to be able to find the current app of a remote machine and insert the name of that app into a textedit doc on the machine that is using the remote script

pleasse help

The following script will get the name of the frontmost application on a remote Mac OS X machine:


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

It should be easy to log the front app from here (although I’d recommend writing it to a log file rather than relying on editing a TextEdit document.

If the remote Mac is running OS 9.x you’ll need to target the Finder rather than System Events.