On Dec 10, 2011, at 7:23 PM, Perkins, Bradley D wrote:

> The shell command 'sudo killall 4D' will kill 4D  but I can only get this to 
> work if run from the command line as a privileged user. If I try to run a PHP 
> script that executes that it doesn't have the privileges to run 'killall'.

Since you're running  OS X, have you tried AppleScript?

        tell application "System Events"
                tell application process "4th Dimension"
                        set frontmost to true
                end tell
                -- send the keystrokes
                keystroke "q" using {command down}
                delay 3
                set app4d to every application process whose name contains "4th 
Dimension"
                if app4d is not {} then
                        tell application process "4th Dimension"
                                set frontmost to true
                        end tell
                        keystroke "q" using {command down}
                end if
        end tell

I've used an applescript application containing the above code to restart 4d 
occasionally.

You can also do shell commands to do the kill all. I just don't know if you can 
launch a script applications form php. I know you can from launchd. It should 
run with the same privileges as the 4d process, if not I've seen authentication 
stuff in scripts.

Steve Alex

_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/

Reply via email to