« [Shortcuts]AppleScriptメニューから実行する | トップページ | [Notes]個別のnoteはAppleScriptで複製(duplicate)出来ない »

[Icon]エイリアスファイルにアイコン貼って→出ないようにする

要はこうゆう事です

_20220314_19_18_42
osxiconutilsを利用しています
https://github.com/sveinbjornt/osxiconutils

ダウンロード - makecloudstorageicon.zip




#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#osxiconutilsを使用しています許諾は以下を参照ください
#https://github.com/sveinbjornt/osxiconutils
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions





tell application "Finder"
set theBinDir to POSIX path of (folder "bin" of (container of (path to me)) as alias) as text
end tell

set theBinFile to ("\"" & theBinDir & "seticon\"") as text
log theBinFile

tell application "Finder"
set aliasCloudStorageDir to (folder "Creative Cloud Files" of (path to home folder from user domain)) as alias



set theFolderName to name of aliasCloudStorageDir as text
make new alias to folder aliasCloudStorageDir at (path to desktop folder from user domain)
try
set name of result to theFolderName
on error
log "すでに同名のファイルかフォルダかエイリアスがあります"
end try
set theDistPath to POSIX path of (path to desktop folder from user domain)
end tell

set theDistPath to ("\"" & theDistPath & "" & theFolderName & "\"")

log theBinFile

set strIconPath to "\"/Applications/Utilities/Adobe Sync/CoreSync/Core Sync.app/Contents/Resources/creativecloud_folder.icns\""

set strCommandText to "" & theBinFile & " " & strIconPath & " " & theDistPath & ""
log strCommandText
do shell script strCommandText

set strCommandText to "" & theBinFile & " " & strIconPath & " \"$HOME/Creative Cloud Files\""
log strCommandText
do shell script strCommandText

|

« [Shortcuts]AppleScriptメニューから実行する | トップページ | [Notes]個別のnoteはAppleScriptで複製(duplicate)出来ない »

AppleScript Finder」カテゴリの記事

AppleScript Bash」カテゴリの記事

AppleScript CloudStorage」カテゴリの記事