How can I open an app using Terminal?Automatically quit Terminal when typing exitAppleScript choose file...

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

Where does the Z80 processor start executing from?

Abbreviate author names as "Lastname AB" (without space or period) in bibliography

Is there a good way to store credentials outside of a password manager?

Energy of the particles in the particle accelerator

I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?

Increase performance creating Mandelbrot set in python

How to be diplomatic in refusing to write code that breaches the privacy of our users

How do I go from 300 unfinished/half written blog posts, to published posts?

Why are there no referendums in the US?

How can I open an app using Terminal?

How to write papers efficiently when English isn't my first language?

Magento 2 custom phtml file not calling to all products view pages

India just shot down a satellite from the ground. At what altitude range is the resulting debris field?

Inappropriate reference requests from Journal reviewers

Can "Reverse Gravity" affect spells?

How did Arya survive the stabbing?

Does The Brexit Deal Have To Be Agreed By Both Houses?

How do scammers retract money, while you can’t?

How do I extract a value from a time formatted value in excel?

Under what conditions does the function C = f(A,B) satisfy H(C|A) = H(B)?

Anatomically Correct Strange Women In Ponds Distributing Swords

Method to test if a number is a perfect power?

Is there a korbon needed for conversion?



How can I open an app using Terminal?


Automatically quit Terminal when typing exitAppleScript choose file dialog box with default location not workingAutomator task to open screenshots in Preview automaticallyHow can I run a shell script that prompts for user input from within ApplescriptUsing Applescript in Automator app to run ffmpegChanging a startup disk using AppleScriptHow do I search the contents of all my Terminal windowsHow to remove the 10-minute delay for a scheduled Shut Down?Rearrange Spaces via command line from the terminal emulatorPass a variable from bash shell into Applescript?













2















I want to be able to open any given app from the terminal, now I have tried



osascript -e 'open app "Calendar"'



I have tried for Mail, Calendar and Slack.. Slack acctually opens but it does generate a error msg in terminal.. The two others generates errors and doesn't open. The errors are Execution errors.



Now I tried with AppleScript, is bash better?



How can this be done?










share|improve this question























  • You mean open an app using Terminal using AppleScript/JavaScript? Kindly edit the question to clarify. Else you can use open -a "app_name.app" to open any app using Terminal.

    – Nimesh Neema
    1 hour ago
















2















I want to be able to open any given app from the terminal, now I have tried



osascript -e 'open app "Calendar"'



I have tried for Mail, Calendar and Slack.. Slack acctually opens but it does generate a error msg in terminal.. The two others generates errors and doesn't open. The errors are Execution errors.



Now I tried with AppleScript, is bash better?



How can this be done?










share|improve this question























  • You mean open an app using Terminal using AppleScript/JavaScript? Kindly edit the question to clarify. Else you can use open -a "app_name.app" to open any app using Terminal.

    – Nimesh Neema
    1 hour ago














2












2








2








I want to be able to open any given app from the terminal, now I have tried



osascript -e 'open app "Calendar"'



I have tried for Mail, Calendar and Slack.. Slack acctually opens but it does generate a error msg in terminal.. The two others generates errors and doesn't open. The errors are Execution errors.



Now I tried with AppleScript, is bash better?



How can this be done?










share|improve this question














I want to be able to open any given app from the terminal, now I have tried



osascript -e 'open app "Calendar"'



I have tried for Mail, Calendar and Slack.. Slack acctually opens but it does generate a error msg in terminal.. The two others generates errors and doesn't open. The errors are Execution errors.



Now I tried with AppleScript, is bash better?



How can this be done?







terminal mac applescript






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









BrainmaniacBrainmaniac

2127




2127













  • You mean open an app using Terminal using AppleScript/JavaScript? Kindly edit the question to clarify. Else you can use open -a "app_name.app" to open any app using Terminal.

    – Nimesh Neema
    1 hour ago



















  • You mean open an app using Terminal using AppleScript/JavaScript? Kindly edit the question to clarify. Else you can use open -a "app_name.app" to open any app using Terminal.

    – Nimesh Neema
    1 hour ago

















You mean open an app using Terminal using AppleScript/JavaScript? Kindly edit the question to clarify. Else you can use open -a "app_name.app" to open any app using Terminal.

– Nimesh Neema
1 hour ago





You mean open an app using Terminal using AppleScript/JavaScript? Kindly edit the question to clarify. Else you can use open -a "app_name.app" to open any app using Terminal.

– Nimesh Neema
1 hour ago










1 Answer
1






active

oldest

votes


















3














You can use open’s -a option:



open -a Mail


You can specify the application path instead:



open /Applications/Mail.app


If you want to use AppleScript (osascript from command line), open app isn't quite equivalent. Instead, you can use:



osascript -e 'tell application "Mail" to activate'





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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    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%2f355037%2fhow-can-i-open-an-app-using-terminal%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    You can use open’s -a option:



    open -a Mail


    You can specify the application path instead:



    open /Applications/Mail.app


    If you want to use AppleScript (osascript from command line), open app isn't quite equivalent. Instead, you can use:



    osascript -e 'tell application "Mail" to activate'





    share|improve this answer






























      3














      You can use open’s -a option:



      open -a Mail


      You can specify the application path instead:



      open /Applications/Mail.app


      If you want to use AppleScript (osascript from command line), open app isn't quite equivalent. Instead, you can use:



      osascript -e 'tell application "Mail" to activate'





      share|improve this answer




























        3












        3








        3







        You can use open’s -a option:



        open -a Mail


        You can specify the application path instead:



        open /Applications/Mail.app


        If you want to use AppleScript (osascript from command line), open app isn't quite equivalent. Instead, you can use:



        osascript -e 'tell application "Mail" to activate'





        share|improve this answer















        You can use open’s -a option:



        open -a Mail


        You can specify the application path instead:



        open /Applications/Mail.app


        If you want to use AppleScript (osascript from command line), open app isn't quite equivalent. Instead, you can use:



        osascript -e 'tell application "Mail" to activate'






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 1 hour ago

























        answered 1 hour ago









        grggrg

        137k25217321




        137k25217321






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Different!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fapple.stackexchange.com%2fquestions%2f355037%2fhow-can-i-open-an-app-using-terminal%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

            How do i solve the “ No module named 'mlxtend' ” issue on Jupyter?

            Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...