mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-27 05:32:51 +08:00
38 lines
634 B
Plaintext
38 lines
634 B
Plaintext
opengt
|
|
set com 115200n81
|
|
set comecho off
|
|
set senddelay 0.02
|
|
waitquiet 0.2 0.2
|
|
|
|
send "AT+CUSD=1,\"*111#\",15^m"
|
|
waitfor 10 "0 Wyjscie"
|
|
if % = -1 goto noresponse
|
|
|
|
send "AT+CUSD=1,\"1\",15^m"
|
|
waitfor 10 "0 Wyjscie"
|
|
if % = -1 goto noresponse
|
|
|
|
let c=20
|
|
send "AT+CUSD=1,\"3\",15^m"
|
|
:loop
|
|
get 1 "^m" $s
|
|
if c=0 goto exit
|
|
if len($s) < 6 goto toshort
|
|
if $mid($s,1,5) = "+CUSD" goto ok
|
|
:toshort
|
|
let c=c-1
|
|
sleep 1
|
|
goto loop
|
|
:ok
|
|
let $s=$right($s,len($s)-10)
|
|
print $s,"\"\n"
|
|
|
|
:exit
|
|
send "AT+CUSD=1,\"0\",15^m"
|
|
waitfor 10 "Dziekujemy"
|
|
exit 0
|
|
|
|
:noresponse
|
|
print "Problem operatora - brak możliwości sprawdzenia..."
|
|
exit 0
|