-->
Page 1 of 1

WIFI scanner pimped a little

PostPosted: Mon May 21, 2018 1:52 pm
by Reijndert
I pimped the wifi scanner code a little.
However, i'm struggling with the 'scan again' button. How do i make it refesh the screen instead of adding to it?

let quote = chr(34) 'dubbele quote

n = wifi.scan()
html "<b>"
html "Number of "& quote & "network found = "
html n
html "</b>"
html "<hr>"

html "<TABLE BORDER=" & quote & "1" & quote & ">"
html "<TR><TH>SSID</TH><TH>dBM</TH><TH>INDICATOR</TH><TH>QUALITY</TH></TR>"

html "<TR>"
for x = 1 to n

html "<TD>"
html wifi.ssid(x)
html "<TD> "
html wifi.rssi(x)

let q = wifi.rssi(x)
let r = "Amazing"

html "<TD>"
for y = q * -1 to 94
html "|"
next y

if q < -35 then
let r = "Super good"
endif

if q < -50 then
let r = "Very good"
endif

if q < -70 then
let r = "Acceptable"
endif


if q < -80 then
let r = "Not so good"
endif


if q < -90 then
let r = "<b>Unusable</b>"
endif

html "<TD>"
html r & " quality"
html "</TD>"
html "</TR>"
next x
html "</TABLE>"


button "Scan again", [DoItAgain]
wait

[DoItAgain]
run
wait

Re: WIFI scanner pimped a little

PostPosted: Wed May 23, 2018 2:06 pm
by Luc Volders
Put verything in text-boxes.
They can easily be updated.

Luc

Re: WIFI scanner pimped a little

PostPosted: Mon Mar 18, 2019 5:41 am
by MegaHurtz
Reijndert wrote:However, i'm struggling with the 'scan again' button. How do i make it refesh the screen instead of adding to it?

A less elegant solution would be to simply clear the screen at button press:

Code: Select all[DoItAgain]
cls
run
wait