Multiple user scripting ...

Hi,

I have a user that is NON-ADMIN and that has no password so that it opens automatically upon startup. I also have a ADMIN user that is password protected. I have an application called «Indigo» in the NON-ADMIN user that controls lignts in my house .

Is it possible by script to control that application from my ADMIN user environnement ?

Thanks in advance.

Robert

Model: iMac G5 1.6 MHZ - 2GB
AppleScript: 1.10.7
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

I would think so, though I don’t know how. There are some Indigo scripts in ScriptBuilders.net for controlling Indigo from a browser.

Hi Robert,

this is possible with Remote Apple Events, which work also on the same machine

It seems to me that you can call the same machine by addressing it’s IP number and the other users id & passw if he’d have remote apple events on in his sharing prefs:


set theMach to ("eppc://username:" & passW & "@" & "192.168.1.23") as string
tell application "Indigo" of machine theMach to activate --etc.

Hi,

Since I was trying to work with Indigo software I was also having a discussion with Indigo’s Site Admin. He says that it works on his machine but it fails on mine. I suspect that it is more of a scripting problem than with Indigo.

If some of you can help, I think that having a look to this thread could help me:

http://www.perceptiveautomation.com/phpBB2/viewtopic.php?p=12504#12504

Hoping a new clue …

Hi Robert,

to control another user on the same machine, your syntax (and the syntax of the Indigo admin) cannot work.
You need the user ID included in the eppc string, user name and password must be the data of your admin account
Try this:

property userName : "Accueil"
property pasword : ""
property remoteID : "503"

set {host name:HostName} to (system info)
set remMachine to "eppc://" & userName & ":" & pasword & "@" & HostName & "/?uid=" & remoteID

using terms from application "Indigo"
	tell application "Indigo" of machine remMachine
			log "hello, does this work?" 
	end tell 
end using terms from

StefanK,

Everything is perfect. I thank you again for your help.

Best regards.

I’m glad to to read this :slight_smile:

Here is a routine to check whether a user is logged in

on check_user_on(remMachine)
	using terms from application "Finder"
		tell application "Finder" of machine remMachine
			try
				desktop as string -- error if user is not logged in
				return true
			on error
				return false
			end try
		end tell
	end using terms from
end check_user_on