How do I create an applescript that when I log into my computer it automatically reopens my script

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












The script I have helps with my computers ability to edit videos. I only use my computer for editing. the script just activates a program that I have made. I want to be able open my computer after it been shut down and the program opens/runs automatically reopening the program.



I have tried to use the system preferences "open at log in" but that doesn't work is there any other way?



The script I have is an application and the code is



set appPath1 to path to resource "Opening 5.app"

tell application "Finder"
open appPath1
end tell


when I double click the app it opens and opens up my program which changes the way FCPX renders, plays and saves videos.










share|improve this question























  • Did u convert the script to an application then use the System Prefs login items feature?
    – abc
    3 hours ago










  • You said, "the script just activates a program that I have made"... please provide more details, what type of program did you make and why do you need AppleScript with this other program. Maybe posting the AppleScript code might be helpful too.
    – user3439894
    3 hours ago










  • See here: AppleScript at Startup and specific time
    – rubik's sphere
    3 hours ago










  • @rubik's sphere, Good to see you, but if all he needs is for it to open at Login, the link you've provided maybe overkill however, lets get some actual details from the OP.
    – user3439894
    3 hours ago










  • Why do you need to launch the app from another app to begin with? Have you tried adding "Opening 5.app" to Login Items instead of the AppleScript app?
    – user3439894
    27 mins ago















up vote
1
down vote

favorite












The script I have helps with my computers ability to edit videos. I only use my computer for editing. the script just activates a program that I have made. I want to be able open my computer after it been shut down and the program opens/runs automatically reopening the program.



I have tried to use the system preferences "open at log in" but that doesn't work is there any other way?



The script I have is an application and the code is



set appPath1 to path to resource "Opening 5.app"

tell application "Finder"
open appPath1
end tell


when I double click the app it opens and opens up my program which changes the way FCPX renders, plays and saves videos.










share|improve this question























  • Did u convert the script to an application then use the System Prefs login items feature?
    – abc
    3 hours ago










  • You said, "the script just activates a program that I have made"... please provide more details, what type of program did you make and why do you need AppleScript with this other program. Maybe posting the AppleScript code might be helpful too.
    – user3439894
    3 hours ago










  • See here: AppleScript at Startup and specific time
    – rubik's sphere
    3 hours ago










  • @rubik's sphere, Good to see you, but if all he needs is for it to open at Login, the link you've provided maybe overkill however, lets get some actual details from the OP.
    – user3439894
    3 hours ago










  • Why do you need to launch the app from another app to begin with? Have you tried adding "Opening 5.app" to Login Items instead of the AppleScript app?
    – user3439894
    27 mins ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











The script I have helps with my computers ability to edit videos. I only use my computer for editing. the script just activates a program that I have made. I want to be able open my computer after it been shut down and the program opens/runs automatically reopening the program.



I have tried to use the system preferences "open at log in" but that doesn't work is there any other way?



The script I have is an application and the code is



set appPath1 to path to resource "Opening 5.app"

tell application "Finder"
open appPath1
end tell


when I double click the app it opens and opens up my program which changes the way FCPX renders, plays and saves videos.










share|improve this question















The script I have helps with my computers ability to edit videos. I only use my computer for editing. the script just activates a program that I have made. I want to be able open my computer after it been shut down and the program opens/runs automatically reopening the program.



I have tried to use the system preferences "open at log in" but that doesn't work is there any other way?



The script I have is an application and the code is



set appPath1 to path to resource "Opening 5.app"

tell application "Finder"
open appPath1
end tell


when I double click the app it opens and opens up my program which changes the way FCPX renders, plays and saves videos.







applescript






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago

























asked 3 hours ago









John Smith

443




