-
Save the following information in a "text document" with the name "1" echo off
echo 10000>
echo createobject(""^).sendkeys "">>
pause saves the extension to"bat"Just run it.
The key interval can be changed at "10000".
-
1、do while...loop: loops when the condition is true, which checks the condition before entering the loop.
2、do...loop while: When the condition is true, the condition is checked after the loop is run at least once.
3、do until...loop: When the condition is false for loops, check the condition before entering the loop.
4、do..loop until: When the condition is false for loops, check the condition after the loop runs at least once.
5、while...wend: Loop when the condition is ture.
6、for...next: Specify the number of cycles and use the counter to repeat the statement.
7、for each...next: For each item in the collection or element in the array, repeat each statement.
8、for each...in: Takes each element from a collection.
9. Loop nesting: It means that a small loop can be included in a large loop.
10. Forcibly exiting the cycle knows so much, hehe11
-
Loop statements include for-next, while-wend, and do-loop statements.
Let me introduce you to the simple usage of these statements:
for-next statement:
for variable = initial value to final value [step size].
Circulating bodies. next
When the value of the loop variable is within the range of the initial value to the final value, the statement block in the loop body is executed once, and the initial value is increased by one step length. If the value of the loop variable is not within the range of the initial value to the final value, the loop is exited and the next statement is executed. Flowchart of the for loop statement to excavate the thought line.
Wherein, step step can be omitted, and when omitted, step size = 1
For example: private sub form activate().
for i = 1 to 5 step 1
print i
nextend sub
In this example, after running the program, the following text will be written on the form:
Analysis: The variable i is cycled 5 times from the initial value 1 to the final value 5, and the value of i is output each time, and the value of i is added to the value of step 1So, but in the second loop, the value of i becomes 2
After cycle 5, the value of i becomes 5When relooping, i becomes 6, and the final value of 5 is over-checked, so the loop ends, and vb starts to run ** after the next statement.
do-loop statement:
DO Loop Body.
[exit do]
loops between do and loop. The exit do statement is optional because it is set to run the exit do statement when certain conditions are met, that is, to exit the loop.
For example: private sub form activate().
dim i as integer
i = 1do
print i
i = i + 1 'Each cycle increases the value of i by 1
if i > 5 then exit do 'When the value of i is greater than 5 (i.e., after loop 5), exit the loop.
loopend sub
It works the same as in the example above.
The above instructions are definitely not copied, and it is okay to give a little hard work, thank you
-
Since I'm here, I'll give you a very simple and simple pretending to be a burning matching digging loop statement: 1 100 self-adding.
As a result, it was");
int sum = 0;
int i;
for (i = 1; i<=100; i++)sum = sum + i;;
-
VB cycle in the for cycle is the most used, and when you use it, just learn it now, or you will learn it now, or you will learn it now, if you don't practice, you will forget it in a short time.
-
The 3 variables s, t, and u are the number of cycles of the 3 cycles, and the value of u is the easiest for x, and the number of cycles is u=3
The t-value is followed by x loops 3 times and y is nested within x.
x=1 y=1 to 1
x=2 y=1 to 2
x=3 y=1 to 3
So y=1+2+3=6 times t=6
z is nested within y.
x=1 y=1 to 1 z=1 to 3 3 cycles x=2 y=1 to 2 z=1 to 3 z=2 to 3 3+2 cycles.
x=3 y=1 to 3 z=1 to 3 z=2 to 3 z=3 to 3 3+2+1 cycles.
3 + 5 + 6 = 14 cycles.
Answer 14,6,3
Hu Shi said in the "Outline of the History of Chinese Philosophy": "If we use the term of Western political theory, we can say that Confucius's is 'daddy's policy';Mencius's is the 'mother's policy'. Daddy's policy is to be decent and moral; Mother's policy wants people to be happy and happy, and wants people to enjoy happiness. >>>More
LZ hello is like this.
The elves of the Sail are mutual. >>>More
Hello, according to some of the configurations you provided, I will calculate the other configurations for you, with**CPU: Intel i3 2120 yuan. >>>More
Hello! You asked: Please help me analyze the astrolabe?
This is one I've been using! But most of them are acceptable! >>>More
Aren't you asking about the display desk handle? XP settings are right-clicked on the taskbar, toolbar, quick launch, click tick, 7 There is a square on the far right of the taskbar, and one click will return to the desktop. If your quick-launch real-life desktop is gone, in the Windows operating system, the actual location of the desktop icon in the taskbar (quick launch bar) is "C:." >>>More