AppleScript名:NSStringによりバージョン文字列比較 |
— Created 2015-07-27 by Takaaki Naganoya — 2015 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set aVer to "10.10.0" set bVer to "10.10" set aVerStr to current application’s NSString’s stringWithString:aVer set bVerStr to current application’s NSString’s stringWithString:bVer set aRes to aVerStr’s compare:bVer options:(current application’s NSNumericSearch) –> 1 –1:aVer > bVer, 0:aVer = bVer, -1:bVer > aVer |
More from my site
(Visited 31 times, 1 visits today)