443











  • Did u convert the script to an application then use the System Prefs login items feature?
    – abc
    3 hours ago










  • You said, "the script just activates a program that I have made"... please provide more details, what type of program did you make and why do you need AppleScript with this other program. Maybe posting the AppleScript code might be helpful too.
    – user3439894
    3 hours ago










  • See here: AppleScript at Startup and specific time
    – rubik's sphere
    3 hours ago










  • @rubik's sphere, Good to see you, but if all he needs is for it to open at Login, the link you've provided maybe overkill however, lets get some actual details from the OP.
    – user3439894
    3 hours ago










  • Why do you need to launch the app from another app to begin with? Have you tried adding "Opening 5.app" to Login Items instead of the AppleScript app?
    – user3439894
    27 mins ago

















  • Did u convert the script to an application then use the System Prefs login items feature?
    – abc
    3 hours ago










  • You said, "the script just activates a program that I have made"... please provide more details, what type of program did you make and why do you need AppleScript with this other program. Maybe posting the AppleScript code might be helpful too.
    – user3439894
    3 hours ago










  • See here: AppleScript at Startup and specific time
    – rubik's sphere
    3 hours ago










  • @rubik's sphere, Good to see you, but if all he needs is for it to open at Login, the link you've provided maybe overkill however, lets get some actual details from the OP.
    – user3439894
    3 hours ago










  • Why do you need to launch the app from another app to begin with? Have you tried adding "Opening 5.app" to Login Items instead of the AppleScript app?
    – user3439894
    27 mins ago
















Did u convert the script to an application then use the System Prefs login items feature?
– abc
3 hours ago




Did u convert the script to an application then use the System Prefs login items feature?
– abc
3 hours ago












You said, "the script just activates a program that I have made"... please provide more details, what type of program did you make and why do you need AppleScript with this other program. Maybe posting the AppleScript code might be helpful too.
– user3439894
3 hours ago




You said, "the script just activates a program that I have made"... please provide more details, what type of program did you make and why do you need AppleScript with this other program. Maybe posting the AppleScript code might be helpful too.
– user3439894
3 hours ago












See here: AppleScript at Startup and specific time
– rubik's sphere
3 hours ago




See here: AppleScript at Startup and specific time
– rubik's sphere
3 hours ago












@rubik's sphere, Good to see you, but if all he needs is for it to open at Login, the link you've provided maybe overkill however, lets get some actual details from the OP.
– user3439894
3 hours ago




@rubik's sphere, Good to see you, but if all he needs is for it to open at Login, the link you've provided maybe overkill however, lets get some actual details from the OP.
– user3439894
3 hours ago












Why do you need to launch the app from another app to begin with? Have you tried adding "Opening 5.app" to Login Items instead of the AppleScript app?
– user3439894
27 mins ago





Why do you need to launch the app from another app to begin with? Have you tried adding "Opening 5.app" to Login Items instead of the AppleScript app?
– user3439894
27 mins ago











3 Answers
3






active

oldest

votes

















up vote
2
down vote













I use this ..




  1. Open System Preferences.

  2. Go to Users & Groups.

  3. Choose your nickname on the right.

  4. Choose Login items tab.

  5. Press +

  6. Check startup programs you want to add.



enter image description here






share|improve this answer






















  • The OP already stated: "I have tried to use the system preferences "open at log in" but that doesn't work "
    – user3439894
    2 hours ago










  • This answer should work if and only if the original script is actually saved as an application.
    – DonielF
    43 mins ago

















up vote
1
down vote













If the script you provided is the actual script, you can launch “Opening 5.app” directly from the login items instead of the script.



If your script does other things not shown in your question, you can still use the script but you’d have to save the script as an application instead of a plain script to use it with login items.






