Applications

AirDropが失敗・利用できない

A:ネットワークブラウザに相手が表示されない
B:ファイルを送信するも失敗する

2通りがあります

A:ネットワークブラウザに相手が表示されない
A1:通信環境
A2:共有環境
A3:セキュリティ
A4:連絡先の不具合


B:ファイルを送信するも失敗する
B1:設定
B2:プロセスの不具合


B1:設定
com.apple.sharingd
com.apple.NetworkBrowser
com.apple.mDNSResponder
com.apple.applicationaccess.AirDrop
の設定を確認、最適値を確認

B2:プロセスの不具合
contactsd
sharingd
fileproviderd
remotepairingd
-->基本電源OFF-ONを含む再起動で治る事が多いい

|

sourceforgeダウンロード


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

#!/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

property refMe : a reference to current application

################################################
####設定項目
################################################
set strProjectName to ("xld") as text
set strTargetTitle to ("dmg") as text

################################################
###### URLRequest部分
################################################
set strURL to "https://sourceforge.net/projects/" & strProjectName & "/rss?path=/" as text
set coidBaseURLStr to refMe's NSString's stringWithString:(strURL)
set ocidBaseURL to refMe's NSURL's URLWithString:(coidBaseURLStr)
set ocidURLRequest to refMe's NSMutableURLRequest's alloc()'s init()
ocidURLRequest's setHTTPMethod:"GET"
ocidURLRequest's setURL:(ocidBaseURL)
ocidURLRequest's addValue:"application/xml" forHTTPHeaderField:"Content-Type"
ocidURLRequest's setHTTPBody:(missing value)

################################################
###### データ取得
################################################
set ocidServerResponse to refMe's NSURLConnection's sendSynchronousRequest:(ocidURLRequest) returningResponse:(missing value) |error|:(reference)
###取得
set ocidXMLData to (item 1 of ocidServerResponse)
set listXMLDoc to refMe's NSXMLDocument's alloc()'s initWithData:ocidXMLData options:(refMe's NSXMLDocumentTidyXML) |error|:(reference)
###RSSデータ
set ocidXMLDoc to item 1 of listXMLDoc
set ocidRootElement to ocidXMLDoc's rootElement()
set ocidChannel to ocidRootElement's childAtIndex:0

