【发布时间】:2016-05-17 20:15:45
【问题描述】:
我正在尝试编译我的脚本` 循环= 100
函数 OnEvent(event, arg)
如果按键(0x61)那么
x1, y1 = GetMousePosition()
结束
if keypress(0x62) then
i = 0
while (i<loops) do
if IsModifierPressed("lshift") then
i = loops
end
ReleaseKey("lshift")
if not IsModifierPressed("lshift") then
i=i+1
move1 = math.random(1300,1400)
move2 = math.random(1300,1400)
move3 = math.random(1300,1400)
MoveMouseTo(x1,y1)
Sleep(math.random(75,100))
PressMouseButton(3)
Sleep(math.random(75,100))
ReleaseMouseButton(3)
Sleep(math.random(75,100))
x1 = x1+move1
MoveMouseTo(x1,y1)
Sleep(math.random(75,100))
PressMouseButton(1)
Sleep(math.random(75,100))
ReleaseMouseButton(1)
Sleep(math.random(75,100))
if IsModifierPressed("lshift") then
i = loops
end
ReleaseKey("lshift")
MoveMouseTo(x1,y1)
Sleep(math.random(75,100))
PressMouseButton(3)
Sleep(math.random(75,100))
ReleaseMouseButton(3)
Sleep(math.random(75,100))
x1 = x1+move2
MoveMouseTo(x1,y1)
Sleep(math.random(75,100))
PressMouseButton(1)
Sleep(math.random(75,100))
ReleaseMouseButton(1)
Sleep(math.random(75,100))
if IsModifierPressed("lshift") then
i = loops
end
ReleaseKey("lshift")
MoveMouseTo(x1,y1)
Sleep(math.random(75,100))
PressMouseButton(3)
Sleep(math.random(75,100))
ReleaseMouseButton(3)
Sleep(math.random(75,100))
x1 = x1+move3
MoveMouseTo(x1,y1)
Sleep(math.random(75,100))
PressMouseButton(1)
Sleep(math.random(75,100))
ReleaseMouseButton(1)
Sleep(math.random(75,100))
if IsModifierPressed("lshift") then
i = loops
end
ReleaseKey("lshift")
x1 = x1-move1-move2-move3
end
end
MoveMouseTo(x1,y1)
Sleep(math.random(50,75))
PressMouseButton(3)
Sleep(math.random(50,75))
ReleaseMouseButton(3)
Sleep(math.random(50,75))
x1 = x1+move1
MoveMouseTo(x1,y1)
Sleep(math.random(50,75))
PressMouseButton(1)
Sleep(math.random(50,75))
ReleaseMouseButton(1)
x1 = x1-move1
结束 结束` 使用免费的pascal编译器进入.exe,每次运行编译器时都会收到错误(1,6)致命:语法错误,预期“开始”但找到“标识符循环” 致命:编译中止,我对编程还很陌生,我想知道出了什么问题
【问题讨论】:
-
每种语言,甚至是一种语言的每个特定变体,都需要自己特定的编译器或解释器。您不能混合使用语言和编译器并期望任何有意义的结果。因此,Pascal 编译器无法编译 Lua 程序,就像 Lua 解释器无法运行 Pascal 程序一样。