How can we use 'keystroke' to automatically log in via UI like "Use SystemEvents in 10.6"

HI everyone,I can use a script as
username="super"
password="mario"
/usr/bin/osascript <<AppleScript
tell application "System Events"
keystroke "$username"
keystroke return
delay 3.0
keystroke "$password"
delay 3.0
keystroke return
end tell
AppleScript
exit 0
to automatically UI log in when I'm in mac 10.6, but now it can't work with Lion,
only got an "execution error:An error of type -10810 has occurred.(-10810)" message
anyone can help? Thanks a lot~~~

some more details in system.log:
Sep  6 14:21:08 mac107_711 com.apple.launchd.peruser.0[427]: Background: Bug: launchd_core_logic.c:10063 (24984):0
Sep  6 14:21:08 mac107_711 com.apple.launchd.peruser.0[427]: Background: This API can only be used by a process running within an Aqua session.
Sep  6 14:21:08 mac107_711 osascript[1200]: spawn_via_launchd() failed, errno=5 label=[0x0-0x62062].com.apple.systemevents path=/System/Library/CoreServices/System Events.app/Contents/MacOS/System Events flags=0

Similar Messages

  • How can I ensure my laptop automatically logs me into my accounts when I visit an website that I have sign up to?

    on previous laptops I could log onto sites with an account system, click the 'remember me' button before logging in and I would be automatically logged in when visiting the site, even if it was a new session. What settings do I need to make this possible?

    "Remember me" options are stored in cookies. Try all the options in the [[websites say cookies are blocked]] article. If you are still having problems then the file that stores cookies could be corrupt and you can try deleting the file.
    # Open the profile folder using the procedure in the [[profiles]] article
    # Close Firefox
    # In the profile folder delete cookies.sqlite
    You should then use a "remember me" option on a site and check if Firefox automatically logs you in on the next visit.

  • How can I turn off the automatic reload/refresh on websites like Drudge Report?

    These sites refresh about every few minutes are this is annoying when I'm in the middle on reading something.

    The Drudge Report site uses a JavaScript timer to reload the page every 3 minutes.
    You can cancel the timer on that website with this bookmarklet.<br />
    <br />
    <pre><nowiki>javascript:clearInterval(timer);void(autoRefresh=null);
    </nowiki></pre>
    * http://en.wikipedia.org/wiki/Bookmarklet
    See this for a Greasemonkey script:
    *http://userscripts.org/scripts/review/13594

  • HT1277 How  can I get my iphoto to send pictures via email?  Used to have it, don't now.

    Had the recent download for Mac OS X that led to iPhoto needing a download and now I can't get the email portion to work to send photos.  I had to change my password for the email account and have changed all the devices to the new password, even for Mail.
    Someone guide me to next steps.
    Thanks.

    Try this first...
    Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when complete, test again.

  • I have a mac pro for work and they made it log on windows at start up.  how can i switch back to Mac as well so i will use the i cloud fetures ?

    I have a mac pro for work and they made it log on windows at start up.  how can i switch back to Mac as well so i will use the i cloud fetures ?

    Is a version of Mac OS running on this Mac? Reboot and hold down the option key.

  • How can i disable imessage from automatically starting up when i turn on macbook air?

    how can i disable imessage from automatically starting up when i turn on macbook air? i dont know my imessages to pop up on my laptop when it turns on. But i dont want to disable imessage totally on my macbook.

    Welcome to the Apple Support Communities
    First of all, check that Messages is closed when you turn off your MacBook. This is so important because, by default, OS X will reopen all opened apps the next time you start your Mac.
    Apart from that, when you go to  > Shut Down, or  > Restart, in the window you see to restart or turn off your MacBook, unmark "Reopen windows when logging back in". This will avoid that your Mac opens all opened apps the next time you start the MacBook, so Messages won't start automatically at startup

  • How can I set a specific user log on neme to a specific machine

    Greeting,
    I have a question : 
    How can I set a specific user log on name to a specific machine.
    e.g. 
    Only User.A can log on to PC.A and the other can not.
    Base On :
    Windows Server 2003
    Active Directory Version : 5.2.3790.1812

    Technically we're both right.  This depends on what scenario you're setting this up.
    1)  If you want to say only this person can log on to this machine, and it's not an enterprise solution (meaning you have a handful of computers you want restricted, not all computers) then do something like Yan Li has recommended.  However, I
    do not recommend using any DENY LOCAL LOGON user rights.  In this case, you would have to deny everyone except 'User A' and your Administrators.  If you put a user in ALLOW LOCAL LOGON and DENY LOCAL LOGON, then DENY wins and no one logs in.  Instead,
    you should remove all the settings from ALLOW LOCAL LOGON and add only User A and administrators.
    2) If this is an enterprise solution, use the LOG ON TO option I mentioned before.  Managing user right assignments per machine is very difficult and isn't a practical way to do it on a large scale.  If every user in your domain is assigned a computer
    that they can use, only that user can use that machine and that machine will effectively only allow that user.  For this to work, EVERY user must be restricted to a workstation, if no setting is present, then that user can log on anywhere.  This
    is my preferred solution still.
    Like I said, it depends on your situation to which route is better.  I hope this helps and is clear and easy to understand.
    - If you have my posts to be helpful, or the answer, please mark them appropriately.  Thank you.
    Chris Ream

  • How can I import all my gmail contacts into iPad? I use iPad mini and the solutions available on the web are not compatible.

    How can I import all my gmail contacts into iPad? I use iPad mini and the solutions available on the web are not compatible.

    Hello and thanks for the answer.
    I meant by "not compatible" that all the solutions that I found on the web did not work, especially the "Microsoft exchange" one.
    Fortunately I found on the comments of the first website you mentioned the right answer for me, which I copy below:
    Tap Settings > Mail, Contacts, Calendars > Add Account > Other > Add CardDav Account.
    Enter the following information in the fields:
    Server: google.com
    User Name: Enter your full Google email address
    Password: Your Google account password
    Select Next at the top of the screen to complete the setup.
    After you have completed the setup, open the Contacts app on your device. Syncing should begin automatically.
    Additional Information
    Note: Make sure that SSL is enabled (under Advanced settings), and that the port is 443.
    If you are using application based special password go to https://accounts.google.com/Se... and instead of your password put that special code and u r done.

  • How can i see a detailed call log

    how can i see a detailed call log including actual numbers on restricted calls

    bobsouthernguy wrote:
    how can i see a detailed call log including actual numbers on restricted calls
    You won't see the numbers if the call came in as restricted...that's the point of a caller blocking their number.
    You can pay for a service like TrapCall that will give you the restricted numbers.  Or you can use a service (free) like DitchMail that gives callers a recording asking them to unblock their number and call back, if the call comes in with the number blocked.  It then hangs up without giving them the opportunity to leave a message.

  • How can I get Firefox to automatically open a new search in a new tab please?

    How can I get Firefox to automatically open a new search in a new tab please? [Without me manually opening the tab]

    For searches from the Search Bar, when you use the Enter key.
    Type '''about:config''' in the URL bar and hit Enter. <br />
    ''If you see the warning, you can confirm that you want to access that page.''
    Pref = '''browser.search.openintab''' = double-click to toggle to '''true'''

  • How can stageWebView  keep another cache as logging into my site through simulator on mac also logs me in safari

    how can stageWebView  keep another cache as logging into my site through simulator on mac also logs me in safari plz help with a solution or alternative??  thanks

    You could install Tab Mix Plus, which offers a Duplicate Tab feature you could use after logging in: this should keep the login state intact while creating the new tab.
    See https://addons.mozilla.org/en-US/firefox/addon/1122

  • I lost my iphone..how can i barr the iphone to stop the 3rd party by using it

    i lost my iphone..how can i barr the iphone to stop the 3rd party by using it..pls help..tQ

    If you have MobileMe setup on your phone yuo can choose to lock it yourself or actually wipe it in addition to displaying a message on screen by logging onto your MobileMe account @ www.mobileme.com

  • How Can I record the user's logging time?

    How Can I record the user's login time?I create a table containing some column such as record_id,username,start_time,end_time,period.How can I create a process on logging in to record the start_time and a process on logging out to record the end_time?
    Thanks for any help.

    you can refer to the name of the currently logged in user using :APP_USER. to capture the login info, i'd add an htmldb process to my app that fired "After Authentication" and simply inserted :APP_USER and sysdate into my logging table. for the logout case, you could change the "Logout URL" of your current authentication scheme to one that does whatever it's currently doing plus the logging. so i Logout URL of...
    wwv_flow_custom_auth_std.logout?p_this_flow=&APP_ID.&p_next_flow_page_sess=&APP_ID.:101:&APP_SESSION.
    ...and i changed it to something like...
    my_schema_name.my_logout?p_user=&APP_USER.&p_app=&APP_ID.&p_session=&APP_SESSION.
    ...where my_logout was...
    create or replace procedure my_logout(
    p_user in varchar2,
    p_app in varchar2,
    p_session in varchar2) as
    begin
    insert into my_logging_table values (sysdate, 'logged out as '||p_user);
    wwv_flow_custom_auth_std.logout (
    p_this_flow => p_app ,
    p_next_flow_page_sess => p_app||':101');
    end;
    ...and things worked fine.
    hope this helps,
    raj

  • How can I make my Introduction_mc automatically disappear after 10 Seconds and load Home_mc?

    Hi,
    How can I make my Introduction_mc automatically disappear after 10 Seconds and load Home_mc (automatically)? I don't want user to change by himself this Introduction page. It should be done automatically.
    What is the procedure and code to achieve it, please?
    Thanks.

    Hi,
    I gues you are using AS2.0, then use setInterval, in AS3.0 user Timer Class.
    AS2.0
    var interval:Number = setInterval(doThis,10000);//in milliseconds
    function doThis():Void{
    //do something;
    AS3.0
    var timer:Timer = new Timer(10000, 1);
    timer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerCompleteHandler, false, 0, true )
    function onTimerCompleteHandler(event:TimerEvent):void{
    //do something;
    For details: http://blogs.adobe.com/pdehaan/2006/07/using_the_timer_class_in_actio.html
    Warm Regards
    Deepanjan Das
    http://deepanjandas.wordpress.com

  • You changed the order of the menu for "Open in a new window" or "Open in new Tab", How can I change it back? Or how can I omit any reference to tabs? I do not use them at all.

    You changed the order of the menu for "Open in a new window" or "Open in new Tab", How can I change it back? Or how can I omit any reference to tabs? I do not use them at all.

    You can use the Menu Editor add-on to rearrange or remove menu items - https://addons.mozilla.org/firefox/addon/menu-editor

Maybe you are looking for

  • CD/DVD reader is not working, please help.

    My cd/dvd reader is not working at all, when I put any cd or dvd on it, the led of the reader starts blinkin but then it stops and nothing happens. I'm using a hp pavilion dv7-1025nr, windows vista 64-bit. Maybe there are some drivers that i should d

  • How do I delete pages from Scrapbook Firefox 3.6.3 on Windows7?

    I cam't delete webpages captured on the Scrapbook. I'm using Firefox 3.6.3 on Windows7. == This happened == Not sure how often == I tried to delete one page on the Scrapbook

  • Took a new photo while in *contact* page; now where is it??

    Today, while inputting a friend's email address, I decided to take a pic to attach to his contact. Normally, I'd take a pic using the Camera app, but since I was already on his contact page, I took it from within the Contacts app, by tapping "add pho

  • Payment Release Workflow for PO invoice

    Hi folks,               Need to develop Payment Release Workflow for PO related invoice which are triggered via MIRO.               Can i use Business object BUS2081 for the purpose ?               WS00400012 is the standard workflow for the same pur

  • Java.lang.IllegalArgumentException: object is not an instance of declaring

    Hi, I have deployed my web project(Jdev 11g) on JBoss 5GA and successful. My project use JDBC connection to Oracle Database 10g and run OK. But I have 1 issue. My issue: While i click pages(all page used databinding get data from DB10g), JBoss log wi