################################################
###### バージョン取得
################################################
set listURL to {} as list
repeat with itemRootElement in ocidChannel's children()
  ## set strName to itemRootElement's |name|() as text
  ## itemRootElement = item
  set ocidItemDict to (itemRootElement's childAtIndex:0)'s objectValue()
  set strItemTitle to ocidItemDict as text
  ###ここは対象のRSS毎に違ってくるので書き換えて
  if strItemTitle contains strTargetTitle then
    set ocidoVer to (itemRootElement's childAtIndex:1)'s stringValue()
    set end of listURL to (ocidoVer as text)
  end if
end repeat

################################################
###### 念の為ソートする
################################################
set ocidURLArray to refMe's NSArray's arrayWithArray:(listURL)
set ocidURLArrayM to refMe's NSMutableArray's alloc()'s initWithCapacity:(0)
(ocidURLArrayM's addObjectsFromArray:(ocidURLArray))
###並び替え
set ocidDescriptor to (refMe's NSSortDescriptor's sortDescriptorWithKey:("self") ascending:(false) selector:"localizedStandardCompare:")
ocidURLArrayM's sortUsingDescriptors:{ocidDescriptor}

set listURL to ocidURLArrayM as list



try
  ###ダイアログを前面に出す
  tell current application
    set strName to name as text
  end tell
  ####スクリプトメニューから実行したら
  if strName is "osascript" then
    tell application "Finder"
      activate
    end tell
  else
    tell current application
      activate
    end tell
  end if
  set listResponse to (choose from list listURL with title "選んでください" with prompt "選んだファイルをダウンロードします" default items (item 1 of listURL) OK button name "OK" cancel button name "キャンセル" without multiple selections allowed and empty selection allowed) as list
on error
  log "エラーしました"
return "エラーしました"
end try
if (item 1 of listResponse) is false then
return "キャンセルしました"
end if

set strNewerFileURL to (item 1 of listResponse) as text


###最新をダウンロードする場合はこちら
## set strNewerFileURL to (ocidURLArrayM's firstObject()) as text




###取り出したダウンロードURL(最新)
set ocidURLString to refMe's NSString's stringWithString:(strNewerFileURL)
set ocidURL to refMe's NSURL's alloc()'s initWithString:(ocidURLString)
set ocidLastPathURL to ocidURL's URLByDeletingLastPathComponent()
set strFileName to (ocidLastPathURL's lastPathComponent()) as text
set strURL to ("https://sourceforge.net/projects/" & strProjectName & "/files/" & strFileName) as text


################################################
###### ダウンロード
################################################
set appFileManager to refMe's NSFileManager's defaultManager()
set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSDownloadsDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidDownloadsDirPathURL to ocidURLsArray's firstObject()
set ocidSaveFilePathURL to ocidDownloadsDirPathURL's URLByAppendingPathComponent:(strFileName)
set strSaveFilePath to (ocidSaveFilePathURL's |path|()) as text
set strCommandText to ("/usr/bin/curl -L \"" & strURL & "\" -o \"" & strSaveFilePath & "\"") as text
log (do shell script strCommandText) as text

tell application "Finder"
  set aliasSaveFile to (POSIX file strSaveFilePath) as alias
  set aliasContainerDir to (container of aliasSaveFile) as alias
  open aliasContainerDir
  select file aliasSaveFile
  activate
end tell
return strURL


|

[VLC]BD Blu-rayライブラリインストール

訂正しました
https://quicktimer.cocolog-nifty.com/icefloe/2022/11/post-0c2df1.html

VLCでブルーレイディスクを再生するのに
必要最低限のファイルのインストールと設定を行います。

注意!
ARM版のVLCでは動作しません
VLCはインテル版でインストールする必要があります

VLC本体を置き換えます。
ソースを確認の上、利用してください
(すでに、VLCに細かい設定している方は、利用しないでください)


#!/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 objNSURL : a reference to objMe's NSURL
property objNSDate : a reference to objMe's NSDate
property objNSMutableString : a reference to objMe's NSMutableString

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

set objFileManager to objMe's NSFileManager's defaultManager()
####ARM版では動作しないので留意
set strUrlVlcArm to "https://vlc.letterboxdelivery.org/vlc/3.0.17.3/macosx/vlc-3.0.17.3-arm64.dmg"

set strUrlVlcIntel to "https://vlc.letterboxdelivery.org/vlc/3.0.17.3/macosx/vlc-3.0.17.3-intel64.dmg"

set strUrlLibaacs to "https://vlc-bluray.whoknowsmy.name/files/mac/libaacs.dylib"

set strUrlKeydb to "http://fvonline-db.bplaced.net/export/keydb_jpn.zip"

#########################################

###ユーザーアプリケーションフォルダを作る
set ocidUserApplicationsPathList to (objFileManager's URLsForDirectory:(objMe's NSApplicationDirectory) inDomains:(objMe's NSUserDomainMask))
log ocidUserApplicationsPathList as list
log className() of ocidUserApplicationsPathList as text

set ocidUserApplicationsPath to ocidUserApplicationsPathList's objectAtIndex:0
log ocidUserApplicationsPath as list
log className() of ocidUserApplicationsPath as text

set boolMakeNewFolder to (objFileManager's createDirectoryAtURL:ocidUserApplicationsPath withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

if boolMakeNewFolder is false then
log "フォルダ作成でエラーしました"
error "" number -128
return
end if

###ユーザーaacs Cachesフォルダを作る
set ocidUserCachesList to (objFileManager's URLsForDirectory:(objMe's NSCachesDirectory) inDomains:(objMe's NSUserDomainMask))
log ocidUserCachesList as list
log className() of ocidUserCachesList as text


set ocidUserCachesPath to ocidUserCachesList's objectAtIndex:0
log ocidUserCachesPath as list
log className() of ocidUserCachesPath as text


set ocidUserAacsCachesPath to ocidUserCachesPath's URLByAppendingPathComponent:"aacs"
log ocidUserAacsCachesPath as list
log className() of ocidUserAacsCachesPath as text



set boolMakeNewFolder to (objFileManager's createDirectoryAtURL:ocidUserAacsCachesPath withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

if boolMakeNewFolder is false then
log "フォルダ作成でエラーしました"
error "" number -128
return
end if


###ユーザーbluray Cachesフォルダを作る
set ocidUserCachesList to (objFileManager's URLsForDirectory:(objMe's NSCachesDirectory) inDomains:(objMe's NSUserDomainMask))
log ocidUserCachesList as list
log className() of ocidUserCachesList as text


set ocidUserCachesPath to ocidUserCachesList's objectAtIndex:0
log ocidUserCachesPath as list
log className() of ocidUserCachesPath as text


set ocidUserBlurayCachesPath to ocidUserCachesPath's URLByAppendingPathComponent:"bluray"
log ocidUserBlurayCachesPath as list
log className() of ocidUserBlurayCachesPath as text


set boolMakeNewFolder to (objFileManager's createDirectoryAtURL:ocidUserBlurayCachesPath withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

if boolMakeNewFolder is false then
log "フォルダ作成でエラーしました"
error "" number -128
return
end if

###ユーザーaacs Preferenceフォルダを作る
set strPrefPath to "~/Library/Preferences/"
set ocidPrefPath to objNSString's stringWithString:strPrefPath
log ocidPrefPath as text
log className() of ocidPrefPath as text

set ocidPOSIXpath to ocidPrefPath's stringByStandardizingPath
log ocidPOSIXpath as text
log className() of ocidPOSIXpath as text

set ocidPreferencesPath to objNSURL's fileURLWithPath:ocidPOSIXpath
log ocidPreferencesPath as text
log className() of ocidPreferencesPath as text


set ocidUserAacsPreferencePath to ocidPreferencesPath's URLByAppendingPathComponent:"aacs"
log ocidUserAacsPreferencePath as list
log className() of ocidUserAacsPreferencePath as text


set strUserAacsPreferenceRelativePath to (ocidUserAacsPreferencePath's relativePath) as text
log strUserAacsPreferenceRelativePath as text


set boolMakeNewFolder to (objFileManager's createDirectoryAtURL:ocidUserAacsPreferencePath withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

if boolMakeNewFolder is false then
log "フォルダ作成でエラーしました"
error "" number -128
return
end if


#########################################
####ダウンロードフォルダ
###日付取得
###フォーマットは<http://nsdateformatter.com>参照
set strDateFormat to "yyyyMMddhhmmss" as text
set ocidForMatter to objMe's NSDateFormatter's alloc()'s init()
ocidForMatter's setLocale:(objMe's NSLocale's localeWithLocaleIdentifier:"ja_JP_POSIX")
ocidForMatter's setDateFormat:(strDateFormat)
set strDateText to (ocidForMatter's stringFromDate:(current date)) as text
####作成するダウンロードフォルダのパス
set strTmpDirPath to ("/tmp/" & strDateText & "") as text
set objTmpDirPath to objNSString's stringWithString:strTmpDirPath
###フォルダを作る
set boolMakeNewFolder to (objFileManager's createDirectoryAtPath:objTmpDirPath withIntermediateDirectories:true attributes:(missing value) |error|:(missing value))

if boolMakeNewFolder is false then
log "フォルダ作成でエラーしました"
error "" number -128
return
end if
#########################################
###vlcファイルのダウンロード
set objSysInfo to system info
set strCpuType to (CPU type of objSysInfo) as text

if strCpuType contains "Intel" then
set strCommandText to "/usr/bin/curl -k '" & strUrlVlcIntel & "' -o '" & strTmpDirPath & "/vlc.dmg' --connect-timeout 20" as text
else
set strCommandText to "/usr/bin/curl -k '" & strUrlVlcIntel & "' -o '" & strTmpDirPath & "/vlc.dmg' --connect-timeout 20" as text
end if

###コマンド実行
log "VLCダウンロード開始"
do shell script strCommandText
log "VLCダウンロード終了"
###libaacs.dylibファイルのダウンロード
set strCommandText to "/usr/bin/curl -k '" & strUrlLibaacs & "' -o '" & strTmpDirPath & "/libaacs.dylib.bin' --connect-timeout 20" as text
###コマンド実行
log "libaacs.dylibダウンロード開始"
do shell script strCommandText
log "libaacs.dylibダウンロード終了"
###必要ファイルのダウンロード
set strCommandText to "/usr/bin/curl -k '" & strUrlKeydb & "' -o '" & strTmpDirPath & "/keydb_jpn.zip' --connect-timeout 20" as text
###コマンド実行
log "keydb_jpn.zipダウンロード開始"
do shell script strCommandText
log "keydb_jpn.zipダウンロード終了"
#########################################
###ユーザーアプリケーションフォルダにVLC.appがあればゴミ箱へ入れる
set ocidVclPath to ocidUserApplicationsPath's URLByAppendingPathComponent:"VLC.app"
log ocidVclPath as list
log className() of ocidVclPath as text
####ゴミ箱に入れる
set boolGoToTrash to objFileManager's trashItemAtURL:ocidVclPath resultingItemURL:(missing value) |error|:("")
#####ディスクをマウント
try
set strCommandText to ("/usr/bin/hdiutil attach '" & strTmpDirPath & "/vlc.dmg' -noverify -nobrowse -noautoopen
") as text
do shell script strCommandText
on error
log "attachでエラーになりました"
return
end try
try
set theComandText to ("/usr/bin/ditto '/Volumes/VLC media player/VLC.app' $HOME/Applications/VLC.app") as text
do shell script theComandText
on error
log "dittoでエラーになりました"
return
end try
try
set theComandText to ("/usr/bin/hdiutil detach \"Volumes/VLC media player\" -force") as text
do shell script theComandText
on error
log "detachでエラーになりました"
return
end try

set strUserName to objMe's NSUserName() as text

try
set theComandText to ("defaults write com.apple.dock persistent-apps -array-add \"<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>//Users/" & strUserName & "/Applications/VLC.app/</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>\"") as text
do shell script theComandText
on error
log "defaults writeでエラーになりました"
return
end try
#########################################
try
set theComandText to ("/usr/bin/ditto '" & strTmpDirPath & "/libaacs.dylib.bin' $HOME/Applications/VLC.app/Contents/MacOS/lib/libaacs.dylib") as text

do shell script theComandText
on error
log "libaacs.dylib dittoでエラーになりました"
return
end try
#########################################
set strCommandText to "/usr/bin/curl -k '" & strUrlKeydb & "' -o '" & strTmpDirPath & "/keydb_jpn.zip' --connect-timeout 20" as text


try
set theComandText to ("/usr/bin/unzip \"" & strTmpDirPath & "/keydb_jpn.zip\" -d \"" & strTmpDirPath & "\"") as text
do shell script theComandText
on error
log "unzipでエラーになりました"
return
end try

try
set theComandText to ("/usr/bin/ditto '" & strTmpDirPath & "/keydb.cfg' '" & strUserAacsPreferenceRelativePath & "/keydb.cfg'") as text

do shell script theComandText
on error
log "libaacs.dylib dittoでエラーになりました"
return
end try

###Dock再起動
set strCommandText to "/usr/bin/killall Dock" as text
do shell script strCommandText


display notification "処理終了" with title "処理が終了" subtitle "処理が終了しました" sound name "Sonumi"
log ">>>>>>>>>>>>処理終了<<<<<<<<<<<<<<<"
return ">>>>>>>>>>>>処理終了<<<<<<<<<<<<<<<"


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

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

[Foxit PDF Reader]集約PDF(Nup)を作成する

1:ファイル>>印刷
2:プロパティ
3:詳細画面
4:レイアウト
5:希望の面付け設定を選ぶ
6:PDFとして保存を選択
7:保存先とファイル名を選択(上書き注意)
8:保存(自動で閉じます)
9:プリントボタンを押す
10:指定先に集約PDFが作成されます



_20220819_22_16_21

_20220819_22_16_32

_20220819_22_16_38

_20220819_22_16_47

_20220819_22_16_56

_20220819_22_17_02
_20220819_22_17_36

_20220819_22_17_44

|

[Preview.app]集約PDF(Nup)を作成する

1:PDFを開く
2:ファイル>>プリント
3:プリントダイアログから詳細表示
4:詳細>>レイアウト
5:希望の集約数を選ぶ
6:原稿向き(左から右or右から左)を選ぶ
7:PDFとして保存する



_20220819_22_05_02

_20220819_22_05_10

_20220819_22_05_18

_20220819_22_05_25

_20220819_22_05_31

_20220819_22_05_38

|

[PDF]ブリッジを利用した集約(画像になっちゃいます)

集約結果が『検索できない』画像化されたPDFになるので
『軽量』と『デバイス間の色の違いを最低限に』したい場合は有効

20220416181106_1280x1111

|

その他のカテゴリー

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