从Mac浏览器发送URL到Prowl(iOS)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了从Mac浏览器发送URL到Prowl(iOS)相关的知识,希望对你有一定的参考价值。
Use this script in Automator, and make a Service of it. Then give the service a shortcut in System Preferences -> KeyboardIn the script you have to switch the "SETT_INN_API-KODE_FRA_PROWL_HER" with a Prowl API code (https://www.prowlapp.com/api_settings.php). Prowl must be installed on iPhone too.
on run {input, parameters} tell application "System Events" to set FrontAppName to name of first process where frontmost is true if FrontAppName is "Firefox-bin" then tell application "Firefox" activate tell application "System Events" to keystroke "l" using {command down} tell application "System Events" to keystroke "c" using {command down} set linken to (the clipboard) end tell else if FrontAppName is "Google Chrome" then tell application "Google Chrome" activate tell application "System Events" to keystroke "l" using {command down} tell application "System Events" to keystroke "c" using {command down} set linken to (the clipboard) end tell else if FrontAppName is "Safari" then tell application "Safari" set linken to (set the clipboard to ((get URL of document 1) as string)) end tell else if FrontAppName is "Opera" then tell application "Opera" set linken to (set the clipboard to (get URL of front window)) end tell end if do shell script "curl -s -k https://prowl.weks.net/publicapi/add -F apikey=SETT_INN_API-KODE_FRA_PROWL_HER -F application=" & FrontAppName & " -F description=" & linken return input end run
以上是关于从Mac浏览器发送URL到Prowl(iOS)的主要内容,如果未能解决你的问题,请参考以下文章