[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] How? AppleEvents to remote app? (Solution!)



Okay, here's some more info regarding my further explorations into sending AppleEvents from MacPerl to applications running remotely without user interaction:

I found two osaxen in Greg Quinn's "GTQScriptingLibrary1.2" called "Login As" and "Logout" which allow an AppleScript to manually create a session with the remote machine and later dispose of that session.

Now, in the script editor I can enter:

  set refInfo to (login as "Les R Titze" password "flugelboop")
  set remoteFMP to application "FileMaker Pro" of machine "Database G3"
  tell remoteFMP
	   doscript "Import_Records"
  end tell
  logout refInfo

This works 100% from the Run button in the script editor and also works 100% when the same applescript is saved as an application. Beautiful!

To do the equivalent in MacPerl,

#perl -w
my $tScript = <<REMOTE_FMP_DO_SCRIPT;
set refInfo to (login as "Les R Titze" password "flugelboop")
tell application "FileMaker Pro" of machine "Database G3"
 doscript "Import_Records"
end tell
logout refInfo
REMOTE_FMP_DO_SCRIPT

MacPerl::DoAppleScript($tScript);
__END__


I'm still interested in hearing whether there's a way to accomplish this without the use of an osax, but for now my panic has subsided.

BTW:
I located the OSAX library by searching at <http://cgi.scriptweb.com/osaxen/>

The entire library file "GTQLib1.2.as.sit.hqx" is at:
<ftp://mirror.apple.com/mirrors/gaea.scriptweb.com/applescript/osaxen/>




***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch