Joke Collection Website - Public benefit messages - How to write a verification code to verify whether the input verification code is the same as that in the picture?

How to write a verification code to verify whether the input verification code is the same as that in the picture?

Components:

Sketchpad 1 (Sketchpad background color = white)

Button 1 (title = refresh)

Button 2 (Title = OK)

Edit box 1

Assembly variables: validation code, text type

Here is the source code:

Version 2

. Subroutine _ button 1_ was clicked.

Symbol used for local variables, text type, "0", and the symbol to be used can have Chinese characters.

Symbols used = {A, B, C, D, E, F, G, H, I, J, K, L, M, N and O. "2 ","3 ","4 ","5 ","6 ","7 ","8 "and" 9 ".

Verification code = ""'Clear it.

Number of digits of the first (4,) verification code of the counting period.

Verification code = verification code+symbol used [take random number (1, take the number of array members (symbol used))]

. Count cycle tail ()

Sketchpad 1. Clear (,,,)

Sketchpad 1. Font. Font size = 20

Sketchpad 1. Write a line of text (verification code)

. Subroutine _ Button 2_ was clicked.

If (edit box 1. Content = verification code)

Information box ("Correct", 0, "")

Otherwise.

Information box ("Error", 0, "")

If it's over