• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Passing a variable from osascript to bash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing a variable from osascript to bash


  • Subject: Re: Passing a variable from osascript to bash
  • From: "LaMantia, Brian" <email@hidden>
  • Date: Sat, 09 Feb 2019 22:04:25 +0000
  • Disclaimersource: eop
  • Thread-topic: Passing a variable from osascript to bash

Thank you for the response Chris.

I’m planning to either have users execute the script in Finder or wrap it up in
Automator as an app. I had stumbled upon the do shell script and that made me
start to wonder if it was just best to have an AppleScript that ran the command
inside of AS. So no, it does not need to originate from terminal. Just want to
pass an unlock code to terminal and then echo the terminal response to the user.

The automation part is the user never having to open terminal and enter
commands to unlock security. We put a shortcut in the dock, call it something
fancy and bam, we have simple automation and a clean UI for the user.

-Brian


From: AppleScript-Users
<applescript-users-bounces+brian.lamantia=email@hidden> on
behalf of Christopher Stone <email@hidden>
Date: Saturday, February 9, 2019 at 3:29 PM
To: Applescript Users List <email@hidden>
Subject: Re: Passing a variable from osascript to bash

On 02/09/2019, at 10:20, LaMantia, Brian
<email@hidden<mailto:email@hidden>> wrote:
Question for all. I have a workflow I want to get rolling but need to know if
I’m approaching the right way.
________________________________

Hey Brian,

If you're running IN the Terminal.app then you already have all the UI you
really need.

Prompts and user-input are available from the command line without using any
GUI elements.

If you want to hide the workings of the script and use dialogs and such then
you probably want to use AppleScript and run your shell stuff behind the scenes
via do shell script.

Does this workflow need to initiate from the Terminal?

Or do you want the user to double-click on a script in the Finder?

Please elucidate.

--
Best Regards,
Chris

span.com<https://emea01.safelinks.protection.outlook.com/?url=http://span.com&data=02|01|email@hidden|e5019eec46fa4f8a518608d68ed5a9b3|e3ff91d834c84b15a0b418910a6ac575|0|0|636853445664655558&sdata=irpw5OE5tV0SQJwL6wz3A+mGhBjpaQxvFB91IxVHF3M=&reserved=0>
 {mso-style-name:com;} span.pln {mso-style-name:pln;} span.pun
{mso-style-name:pun;} span.str {mso-style-name:str;} span.typ
{mso-style-name:typ;} span.kwd {mso-style-name:kwd;} .MsoChpDefault
{mso-style-type:export-only; font-family:"Calibri",sans-serif;} @page
WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1 {page:WordSection1;} /* List Definitions */ @list l0
{mso-list-id:1586764845; mso-list-type:hybrid; mso-list-template-ids:-963626246
67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713
67698715;} @list l0:level1 {mso-level-tab-stop:none;
mso-level-number-position:left; text-indent:-.25in;} @list l0:level2
{mso-level-number-format:alpha-lower; mso-level-tab-stop:none;
mso-level-number-position:left; text-indent:-.25in;} @list l0:level3
{mso-level-number-format:roman-lower; mso-level-tab-stop:none;
mso-level-number-position:right; text-indent:-9.0pt;} @list l0:level4
{mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;}
@list l0:level5 {mso-level-number-format:alpha-lower; mso-level-tab-stop:none;
mso-level-number-position:left; text-indent:-.25in;} @list l0:level6
{mso-level-number-format:roman-lower; mso-level-tab-stop:none;
mso-level-number-position:right; text-indent:-9.0pt;} @list l0:level7
{mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;}
@list l0:level8 {mso-level-number-format:alpha-lower; mso-level-tab-stop:none;
mso-level-number-position:left; text-indent:-.25in;} @list l0:level9
{mso-level-number-format:roman-lower; mso-level-tab-stop:none;
mso-level-number-position:right; text-indent:-9.0pt;} @list l1
{mso-list-id:1789545458; mso-list-type:hybrid;
mso-list-template-ids:-1767601142 67698703 67698713 67698715 67698703 67698713
67698715 67698703 67698713 67698715;} @list l1:level1 {mso-level-tab-stop:none;
mso-level-number-position:left; text-indent:-.25in;} @list l1:level2
{mso-level-number-format:alpha-lower; mso-level-tab-stop:none;
mso-level-number-position:left; text-indent:-.25in;} @list l1:level3
{mso-level-number-format:roman-lower; mso-level-tab-stop:none;
mso-level-number-position:right; text-indent:-9.0pt;} @list l1:level4
{mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;}
@list l1:level5 {mso-level-number-format:alpha-lower; mso-level-tab-stop:none;
mso-level-number-position:left; text-indent:-.25in;} @list l1:level6
{mso-level-number-format:roman-lower; mso-level-tab-stop:none;
mso-level-number-position:right; text-indent:-9.0pt;} @list l1:level7
{mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;}
@list l1:level8 {mso-level-number-format:alpha-lower; mso-level-tab-stop:none;
mso-level-number-position:left; text-indent:-.25in;} @list l1:level9
{mso-level-number-format:roman-lower; mso-level-tab-stop:none;
mso-level-number-position:right; text-indent:-9.0pt;} ol {margin-bottom:0in;}
ul {margin-bottom:0in;} -->
The information contained in this message is proprietary and/or confidential.
If you are not the intended recipient, please: (i) delete the message and all
copies; (ii) do not disclose, distribute or use the message in any manner; and
(iii) notify the sender immediately. In addition, please be aware that any
message addressed to our domain is subject to archiving and review by persons
other than the intended recipient. Thank you.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Passing a variable from osascript to bash
      • From: Christopher Stone <email@hidden>
References: 
 >Passing a variable from osascript to bash (From: "LaMantia, Brian" <email@hidden>)
 >Re: Passing a variable from osascript to bash (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Passing a variable from osascript to bash
  • Next by Date: Re: Passing a variable from osascript to bash
  • Previous by thread: Re: Passing a variable from osascript to bash
  • Next by thread: Re: Passing a variable from osascript to bash
  • Index(es):
    • Date
    • Thread