Re: Checking if script is run from login items
Re: Checking if script is run from login items
- Subject: Re: Checking if script is run from login items
- From: Shane Stanley via AppleScript-Users <email@hidden>
- Date: Sun, 23 Aug 2020 16:59:54 +1000
On 23 Aug 2020, at 9:33 am, email@hidden wrote:
>
> on round_truncate(this_number, decimal_places)
If you want a rounded string:
use AppleScript version "2.5" -- macOS 10.11 or later
use framework "Foundation"
use scripting additions
my roundNumber:8 / 3 toPlaces:5
on roundNumber:theNum toPlaces:numOfPlaces
set nf to current application's NSNumberFormatter's new()
nf's setMinimumFractionDigits:numOfPlaces
nf's setMaximumFractionDigits:numOfPlaces
return (nf's stringFromNumber:theNum) as text
end roundNumber:toPlaces:
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
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