Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ボタンテストのBASIC!プログラム
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
You can’t perform that action at this time.