• 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
switching user using apple script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

switching user using apple script


  • Subject: switching user using apple script
  • From: chinni <email@hidden>
  • Date: Thu, 22 Nov 2007 00:33:53 -0700

Hi ,
I am new apple script.I would like to run apple script for fast user switch to another user and wait for 15min and again login back to current user.
The below is the script but how can i pass the other user name and passwd in the script to login and wait for 15min of time and again login back to current user.can any one help me from this


try
    try
        set the_path to (((path to library folder from system domain) as Unicode text) & "CoreServices:Menu Extras:User.menu:Contents:Resources:CGSession ")
        set the_path to quoted form of POSIX path of the_path
        set the_arguments to " -suspend"
        do shell script the_path & the_arguments
    end try
    delay 2
    try
        do shell script "pmset force -a hibernatemode 1"
        ignoring application responses
            --tell application "System Events" to sleep
        end ignoring
    end try
end try



Thanx in advance

--
Cheers,
M.Srikanth Kumar,
Phone no: +91-9866774007
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: switching user using apple script
      • From: chinni <email@hidden>
  • Prev by Date: Timed loop
  • Next by Date: Re: Timed loop
  • Previous by thread: Re: Timed loop
  • Next by thread: Re: switching user using apple script
  • Index(es):
    • Date
    • Thread