[AppleScripts]WIFIバーコードを作成(QR)
(*
WIFIバーコードをダウンロードします
iosで使われる
QR形式
googleのAPIを使います
*)
--設定2項目
--SSID
set theSSID to "wifiA"
--パスワード
set thePSK to "password"
---------------------------------------------------------
set theMakeQrCodeUrl to ("https://chart.googleapis.com/chart?&cht=qr&chs=540x540&choe=UTF-8&chld=Q&chl=WIFI:S:" & theSSID & ";T:WPA;P:" & thePSK & ";;") as text
try
set theComandText to ("curl -L -o ~/Downloads/" & theSSID & ".qr.png '" & theMakeQrCodeUrl & "' --connect-timeout 20") as text
do shell script theComandText
on error
"ダウンロードに失敗しました"
return
end try
set theFilePath to ((the path to downloads folder from user domain) & theSSID & ".qr.png") as text
tell application "Finder"
activate
open folder (the path to downloads folder from user domain)
select theFilePath
end tell
| 固定リンク
« [Adobe Developer]Acrobat & Acrobat Reader DC Release Notes | トップページ | [AppleScripts]WIFIバーコードを作成(データマトリックス) »
「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)