• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Help in creating a Start Up item in Panther
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help in creating a Start Up item in Panther


  • Subject: Re: Help in creating a Start Up item in Panther
  • From: Bernardo Hoehl <email@hidden>
  • Date: Wed, 11 May 2005 13:39:48 -0300

Thanks Mathew for replying,

Please read my comments.


On 11 May, 2005, at 12:09 PM, Matthew Smith wrote:

For this to be effective the AppleScript application has to be running under the same user as the logged in user, otherwise when it tries to communicate with System Events it won’t be able to find the same running instance of it as the logged in user. You can see this when using Fast User Switching and logging in with another account. It does not have access to the other running account.

I didn't know that. Thanks.

If you want to run it under the same login as the user you will also find the user will have privilege to terminate the AppleScript application, hence defeating the reason you want this. You also have not considered the other applications that can access the MSN Messenger service, for example Proteus and Adium.

I am dealing with young brazilian men (age 18 - 25) from a humble background. They wouldn't know how to kill an app that is not shown in the Dock.


A better way to implement this is to write it totally as a shell script that runs under root, identifying the unix processes and killing them. However perhaps you should be asking (somewhere else) what is the best way of stopping staff from using MSN Messenger and Limewire. You might find a better solution than the one you decided.

I guess you are right. The point is for a long time I wanted to learn how to launch my applescript apps before the user login, and so far have not been able to. What services are required for an AppleScript app to run?

Why do you allow them to access MSN Messenger and Limewire outside the work hours? A simpler solution would be to not allow access at any time when on the company network.

These young men don't have an Internet Connection at home, most don't even own a computer capable of surfing the internet, I let them stay at my company after works hours and use our computers. I think it is educating. But downloading songs or using MSN at work hours shouldn't be allowed. Do you understand what I mean?



--
Matthew Smith


From: Bernardo Hoehl <email@hidden>
Date: Wed, 11 May 2005 11:31:35 -0300
To: Applescript_list <email@hidden>
Subject: Help in creating a Start Up item in Panther

Hi List,

I have an applescript saved as an application that I want to have it running before the users log in.

I am trying to follow up this article from developer.apple.com:

http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/StartupItems.html

I need some help with the shell script executable, which I guess should look so:

+++++++++++++ shell script begins... ++++++++++++++

#!/bin/sh

. /etc/rc.common

open /Library/Scripts/MyScriptsFolder/NameofMyScript.app

++++++++++++++ shell script ends ++++++++++++++++

Is this correct?

In the StartUpParameters.plist file I have no clue what to include in the "Provides", "Requires" and "Uses" parameters...

At the bottom of this message you will find the applescript application, just in case you wonder.

( I am trying to prohibit users from using MSN messenger and Limewire during working hours)

I used Drop Script Backgrounder to hide the app's icon from appearing in the Dock...

Thank you for your kind attention,


Bernardo Höhl
Rio de Janeiro - Brazil

on idle
    repeat while true
        tell application "System Events"
            if name of every process contains "MSN Messenger Daemon" or name of every process contains "Limewire" then
                if time of (current date) > 28800 and time of (current date) < 64080 then -- from 08:00 to 17:48
                    if time of (current date) > 46800 and time of (current date) < 50400 then -- from 13:00 to 14:00
                        --do nothing, lunch time
                    else
                        try
                            tell application "MSN Messenger" to quit
                            tell application "LimeWire" to quit
                        end try
                    end if
                end if
            end if
        end tell
        return 20
    end repeat
     
end idle
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Help in creating a Start Up item in Panther (From: Matthew Smith <email@hidden>)

  • Prev by Date: Re: Non-character keystrokes
  • Next by Date: Re: Shortcut keys
  • Previous by thread: Re: Help in creating a Start Up item in Panther
  • Next by thread: Re: Help in creating a Start Up item in Panther
  • Index(es):
    • Date
    • Thread