○引数に与えた数字を、順番にキー入力してくれる関数
Function Num2Key(nNumber)
Dim nExponent=0 //指数
Dim buff
buff = Val(nNumber)
While True
buff = buff / 10
If buff < 1 Then Break
nExponent = nExponent + 1
WEnd
For i=0 To nExponent
buff = Val(nNumber)
For j=1 To nExponent-i
If buff < 10 Then Break
buff = int(buff / 10)
Next
buff = buff mod 10
Select buff
case 1
Kbd(VK_1)
case 2
Kbd(VK_2)
case 3
Kbd(VK_3)
case 4
Kbd(VK_4)
case 5
Kbd(VK_5)
case 6
Kbd(VK_6)
case 7
Kbd(VK_7)
case 8
Kbd(VK_8)
case 9
Kbd(VK_9)
case 0
Kbd(VK_0)
SelEnd
Sleep(0.1)
Next
Result=nNumber
FEnd
|