SaveAsAdobePDF.ppam が読み込めませんでした。
修正版があります
[Office]SaveAsAdobePDF.ppam が読み込めませんでした。(修正版)
SaveAsAdobePDF.ppam が読み込めませんでした。
SaveAsAdobePDF.xlam が読み込めませんでした
linkCreation.dotm が読み込めませんでした 対応用
[Office]SaveAsAdobePDF.ppam が読み込めませんでした。(修正版)
SaveAsAdobePDF.ppam が読み込めませんでした。
SaveAsAdobePDF.xlam が読み込めませんでした
linkCreation.dotm が読み込めませんでした 対応用
ダウンロード - movetotrashmsjunk.zip
#!/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.6"
use framework "Foundation"
use scripting additions
property refMe : a reference to current application
set appFileManager to refMe's NSFileManager's defaultManager()
set strFilePathA to "~/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Startup.localized/Word/~$nkCreation.dotm"
set ocidFilePathStr to refMe's NSString's stringWithString:(strFilePathA)
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidFilePathURL to refMe's NSURL's alloc()'s initFileURLWithPath:ocidFilePath isDirectory:false
set boolDone to doMoveToTrash(ocidFilePathURL)
set strFilePathB to "~/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Startup.localized/Excel/~$SaveAsAdobePDF.xlam"
set ocidFilePathStr to refMe's NSString's stringWithString:(strFilePathB)
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidFilePathURL to refMe's NSURL's alloc()'s initFileURLWithPath:ocidFilePath isDirectory:false
set boolDone to doMoveToTrash(ocidFilePathURL)
set strFilePathC to "~/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Startup.localized/Powerpoint/~$SaveAsAdobePDF.ppam"
set ocidFilePathStr to refMe's NSString's stringWithString:(strFilePathB)
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidFilePathURL to refMe's NSURL's alloc()'s initFileURLWithPath:ocidFilePath isDirectory:false
set boolDone to doMoveToTrash(ocidFilePathURL)
set strFilePathA to "~/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Add-Ins.localized/Word/~$nkCreation.dotm"
set ocidFilePathStr to refMe's NSString's stringWithString:(strFilePathA)
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidFilePathURL to refMe's NSURL's alloc()'s initFileURLWithPath:ocidFilePath isDirectory:false
set boolDone to doMoveToTrash(ocidFilePathURL)
set strFilePathB to "~/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Add-Ins.localized/Excel/~$SaveAsAdobePDF.xlam"
set ocidFilePathStr to refMe's NSString's stringWithString:(strFilePathB)
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidFilePathURL to refMe's NSURL's alloc()'s initFileURLWithPath:ocidFilePath isDirectory:false
set boolDone to doMoveToTrash(ocidFilePathURL)
set strFilePathC to "~/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Add-Ins.localized/Powerpoint/~$SaveAsAdobePDF.ppam"
set ocidFilePathStr to refMe's NSString's stringWithString:(strFilePathB)
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidFilePathURL to refMe's NSURL's alloc()'s initFileURLWithPath:ocidFilePath isDirectory:false
set boolDone to doMoveToTrash(ocidFilePathURL)
set strDirFilePath to "~/Library/Group Containers/UBF8T346G9.Office/User Content.localized"
set ocidFilePathStr to refMe's NSString's stringWithString:(strDirFilePath)
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidFilePathURL to refMe's NSURL's alloc()'s initFileURLWithPath:ocidFilePath isDirectory:true
set appShardWorkspace to refMe's NSWorkspace's sharedWorkspace()
appShardWorkspace's openURL:ocidFilePathURL
to doMoveToTrash(argFilePath)
###ファイルマネジャー初期化
set appFileManager to refMe's NSFileManager's defaultManager()
#########################################
###渡された値のClassを調べてとりあえずNSURLにする
set refClass to class of argFilePath
if refClass is list then
return "エラーリストは処理しません"
else if refClass is text then
log "テキストパスです"
set ocidArgFilePathStr to (refMe's NSString's stringWithString:argFilePath)
set ocidArgFilePath to ocidArgFilePathStr's stringByStandardizingPath
set ocidArgFilePathURL to (refMe's NSURL's alloc()'s initFileURLWithPath:ocidArgFilePath)
else if refClass is alias then
log "エイリアスパスです"
set strArgFilePath to (POSIX path of argFilePath) as text
set ocidArgFilePathStr to (refMe's NSString's stringWithString:strArgFilePath)
set ocidArgFilePath to ocidArgFilePathStr's stringByStandardizingPath
set ocidArgFilePathURL to (refMe's NSURL's alloc()'s initFileURLWithPath:ocidArgFilePath)
else
set refClass to (className() of argFilePath) as text
if refClass contains "NSPathStore2" then
log "NSPathStore2です"
set ocidArgFilePathURL to (refMe's NSURL's alloc()'s initFileURLWithPath:argFilePath)
else if refClass contains "NSCFString" then
log "NSCFStringです"
set ocidArgFilePath to argFilePath's stringByStandardizingPath
set ocidArgFilePathURL to (refMe's NSURL's alloc()'s initFileURLWithPath:ocidArgFilePath)
else if refClass contains "NSURL" then
set ocidArgFilePathURL to argFilePath
log "NSURLです"
end if
end if
#########################################
###
-->false
set ocidFalse to (refMe's NSNumber's numberWithBool:false)'s boolValue
-->true
set ocidTrue to (refMe's NSNumber's numberWithBool:true)'s boolValue
#########################################
###NSURLがエイリアス実在するか?
set ocidArgFilePath to ocidArgFilePathURL's |path|()
set boolFileAlias to appFileManager's fileExistsAtPath:(ocidArgFilePath)
###パス先が実在しないなら処理はここまで
if boolFileAlias = false then
log ocidArgFilePath as text
log "処理中止"
return false
end if
#########################################
###NSURLがディレクトリなのか?ファイルなのか?
set listBoolDir to ocidArgFilePathURL's getResourceValue:(reference) forKey:(refMe's NSURLIsDirectoryKey) |error|:(reference)
if (item 2 of listBoolDir) = ocidTrue then
#########################################
log "ディレクトリです"
##内包リスト
set listResult to appFileManager's contentsOfDirectoryAtURL:ocidArgFilePathURL includingPropertiesForKeys:{refMe's NSURLPathKey} options:0 |error|:(reference)
###結果
set ocidContentsPathURLArray to item 1 of listResult
###リストの数だけ繰り返し
repeat with itemContentsPathURL in ocidContentsPathURLArray
###ゴミ箱に入れる
set listResult to (appFileManager's trashItemAtURL:itemContentsPathURL resultingItemURL:(missing value) |error|:(reference))
end repeat
else
#########################################
log "ファイルです"
###念のためFilderでも調べる
tell application "Finder"
set aliasArgFilePath to ocidArgFilePathURL as alias
set strPathKind to (kind of aliasArgFilePath) as text
end tell
###/tmpのような特殊フォルダの場合は処理しない
if strPathKind is "フォルダ" then
return "特殊ディレクトリかシンボリックリンクなので処理しません"
else
###ファイルをゴミ箱に入れる
set listResult to (appFileManager's trashItemAtURL:ocidArgFilePathURL resultingItemURL:(missing value) |error|:(reference))
end if
end if
return true
end doMoveToTrash
| 固定リンク
「Acrobat」カテゴリの記事
- Acrobat 対応OS macOS11が対象外になっていた(2025.01.16)
- [Acrobat]JavascriptAPI ファイルの結合でアプリケーションがクラッシュする(2025.01.04)
- PDF Embed ApiのHTMLソースの生成(2024.12.31)
- アドビ正規品サービス(AGS)の誤検知(このアドビアプリは非正規品であり、まもなく無効になります)(2024.12.26)
- Acrobat専用 関連プロセス全部終了させる(2024.12.22)
「Microsoft」カテゴリの記事
- [LINK]Teams 2(2024.11.21)
- [LINK]Teams Classic(2024.11.21)
- [bash] Microsoft Teams2 アップデート 途中(2024.08.20)
- Microsoft Teams classic キャッシュクリア(キャッシュをゴミ箱へ)(2024.01.06)
- Microsoft Teams (work or school)バージョンチェッカー(2024.01.04)
「Acrobat Reader」カテゴリの記事
- 【Acrobat Reader】SCA(single client app) Unified App版判定(2025.01.06)
- Acrobat Reader 2020 インストール アップデート(2020 Classic Track)(2024.12.03)
- [Acrobat Reader従来版]v2アップデータ(2024.12.01)
- [Acrobat Reader従来版]v23新規インストーラー(2024.12.01)
- Acroabtインストール済みの機器にAcrobat Readeを追加インストールする(URL変更)(2024.12.01)