在当前文件夹新建文件
- 自动化操作,新建程序
- 拖入 applescript脚本
- 复制以下代码,运行一遍,保存
- 先运行一遍,允许对finder和systemevent的权限
- 然后可以对其进行图标复制粘贴修改
- 最后拖到到finder工具栏使用。
on run {input, parameters}
tell application "Finder"
set selection to make new file at (get insertion location)
end tell
return input
end run
访达当前文件夹进入终端-1
可行,不推荐,屏显信息过多
- 自动化操作,新建程序
- 拖入 applescript脚本
- 复制以下代码,运行一遍,保存
- 先运行一遍,允许对finder和systemevent的权限
- 然后可以对其进行图标复制粘贴修改
- 最后拖到到finder工具栏使用。
on run {input, parameters}
tell application "Finder"
set myWin to window 1
set thePath to (quoted form of POSIX path of (target of myWin as alias))
if application "Terminal" is running then
tell application "Terminal"
do script "cd " & thePath
activate
end tell
else
tell application "Terminal"
do script "cd " & thePath in window 1
activate
end tell
end if
end tell
end run
访达当前文件夹进入终端-1
推荐,屏显信息少
- 自动化操作,新建程序
- 拖入 applescript脚本
- 复制以下代码,运行一遍,保存
- 先运行一遍,允许对finder和systemevent的权限
- 然后可以对其进行图标复制粘贴修改
- 最后拖到到finder工具栏使用。
on run {input, parameters}
tell application "Finder"
set pathList to (quoted form of POSIX path of (folder of the front window as alias))
end tell
tell application "System Events"
do shell script "open -a Terminal " & pathList
end tell
return input
end run
Finder当前文件夹采用QRCP进行传输
针对qrcp的一个实例(发送)
- 自动化操作,新建程序(或者新建快速操作也可以)
- 拖入 applescript脚本(如果是新建快速操作则需要先添加一个获取所选的访达项目)
- 复制以下代码,运行一遍,保存(如果是快速操作,则直接保存后,会出现在访达选择右键菜单中)
- 先运行一遍,允许对finder和systemevent的权限
- 然后可以对其进行图标复制粘贴修改
- 最后拖到到finder工具栏使用。
备注:
- 测试的时候一定要确保当前finder中存在选中项目。否则会出错。
- qrcp除非主动性添加--zip除外,默认会自动识别文件夹压缩,文件不压缩的方式。
on run {input, parameters}
tell application "Finder"
set myWin to window 1
--set thePath to (quoted form of POSIX path of (target of myWin as alias))
--上面这行命令是获取当前文件夹的路径,下面这句属于当前所选的路径(文件或者文件夹)
set filePath to (quoted form of POSIX path of (the selection as alias))
if application "Terminal" is running then
tell application "Terminal"
do script "qrcp " & filePath
activate
end tell
else
tell application "Terminal"
do script "qrcp " & filePath in window 1
activate
end tell
end if
end tell
end run
针对qrcp的一个实例(接收)
- 自动化操作,新建程序(或者新建快速操作也可以)
- 拖入 applescript脚本(如果是新建快速操作则需要先添加一个获取所选的访达项目)
- 复制以下代码,运行一遍,保存(如果是快速操作,则直接保存后,会出现在访达选择右键菜单中)
- 先运行一遍,允许对finder和systemevent的权限
- 然后可以对其进行图标复制粘贴修改
- 最后拖到到finder工具栏使用。
备注:
默认当前访达窗口所在的文件夹。
on run {input, parameters} tell application "Finder" set myWin to window 1 set thePath to (quoted form of POSIX path of (target of myWin as alias)) --上面这行命令是获取当前文件夹的路径,下面这句属于当前所选的路径(文件或者文件夹) --set filePath to (quoted form of POSIX path of (the selection as alias)) if application "Terminal" is running then tell application "Terminal" do script "qrcp receive --output=" & thePath activate end tell else tell application "Terminal" do script "qrcp receive --output=" & thePath in window 1 activate end tell end if end tell end run