【QR】ブラウザで表示中のURLをQRコードにする(Google Chart利用)
ユーザーのアプリケーションスクリプトフォルダに入れて使います。
(*
Url2QR4Safari.scpt
サファリで開いているページのQRを作成します。
たぶんiOS専用
20190706 初回作成
APIの仕様は
https://developers.google.com/chart/infographics/docs/qr_codes
*)
tell application "Safari"
activate
tell window 1
set theChl to do JavaScript "encodeURIComponent(document.URL)" in front document
end tell
end tell
--API各項目
--BASE URL
set theApiUrl to "https://chart.googleapis.com/chart?" as text
set theCht to "qr" as text
set theChs to "540x540" as text
set theChoe to "UTF-8" as text
---L M Q R
set theChld to "Q" as text
--URLを整形
set theOpenUrl to ("" & theApiUrl & "&cht=" & theCht & "&chs=" & theChs & "&choe=" & theChoe & "&chld=" & theChld & "&chl=" & theChl & "") as text
-----サファリで開く
tell application "Safari"
activate
make new document with properties {name:"QR-CODE by Google API"}
tell window 1
open location theOpenUrl
end tell
end tell
| 固定リンク
「Barcode2D」カテゴリの記事
- [LINE]QRコード各種(2023.08.29)
- 【QR】イベント・カレンダー登録用のQRコードを作る(Google Chart利用)(2022.01.06)
- 【QR】アドレス帳登録用のQRコードを作る(Google Chart利用)(2021.12.06)
- [Wifi]Wifiアクセスポイント用のmobileconfigを作成する(2021.11.02)
- [AppleScripts]WIFIバーコードを作成(データマトリックス)(2021.08.29)



[RSS]