NSCFBoolean

NSOrderedSameの戻り値は0(falseでは無いので留意)


【スクリプトエディタで開く】|

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

property refMe : a reference to current application


set ocidFalse to (refMe's NSNumber's numberWithBool:false)'s boolValue
log ocidFalse as boolean
-->false

set ocidTrue to (refMe's NSNumber's numberWithBool:true)'s boolValue
log ocidTrue as boolean
-->true

set ocidFalse to (refMe's NSNumber's numberWithBool:false)'s integerValue
log ocidFalse as integer
-->(*0*)

set ocidTrue to (refMe's NSNumber's numberWithBool:true)'s integerValue
log ocidTrue as integer
-->(*1*)

log (refMe's NSOrderedSame) as integer
-->(*0*)同じ
log (refMe's NSOrderedAscending) as integer
-->(*-1*)昇順
log (refMe's NSOrderedDescending) as integer
-->(*1*)降順

|

[NSBoolean]NSCFBoolean

NSCFBoolean でNSNumber
0=false
1=true

【スクリプトエディタで開く】|

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
(*
com.cocolog-nifty.quicktimer.icefloe
*)
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

property refMe : a reference to current application



#####(*__NSCFBoolean*)
-->false
set ocidFalse to (refMe's NSNumber's numberWithBool:0)
log className() of ocidFalse as text
log ocidFalse
set boolFalse to ocidFalse as boolean
log boolFalse
-->true
set ocidTrue to (refMe's NSNumber's numberWithBool:1)
log className() of ocidFalse as text
log ocidTrue
set boolTrue to ocidTrue as boolean
log boolTrue

#####(*__NSCFBoolean*)
-->false
set ocidFalse to (refMe's NSNumber's numberWithBool:0)'s boolValue
log className() of ocidFalse as text
log ocidFalse
set boolFalse to ocidFalse as boolean
log boolFalse
-->true
set ocidTrue to (refMe's NSNumber's numberWithBool:1)'s boolValue
log className() of ocidFalse as text
log ocidTrue
set boolTrue to ocidTrue as boolean
log boolTrue


#####(*__NSCFBoolean*)
-->false
set ocidFalse to (refMe's NSNumber's numberWithBool:false)'s boolValue
log className() of ocidFalse as text
log ocidFalse
set boolFalse to ocidFalse as boolean
log boolFalse
-->true
set ocidTrue to (refMe's NSNumber's numberWithBool:true)'s boolValue
log className() of ocidFalse as text
log ocidTrue
set boolTrue to ocidTrue as boolean
log boolTrue
#####(*__NSCFBoolean*)
-->false
set ocidFalse to (refMe's NSNumber's numberWithBool:false)
log className() of ocidFalse as text
log ocidFalse
set boolFalse to ocidFalse as boolean
log boolFalse
-->true
set ocidTrue to (refMe's NSNumber's numberWithBool:true)
log className() of ocidFalse as text
log ocidTrue
set boolTrue to ocidTrue as boolean
log boolTrue



|

その他のカテゴリー

Accessibility Acrobat Acrobat 2020 Acrobat AddOn Acrobat Annotation Acrobat ARMDC Acrobat AV2 Acrobat BookMark Acrobat Classic Acrobat DC Acrobat Dialog Acrobat Distiller Acrobat Form Acrobat JS Acrobat Manifest Acrobat Menu Acrobat Open Acrobat Plugin Acrobat Preferences Acrobat Preflight Acrobat python Acrobat Reader Acrobat SCA Acrobat SCA Updater Acrobat Sequ Acrobat Sign Acrobat Stamps Acrobat Watermark Acrobat Windows Acrobat Windows Reader Admin Admin Account Admin Apachectl Admin configCode Admin Device Management Admin LaunchServices Admin Locationd Admin loginitem Admin Maintenance Admin Mobileconfig Admin Permission Admin Pkg Admin Power Management Admin Printer Admin SetUp Admin SMB Admin Support Admin System Information Admin Tools Admin Users Admin Volumes Adobe Adobe FDKO Adobe RemoteUpdateManager AppKit Apple AppleScript AppleScript do shell script AppleScript List AppleScript ObjC AppleScript Osax AppleScript PDF AppleScript Pictures AppleScript record AppleScript Script Editor AppleScript Script Menu AppleScript Shortcuts AppleScript Shortcuts Events AppleScript System Events AppleScript System Events Plist AppleScript Video Applications AppStore Archive Attributes Automator BackUp Barcode Barcode QR Barcode QR Decode Bash Basic Basic Path Bluetooth BOX Browser Calendar CD/DVD Choose Chrome CIImage CityCode CloudStorage Color com.apple.LaunchServices.OpenWith Console Contacts CotEditor CURL current application Date&Time delimiters Desktop Device Diff Disk Dock DropBox Droplet eMail Encode % Encode Decode Encode UTF8 Error EXIFData ffmpeg File Finder Firefox Folder FolderAction Fonts GIF github Guide HTML HTML Entity Icon Illustrator Image Events Image2PDF ImageOptim iPhone iWork Javascript Jedit Json Label Leading Zero List locationd LRC lsappinfo LSSharedFileList m3u8 Mail MakePDF Map Math Media Media AVAsset Media AVconvert Media AVFoundation Media AVURLAsset Media Movie Media Music Memo Messages Microsoft Microsoft Edge Microsoft Excel Mouse Music NetWork Notes NSArray NSArray Sort NSBezierPath NSBitmapImageRep NSBundle NSCFBoolean NSCharacterSet NSColor NSColorList NSData NSDecimalNumber NSDictionary NSError NSEvent NSFileAttributes NSFileManager NSFileManager enumeratorAtURL NSFont NSFontManager NSGraphicsContext NSImage NSIndex NSKeyedArchiver NSKeyedUnarchiver NSLocale NSMutableArray NSMutableDictionary NSMutableString NSNotFound NSNumber NSOpenPanel NSPasteboard NSpoint NSPredicate NSPrintOperation NSRange NSRect NSRegularExpression NSRunningApplication NSScreen NSSize NSString NSString stringByApplyingTransform NSStringCompareOptions NSTask NSTimeZone NSURL NSURL File NSURLBookmark NSURLComponents NSURLResourceKey NSURLSession NSUserDefaults NSUUID NSView NSWorkspace Numbers OAuth OneDrive PDF PDFAnnotation PDFAnnotationWidget PDFContext PDFDisplayBox PDFDocumentPermissions PDFImageRep PDFKit PDFnUP PDFOutline perl Photoshop PlistBuddy pluginkit postalcode PostScript prefPane Preview Python QuickLook QuickTime ReadMe Regular Expression Reminders ReName Repeat RTF Safari SaveFile ScreenCapture ScreenSaver SF Symbols character id SF Symbols Entity sips Skype Slack Sound Spotlight sqlite SRT StandardAdditions Swift System Settings TCC TemporaryItems Terminal Text Text CSV Text MD Text TSV TextEdit Tools Translate Trash Twitter Typography UI Unit Conversion UTType valueForKeyPath Video VisionKit Visual Studio Code Wacom webarchive webp Wifi Windows XML XML EPUB XML OPML XML Plist XML RSS XML savedSearch XML SVG XML TTML XML webloc XML XMP YouTube zoom