[X-Unix] Script monitoring

FFrassy ff.listes at cote-ouest.net
Tue Aug 16 13:48:31 PDT 2005


Hi, maybee some of you are good at applescript so with 1028 i use the script
below to monitor fmpro and relauch it, going to tiger it seems that i have a
problem with the shell script kill fmpro, I have to force quit the app and
the script relaunch correctly and i would like to sleep ;-)
Idea ?
Thanks
FF

on idle
    tell application "URL Access Scripting"
        try
            download "http://127.0.0.1:1080/testfile.html" to file
"emeraude:Users:ff:Desktop:testfile.html" replacing yes
        on error
            try
                do shell script "sudo kill  `ps -auxww | grep FileMaker |
grep -v grep | awk '{print $2}'`" password "mypassword" with administrator
privileges
            end try
            tell application "FileMaker Pro"
                activate
                open file "emeraude:Users:ff:Desktop:FMP:_launch.fp5"
            end tell
            set fichiernom to "emeraude:Users:ff:Desktop:redémarrage FMPro"
            download "http://127.0.0.1:1080/testfile.html" to file
fichiernom
        end try
    end tell
    return 30
end idle



More information about the X-Unix mailing list