2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Finderで選択しているフォルダ・ファイルを2022以降のAdobe Bridgeに開かせるAppleScript

Last updated at Posted at 2024-03-23

Keyboard Maestroで実行させたり、スクリプトエディタでアプリケーションにしてFinderウインドウのツールバーに置いてもよいですね。

Bridgeが本当にAppleScript非対応になってしまったため、従来の
・選択したファイルを、Bridgeウインドウ内で選択状態で開く
という動作ができなくなりました。

いや実際にはできるんですが、jsxなどを渡すとBridgeが開こうとしやがるので、しょうがなく上位フォルダを開かせるに留めています。

まぁ無いとあるとでは大違いなんで、使ってみてください。

OpenBridge.scpt
-- Bridge2024以前はidにバージョン番号が付くので調べて書き換える
set myBridge to application id "com.adobe.bridge"
set myBridgeName to name of myBridge
tell myBridge to activate

tell application "System Events"
	
	set waitCount to 0
	repeat until exists application process myBridgeName
		delay 0.1
		set waitCount to waitCount + 1
		if waitCount > 50 then error "Bridge起動失敗"
	end repeat
	
	tell process myBridgeName to click menu item 1 of menu 1 of menu bar item 3 of menu bar 1
	
end tell

tell application "Finder"
	set mySel to selection
	if mySel is {} then
		set myPATH to insertion location as alias
	else
	
		set myPATH to item 1 of mySel as alias
		
		try
			set myPATH to original item of myPATH as alias
		end try
		
		if (class of myPATH) is folder then
			set myPATH to container of myPATH as alias
		end if
		
	end if
end tell

set myPATH to POSIX path of myPATH
do shell script "open -a " & quoted form of myBridgeName & " " & quoted form of myPATH
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?