« [Adobe Developer]Acrobat & Acrobat Reader DC Release Notes | トップページ | [AppleScripts]WIFIバーコードを作成(データマトリックス) »

[AppleScripts]WIFIバーコードを作成(QR)


ダウンロード - wifiバーコード.zip


(*
WIFIバーコードをダウンロードします
iosで使われる
QR形式
googleAPIを使います


*)
--設定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」カテゴリの記事