AutoIt 鼠标点击似乎不起作用
AutoIt Mouse Click doesn't seem to be working
我做了一个批处理文件,我需要它来点击屏幕。我知道你不能只用一个批处理文件来做到这一点,所以我下载了 Autoit。然而,每次我 运行 我的代码,它都说 MouseClick 不是一个有效的命令。我下载了 AutoIt 并重新下载,但它一直显示相同的消息。
@if (@CodeSection == @Batch) @then
@echo off
start "" http://www.getluckee.com/games/5
set SendKeys=CScript //nologo //E:JScript "%~F0"
Timeout 18
nircmd setcursor 700 400
set _number=0
:action
if %_number%==100 goto :end
%SendKeys% "{LEFT}"
%SendKeys% "{DOWN}"
%SendKeys% "{RIGHT}"
%SendKeys% "{UP}"
echo %_number%
set /a _number +=1
goto :action
:end
Timeout 5
nircmd setcursor 830 140
Timeout 2
MouseClick("left")
Timeout 10
%SendKeys% "exit{ENTER}"
goto :EOF
@end
// JScript section
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));
您的批处理脚本中似乎有 AutoIt 函数。如果您仍然设置使用批处理,您可以创建如下文件:
leftClick.au3
Sleep(250)
MouseClick("left")
然后
myBatch.bat
@if (@CodeSection == @Batch) @then
@echo off
start "" http://www.getluckee.com/games/5
set SendKeys=CScript //nologo //E:JScript "%~F0"
Timeout 18
nircmd setcursor 700 400
set _number=0
:action
if %_number%==100 goto :end
%SendKeys% "{LEFT}"
%SendKeys% "{DOWN}"
%SendKeys% "{RIGHT}"
%SendKeys% "{UP}"
echo %_number%
set /a _number +=1
goto :action
:end
Timeout 5
nircmd setcursor 830 140
Timeout 2
START leftClick.au3
Timeout 10
%SendKeys% "exit{ENTER}"
goto :EOF
@end
// JScript section
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));
我做了一个批处理文件,我需要它来点击屏幕。我知道你不能只用一个批处理文件来做到这一点,所以我下载了 Autoit。然而,每次我 运行 我的代码,它都说 MouseClick 不是一个有效的命令。我下载了 AutoIt 并重新下载,但它一直显示相同的消息。
@if (@CodeSection == @Batch) @then
@echo off
start "" http://www.getluckee.com/games/5
set SendKeys=CScript //nologo //E:JScript "%~F0"
Timeout 18
nircmd setcursor 700 400
set _number=0
:action
if %_number%==100 goto :end
%SendKeys% "{LEFT}"
%SendKeys% "{DOWN}"
%SendKeys% "{RIGHT}"
%SendKeys% "{UP}"
echo %_number%
set /a _number +=1
goto :action
:end
Timeout 5
nircmd setcursor 830 140
Timeout 2
MouseClick("left")
Timeout 10
%SendKeys% "exit{ENTER}"
goto :EOF
@end
// JScript section
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));
您的批处理脚本中似乎有 AutoIt 函数。如果您仍然设置使用批处理,您可以创建如下文件:
leftClick.au3
Sleep(250)
MouseClick("left")
然后
myBatch.bat
@if (@CodeSection == @Batch) @then
@echo off
start "" http://www.getluckee.com/games/5
set SendKeys=CScript //nologo //E:JScript "%~F0"
Timeout 18
nircmd setcursor 700 400
set _number=0
:action
if %_number%==100 goto :end
%SendKeys% "{LEFT}"
%SendKeys% "{DOWN}"
%SendKeys% "{RIGHT}"
%SendKeys% "{UP}"
echo %_number%
set /a _number +=1
goto :action
:end
Timeout 5
nircmd setcursor 830 140
Timeout 2
START leftClick.au3
Timeout 10
%SendKeys% "exit{ENTER}"
goto :EOF
@end
// JScript section
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));