Created
March 21, 2017 13:03
-
-
Save basictomonokai/ef0a8375c49a7819d41bd708c8d395ca to your computer and use it in GitHub Desktop.
ボタンテストのBASIC!プログラム
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.title "HTML test" | |
nxttest: | |
HTML.OPEN | |
HTML.LOAD.URL "btn.html" | |
xnextUserAction: | |
! loop until data$ is not "" | |
DO | |
HTML.GET.DATALINK data$ | |
UNTIL data$ <> "" | |
type$ = LEFT$(data$, 4) | |
data$ = MID$(data$,5) | |
! Act on the data type | |
! Shown are all the current data types | |
SW.BEGIN type$ | |
! Back Key hit. | |
! if we can go back then do it | |
SW.CASE "BAK:" | |
PRINT "BACK key: " + data$ | |
popup "終了します",0,0,0 | |
pause 2000 | |
end | |
SW.BREAK | |
! A hyperlink was clicked on | |
SW.CASE "LNK:" | |
PRINT "Hyperlink selected: "+ data$ | |
popup "リンク先をロード中",0,0,1 | |
! HTML.LOAD.URL data$ | |
browse data$ | |
SW.BREAK | |
! An error occured | |
SW.CASE "ERR:" | |
PRINT "Error: " + data$ | |
popup "エラーが発生しました 終了します",0,0,0 | |
pause 2000 | |
exit | |
SW.BREAK | |
! User data returned | |
SW.CASE "DAT:" | |
PRINT "User data: " + data$ | |
! Check for Exit | |
IF data$ = "//x//" then | |
PRINT "User ended demo." | |
HTML.CLOSE | |
popup "終了します",0,0,0 | |
pause 5000 | |
end | |
else | |
msx$=data$+"←データの内容" | |
popup msx$,0,0,0 | |
pause 1000 | |
goto xnextUserAction | |
ENDIF | |
SW.BREAK | |
! Form data returned. | |
! Note: Form data returning | |
! always exits the html. | |
SW.CASE "FOR:" | |
PRINT "Form data: "+data$ | |
popup "終了します",0,0,0 | |
pause 2000 | |
exit | |
SW.BREAK | |
SW.DEFAULT | |
PRINT "Unexpected data type:", type$ + data$ | |
popup "終了します",0,0,0 | |
pause 2000 | |
exit | |
SW.END | |
GOTO xnextUserAction | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment