Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Knolly

macrumors 6502a
Original poster
Jul 22, 2007
610
0
Okay, sounds incredibly insecure, yes?

YOU BETCHA!

But here's my situation...

I have my Macbook Pro shut and hooked up to my TV which I use to run Plex.

I basically just want to be able to launch Plex and do everything using nothing but the remote... Using Mira I have the Plex part covered, the only problem is that usually if I switch monitors, when I go over to my TV it'll put me at the login screen... So I'll have to waltz on back to my computer in the other room and blindly type in the password hoping I'm in the right text box.

Point being... Would it be possible to write an Applescript that securely selected the password box, typed in a password I put into the AppleScript, and then hit enter? I can launch an AppleScript via the remote so it would be excellent.

To one up it even more if this was possible, would it be possible for me to use one button to run the Applescript and then it would wait for a button combination before putting in the password?

Many many thanks to anyone that can help make my mini-home/dorm-theater setup that much more automated/awesome.
 
Can't you just switch on Auto login? That way you can get it to automatically login in a standard account.

That way you can always log that user out and log in as a different/admin user should you need to.

I'd be surprised, and frankly a bit worried, if apple allowed scripts to be run in the background during the login window.
 
Oh that security nonsense...

As for doing auto-login... Yes, I could but want it to be somewhat secure most of the time. My computer is paired with my remote so I figure if someone has access to both given how stashed away my remote usually is... Hell, kudos to them, haha.
 
If you haven't found a solution to this yet then try something like this:

tell application "System Events"
keystroke "username"
keystroke tab
keystroke "password"
keystroke return
end tell

If your system is at the login prompt with the cursor in the username field then this should work.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.