Has anyone created an AppleScript/Application to launch PlexConnect at startup?

Edit: Okay, I got it working. Initially, I had just dragged the PlexConnect folder into Platypus to be bundled and the script never worked. So I created a new script and just dragged the contents (minus the .pyc files) of the PlexConnect folder into Platypus. Once I did that, the script worked.

Still can't get the AppleScript method to work, though.

 

Try Platypus without selecting the "run in background" option.

Now we just need some nice Plex icons for the PlexConnect script app. If anyone has some, please post them.

I'm using this script and it is working well. However when I quit the PlexConnect.app that I've created, it asks for my password. It starts up fine using the keychain password. Is it possible so that upon quitting it also uses the keychain password?

I ended up running into problems with the script, every time I would restart my Mac, Plexconnect would not run properly. I have now gone the platypus route, and I have it working great, except for the fact that it does ask me for a password every time I launch it. Could someone please tell me how to avoid this, and maybe use my Keychain entry instead?

Okay, I got the AppleScript running. It will start and shutdown now without a password. The only snag now, is the fact that PlexConnect launches before PMS, which causes a disruption. When I go to trailers, I get no response from the media server. Put if I restart PMS, PlexConnect works great. Or, if I start PlexConnect manually after PMS has launched, it works great also. Just can’t establish a boot order. Is there a way to set an order, so it’s guaranteed to launch after PMS has opened? Tried changing order of login items, but it does no good.

How did you stop the AppleScript from asking for a password on closing. That is the only issue (and a minor one) that I have had with it.

I’m not sure if I did anything special. I did go into Keychain Access just to look at everything, but I don’t think I changed any settings. I did allow “security” in those keychain settings, but this was added for me by default, because when you launch the AppleScript for the first time it, asks you to grant access. If you select “always allow,” it does not ask for a password when you shut the app down. At least, that’s my theory. When the app was asking me for a password when shutting it down, I deleted it entirely, and started from scratch again. I created the final AppleScript, granted it access always, changed the icon, and it hasn’t asked me for a password sense. I’ve opened and closed the app several times just to test it, and it works every time. If only I could figure out how to have it start on reboot after PMS launches, and only after PMS launches.

Thanks, I will recreate the Applescript and follow your steps. I haven’t had the problem with ordering though, but I rarely turn off my computer. I will test it when I have a chance.

Unisonruss,

I recreated the script and now it exits without asking for admin pass. Thanks.

I also noticed the script has a commented line for a delay—#"delay 10"—that is supposed to get around your problem with the startup order. Just uncomment that line (remove the # from in front of "delay 10").

This is sweet. I have it running and even added a nice Plex icon to the Applescript application.

screen.jpg

Where did you get that icon from?

Just from google search > images > Plex Icon

Unisonruss,
 
I recreated the script and now it exits without asking for admin pass. Thanks.
 
I also noticed the script has a commented line for a delay—#"delay 10"—that is supposed to get around your problem with the startup order. Just uncomment that line (remove the # from in front of "delay 10").


I'm glad it works for you now! It's much easier now, right? Love having an app.

As for the issue, a user has just added a pull request (yesterday) that will include headless PMS support. This should clear up all of the problems I'm having with booting up my Mac. Plexconnect will not do anything until PMS launches (even if it launches first), we just have to get this feature put into the official branch ASAP, along with the other pull request to get Elan's awesome changes to the UI...

The applescript app asks me for a password on quit. I can't figure out how to turn it off.

The applescript app asks me for a password on quit. I can't figure out how to turn it off.


See post 26 onwards.

Sorry, I'm a complete beginner on this stuff. When I open Automator, do I just select the document to be an App, drag the script text into the workflow box, change the username and password, then save to the applications folder? Am I missing anything?

If you are referring to the AppleScript in this thread you need to open up the AppleScript editor on Automator. Follow the detailed description of how to on page one.

See post 26 onwards.

I did and recreated both keychain and script as described. I selected always allow when keychain asked me to enter the password. And still it asks me for a password every time I try to quick the applescript app.

I was never able to get the AppleScript to work. It always generates the following error:  "security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain." number 44. 

Have you created he keychain item and put its name in the script as the how to describes it?

Everyone having problems: you probably didn’t modify all the items you needed to in your own apple script. My first two attempts did not work right because of this. The first three items need to be modified, and your username must be correct, etc.