Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
29
Task/HTTPS/M2000-Interpreter/https.m2000
Normal file
29
Task/HTTPS/M2000-Interpreter/https.m2000
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
Module CheckIt {
|
||||
Declare xml "Microsoft.XMLHTTP"
|
||||
const testUrl$ = "https://georgekarras.blogspot.com/"
|
||||
With xml, "readyState" as ReadyState
|
||||
Method xml "Open", "Get", testUrl$, True ' True means Async
|
||||
Method xml "send"
|
||||
\\ We set a thread to count time
|
||||
k=0
|
||||
Thread {
|
||||
k++
|
||||
} as TimeOut interval 100
|
||||
\\ In main thread we can check ReadyState and Mouse button
|
||||
Task.Main 100 {
|
||||
Print ReadyState
|
||||
If ReadyState=4 then exit
|
||||
if k>20 then exit ' 20*100= 2 sec
|
||||
if mouse then exit ' exit if mouse click
|
||||
}
|
||||
\\ So now we can read
|
||||
if ReadyState=4 then {
|
||||
With xml, "responseText" AS AA$
|
||||
\\ break AA$ to lines
|
||||
Document BB$=AA$
|
||||
\\ using line breaks as CRLF
|
||||
Report BB$
|
||||
}
|
||||
Declare xml Nothing
|
||||
}
|
||||
CheckIt
|
||||
Loading…
Add table
Add a link
Reference in a new issue