share|improve this answer



























    up vote
    0
    down vote













    You should be able to just add “Opening 5.app” to the System Preferences » Login Items.



    But if that doesn’t work for some reason, this sounds like the perfect job for a launchd .plist. They can be tricky to write, but there are two apps which are very good for getting the hang of them. The first is Lingon and the second is LaunchControl. They both have demos, and I would recommend trying them both and seeing which one you prefer.



    If you're keen to learn more about launchd, a good resource is http://www.launchd.info.



    Here's an example of how you might handle launching that app at login:



    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.tjluoma.opening5</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/bin/open</string>
    <string>-a</string>
    <string>Opening 5</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>


    Save that to ~/Library/LaunchAgents/com.tjluoma.opening5.plist (where ~ refers to your home directory).



    When you reboot (or logout and then login), it should launch “Opening 5” at login.






    share|improve this answer






















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "118"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fapple.stackexchange.com%2fquestions%2f336960%2fhow-do-i-create-an-applescript-that-when-i-log-into-my-computer-it-automatically%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote













      I use this ..




      1. Open System Preferences.

      2. Go to Users & Groups.

      3. Choose your nickname on the right.

      4. Choose Login items tab.

      5. Press +

      6. Check startup programs you want to add.



      enter image description here






      share|improve this answer






















      • The OP already stated: "I have tried to use the system preferences "open at log in" but that doesn't work "
        – user3439894
        2 hours ago










      • This answer should work if and only if the original script is actually saved as an application.
        – DonielF
        43 mins ago














      up vote
      2
      down vote













      I use this ..




      1. Open System Preferences.

      2. Go to Users & Groups.

      3. Choose your nickname on the right.

      4. Choose Login items tab.

      5. Press +

      6. Check startup programs you want to add.



      enter image description here






      share|improve this answer






















      • The OP already stated: "I have tried to use the system preferences "open at log in" but that doesn't work "
        – user3439894
        2 hours ago










      • This answer should work if and only if the original script is actually saved as an application.
        – DonielF
        43 mins ago












      up vote
      2
      down vote










      up vote
      2
      down vote









      I use this ..




      1. Open System Preferences.

      2. Go to Users & Groups.

      3. Choose your nickname on the right.

      4. Choose Login items tab.

      5. Press +

      6. Check startup programs you want to add.



      enter image description here






      share|improve this answer














      I use this ..




      1. Open System Preferences.

      2. Go to Users & Groups.

      3. Choose your nickname on the right.

      4. Choose Login items tab.

      5. Press +

      6. Check startup programs you want to add.



      enter image description here







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited 23 mins ago









      abc

      1,8732935




      1,8732935










      answered 2 hours ago









      Buscar웃

      31.8k539105




      31.8k539105











      • The OP already stated: "I have tried to use the system preferences "open at log in" but that doesn't work "
        – user3439894
        2 hours ago










      • This answer should work if and only if the original script is actually saved as an application.
        – DonielF
        43 mins ago
















      • The OP already stated: "I have tried to use the system preferences "open at log in" but that doesn't work "
        – user3439894
        2 hours ago










      • This answer should work if and only if the original script is actually saved as an application.
        – DonielF
        43 mins ago















      The OP already stated: "I have tried to use the system preferences "open at log in" but that doesn't work "
      – user3439894
      2 hours ago




      The OP already stated: "I have tried to use the system preferences "open at log in" but that doesn't work "
      – user3439894
      2 hours ago












      This answer should work if and only if the original script is actually saved as an application.
      – DonielF
      43 mins ago




      This answer should work if and only if the original script is actually saved as an application.
      – DonielF
      43 mins ago












      up vote
      1
      down vote













      If the script you provided is the actual script, you can launch “Opening 5.app” directly from the login items instead of the script.



      If your script does other things not shown in your question, you can still use the script but you’d have to save the script as an application instead of a plain script to use it with login items.






      share|improve this answer
























        up vote
        1
        down vote













        If the script you provided is the actual script, you can launch “Opening 5.app” directly from the login items instead of the script.



        If your script does other things not shown in your question, you can still use the script but you’d have to save the script as an application instead of a plain script to use it with login items.






        share|improve this answer






















          up vote
          1
          down vote










          up vote
          1
          down vote









          If the script you provided is the actual script, you can launch “Opening 5.app” directly from the login items instead of the script.



          If your script does other things not shown in your question, you can still use the script but you’d have to save the script as an application instead of a plain script to use it with login items.






          share|improve this answer












          If the script you provided is the actual script, you can launch “Opening 5.app” directly from the login items instead of the script.



          If your script does other things not shown in your question, you can still use the script but you’d have to save the script as an application instead of a plain script to use it with login items.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 21 mins ago









          John Keates

          1,765410




          1,765410




















              up vote
              0
              down vote













              You should be able to just add “Opening 5.app” to the System Preferences » Login Items.



              But if that doesn’t work for some reason, this sounds like the perfect job for a launchd .plist. They can be tricky to write, but there are two apps which are very good for getting the hang of them. The first is Lingon and the second is LaunchControl. They both have demos, and I would recommend trying them both and seeing which one you prefer.



              If you're keen to learn more about launchd, a good resource is http://www.launchd.info.



              Here's an example of how you might handle launching that app at login:



              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
              <plist version="1.0">
              <dict>
              <key>Label</key>
              <string>com.tjluoma.opening5</string>
              <key>ProgramArguments</key>
              <array>
              <string>/usr/bin/open</string>
              <string>-a</string>
              <string>Opening 5</string>
              </array>
              <key>RunAtLoad</key>
              <true/>
              </dict>
              </plist>


              Save that to ~/Library/LaunchAgents/com.tjluoma.opening5.plist (where ~ refers to your home directory).



              When you reboot (or logout and then login), it should launch “Opening 5” at login.






              share|improve this answer


























                up vote
                0
                down vote













                You should be able to just add “Opening 5.app” to the System Preferences » Login Items.



                But if that doesn’t work for some reason, this sounds like the perfect job for a launchd .plist. They can be tricky to write, but there are two apps which are very good for getting the hang of them. The first is Lingon and the second is LaunchControl. They both have demos, and I would recommend trying them both and seeing which one you prefer.



                If you're keen to learn more about launchd, a good resource is http://www.launchd.info.



                Here's an example of how you might handle launching that app at login:



                <?xml version="1.0" encoding="UTF-8"?>
                <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
                <plist version="1.0">
                <dict>
                <key>Label</key>
                <string>com.tjluoma.opening5</string>
                <key>ProgramArguments</key>
                <array>
                <string>/usr/bin/open</string>
                <string>-a</string>
                <string>Opening 5</string>
                </array>
                <key>RunAtLoad</key>
                <true/>
                </dict>
                </plist>


                Save that to ~/Library/LaunchAgents/com.tjluoma.opening5.plist (where ~ refers to your home directory).



                When you reboot (or logout and then login), it should launch “Opening 5” at login.






                share|improve this answer
























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  You should be able to just add “Opening 5.app” to the System Preferences » Login Items.



                  But if that doesn’t work for some reason, this sounds like the perfect job for a launchd .plist. They can be tricky to write, but there are two apps which are very good for getting the hang of them. The first is Lingon and the second is LaunchControl. They both have demos, and I would recommend trying them both and seeing which one you prefer.



                  If you're keen to learn more about launchd, a good resource is http://www.launchd.info.



                  Here's an example of how you might handle launching that app at login:



                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
                  <plist version="1.0">
                  <dict>
                  <key>Label</key>
                  <string>com.tjluoma.opening5</string>
                  <key>ProgramArguments</key>
                  <array>
                  <string>/usr/bin/open</string>
                  <string>-a</string>
                  <string>Opening 5</string>
                  </array>
                  <key>RunAtLoad</key>
                  <true/>
                  </dict>
                  </plist>


                  Save that to ~/Library/LaunchAgents/com.tjluoma.opening5.plist (where ~ refers to your home directory).



                  When you reboot (or logout and then login), it should launch “Opening 5” at login.






                  share|improve this answer














                  You should be able to just add “Opening 5.app” to the System Preferences » Login Items.



                  But if that doesn’t work for some reason, this sounds like the perfect job for a launchd .plist. They can be tricky to write, but there are two apps which are very good for getting the hang of them. The first is Lingon and the second is LaunchControl. They both have demos, and I would recommend trying them both and seeing which one you prefer.



                  If you're keen to learn more about launchd, a good resource is http://www.launchd.info.



                  Here's an example of how you might handle launching that app at login:



                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
                  <plist version="1.0">
                  <dict>
                  <key>Label</key>
                  <string>com.tjluoma.opening5</string>
                  <key>ProgramArguments</key>
                  <array>
                  <string>/usr/bin/open</string>
                  <string>-a</string>
                  <string>Opening 5</string>
                  </array>
                  <key>RunAtLoad</key>
                  <true/>
                  </dict>
                  </plist>


                  Save that to ~/Library/LaunchAgents/com.tjluoma.opening5.plist (where ~ refers to your home directory).



                  When you reboot (or logout and then login), it should launch “Opening 5” at login.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 2 mins ago

























                  answered 1 hour ago









                  TJ Luoma

                  9,98033473




                  9,98033473



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fapple.stackexchange.com%2fquestions%2f336960%2fhow-do-i-create-an-applescript-that-when-i-log-into-my-computer-it-automatically%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      What does second last employer means? [closed]

                      Installing NextGIS Connect into QGIS 3?

                      One-line joke