Re: AppleScript UI for timed override code
Re: AppleScript UI for timed override code
- Subject: Re: AppleScript UI for timed override code
- From: Takaaki Naganoya <email@hidden>
- Date: Fri, 05 Apr 2019 23:26:48 +0900
Hi Barry,
I was really surprised that you read the attachment image :-)
It was very ad-lib code to make a dummy screen shot.
You can take the way you like (Thanks Shane, too).
——
The attached image is the really important point.
The image was made by my AppleScript which compress images under the target
size.
http://piyocast.com/as/archives/5492
This is very exciting!
> 2019/04/05 17:52、Barry Wainwright <email@hidden>のメール:
>
> “Cancel” is a special case.
>
> If you have a button named “Cancel” it is intercepted by the system and
> generates a higher level cancel code (error code -128, from memory, but
> memory may be fallible!) which aborts the script.
>
> To get round this I used to rename the button as “Abort”. Any other name,
> apart from cancel, will return the operation to the script.
>
> On 5 Apr 2019, at 8:07, Takaaki Naganoya wrote:
>
> Hi,
>
> Your code dose not return actual result (User given code or canceled status).
> You’d better to execute AppleScript code with Script Editor
> (/Applications/Utilities/Script Editor.app).
> Then the return data will be obvious.
>
> <1E4CC738-1EEF-4CB6-AD38-4589B7714FF6_0.01.jpg>
>
>> 2019/04/05 9:49、LaMantia, Brian <email@hidden>のメール:
>>
>> Hi all. I need a tool that will prompt a user to enter a code, then have
>> that code passed to shell, and finally the pass/fail response given to the
>> user. I don’t have much experience with applescript and I am trying to
>> learn. It’s confussing trying to workflow this going from applescript to sh.
>> Does anyone have a workflow that will help get me there?
>>
>> Thank you – Brian
>>
>> Workflow
>> • User given code
>> • User executes script
>> • User asked for token in UI/ user clicks continue
>> • Code is passed as variable to the shell. Something like (do shell
>> script “cd /Applications/Bit9/Tools; ./b9cli -timedoverride $code”
>> • Pass or fail results echoed back to the use in the UI.
>>
>>
>> CLI command in terminal (example of failure and success)
>>
>> path = /Applications/Bit9/Tools
>>
>> mac:Tools user$ ./b9cli -timedoverride <token>
>> Failed to decode password
>>
>> mac:Tools user$ ./b9cli -timedoverride <token>
>> Timed override set
>>
>>
>> Osascript idea to prompt for code
>>
>> /usr/bin/osascript <<EOT
>>
>>
>> set theResponse to display dialog "What's your code?" default answer ""
>> with icon stop buttons {"Cancel", "Continue"} default button "Continue" with
>> hidden answer
>>
>>
>> display dialog "My Secret Code is " & (text returned of theResponse) & "."
>>
>> EOT
>>
>> 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
>
> --
> Takaaki Naganoya
> email@hidden
> http://piyocast.com/as/
>
>
>
> _______________________________________________
> 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
>
> _______________________________________________
> 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
--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/
_______________________________________________
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