« [NSPasteboard] generalPasteboard | トップページ | [NSPasteboard] clearContents »

[NSPasteboard]NSPasteboard.Name

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString
property objNSPasteboard : a reference to objMe's NSPasteboard

property objNSNotFound : a reference to 9.22337203685477E+18 + 5807


set strSampleText to "美しい日本語" as text


####ペーストボードに格納

####テキストをNSStringに
set ocidText to objNSString's alloc()'s initWithString:(strSampleText)
log ocidText as text
log className() of ocidText as text

####ペーストボードを定義
set ocidPasteboard to objNSPasteboard's generalPasteboard()
log className() of ocidPasteboard as text

####ペーストボード名
set ocidPasteboardName to ocidPasteboard's |name|()
log ocidPasteboardName as text
log className() of ocidPasteboardName as text

|

« [NSPasteboard] generalPasteboard | トップページ | [NSPasteboard] clearContents »

NSPasteboard」カテゴリの記事