[英]Is a mouse click on a remote desktop possible using AutoIt or alternatives?
[英]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 函數。 如果您仍然使用批處理,您可以創建一個如下所示的文件:
Sleep(250)
MouseClick("left")
進而
@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));
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.