Command line 可以用AHK创建这样的宏吗?
我有点像MMORPG游戏中的GM。我们的工作是举报使用欺骗手段的人,并将他们送进监狱。但离开监狱并不难,所以我们不得不一次又一次地送他们。我有一个龙的昵称列表(我有大约400个昵称要重复报道),所以这真的很无聊 我想问的是,我对AHK一无所知。如果这种宏是可能的,我会做一个Looong研究来创建这种宏。但如果这不可能,我甚至不会尝试 我需要的是;宏将按“回车”以激活聊天模式。然后写“/报告-骗子昵称-”,记住有400多个昵称,所以我需要为不同的昵称重复宏。写入“/报告-作弊者昵称-”后,宏将按enter键。然后会弹出一个小聊天框。宏将单击该框,写入报告原因,然后单击确认。然后会弹出另一个聊天框,说“您的报告已收到”,宏也会单击确认。并将以400多个昵称和400多个不同的理由来做这件事。这真的有可能吗?只是想知道。不要求您创建此宏。如果你回答这个问题,我会自己做:DCommand line 可以用AHK创建这样的宏吗?,command-line,macros,autohotkey,Command Line,Macros,Autohotkey,我有点像MMORPG游戏中的GM。我们的工作是举报使用欺骗手段的人,并将他们送进监狱。但离开监狱并不难,所以我们不得不一次又一次地送他们。我有一个龙的昵称列表(我有大约400个昵称要重复报道),所以这真的很无聊 我想问的是,我对AHK一无所知。如果这种宏是可能的,我会做一个Looong研究来创建这种宏。但如果这不可能,我甚至不会尝试 我需要的是;宏将按“回车”以激活聊天模式。然后写“/报告-骗子昵称-”,记住有400多个昵称,所以我需要为不同的昵称重复宏。写入“/报告-作弊者昵称-”后,宏将按e
谢谢。此脚本将在Google上执行一系列搜索。搜索字符串存储在文本文件中并读入数组,然后根据{Tab}键逐个执行(您可以自动重复此操作) 当脚本被中断时,您可以重新启动它并给它一个(新的)起始编号,或者告诉它重新从1开始 这不完全是你想要的,但它给了你很多出发点
#Persistent
#SingleInstance Force
#installKeybdHook
SetWorkingDir %A_ScriptDir%
TempDir = C:\Temp
Menu, Tray, Icon , %A_AhkPath%, 2, 1
TrayTip, JobSearch, Started, 1
SetTitleMatchMode, 2
TextCounter = 0
Return
+Launch_App1::
Run, Notepad %TempDir%\Google.txt
Return
Launch_App1:: ; vacatures Job Search
+CapsLock::
Restart:
MouseGetPos, XPos2, YPos2
XPos3 := 50
YPos3 := 100
IniRead, TextCounter, %TempDir%\GoogleCounter.ini, Counter, Nr
ArrayCount = 0
Loop, Read, %TempDir%\Google.txt ; This loop retrieves each line from the file, one at a time.
{
ArrayCount += 1 ; Keep track of how many items are in the array.
Array%ArrayCount% := A_LoopReadLine ; Store this line in the next array element.
}
MaxSearchCount = %ArrayCount%
TextCounter += 1
If (TextCounter > 1)
InputBox, TextCounter , Start, Number (1..%MaxSearchCount%),,,,,,,10,%TextCounter% ; InputBox, OutputVar [, Title, Prompt, HIDE, Width, Height, X, Y, Font, Timeout, Default]
TextCounter += 0
IniWrite, %TextCounter%, %TempDir%\GoogleCounter.ini, Counter, Nr
SearchText:=Array%TextCounter%
MouseClick, left
gosub, SendNewSearch
Return
;=======================================================================================================================================
Browser_Favorites:: ; Search for next Vacature string (Vacatures)
CapsLock::
If (TextCounter = 0) ; Restart with previous script if Textcounter is set to 0
{
GoSub, Restart
Exit
}
IniRead, TextCounter, %TempDir%\GoogleCounter.ini, Counter, Nr
TextCounter += 1
IniWrite, %TextCounter%, %TempDir%\GoogleCounter.ini, Counter, Nr
SearchText:=Array%TextCounter%
If (SearchText = "")
{
TextCounter := 0
IniWrite, %TextCounter%, %TempDir%\GoogleCounter.ini, Counter, Nr
Send, ^{F4}
SplashTextOff
ExitApp
}
Sleep, 200
Send, {Home 2}
Sleep, 700
Send, {WheelUp 10}
Sleep, 400
gosub, SendNewSearch
Exit
SendNewSearch:
MouseGetPos, XPos3 ,YPos3
SetTitleMatchMode, 2
IfWinActive, Chrome
{
while (A_Cursor = "AppStarting")
Sleep, 200 ; Continue
Sleep, 100
SplashTextOff
MouseClick, left, %XPos2%,%YPos2%
WinGetTitle, this_title, A
IfInString, this_title, Google
{
Send, {Home}+{End}{DEL}%SearchText%{Enter}
}
ToolTip, Waiting....
DisplayText = Nr%TextCounter% %SearchText%
Sleep, 500
SplashTextOn, 200, 0,%DisplayText%
WinMove, %DisplayText%, , 800, 25
ToolTip
;MouseMove,(50),(500)
MouseMove,%XPos3%,%YPos3%
ClipBoard = %SearchText%
}
Exit
Exit
+Browser_Favorites::
run, %TempDir%\Google.txt
Return
这是可能的。您可以创建两个txt文件,其中包含+400个用户名和+400个不同原因的列表。宏可以一行一行地读取数据,并可以使所有的东西,你想要的,超过400次 您将需要将txt文件中的行写入数组,一个循环用于使用
PixelGetColor
(http://www.autohotkey.com/docs/commands/PixelGetColor.htm)用于检测按钮。您还可以使用PixelGetColor
命令或将随安装的AutoIt3 Window Spy查看按钮的颜色。最后,您可以从这里开始编写代码(http://www.autohotkey.com/docs/)
抱歉,网站不允许我使用2个以上的超链接。基本上你是想写一个输入enter的脚本,然后再输入一个字符列表 您可以做的一件非常简单的事情是创建一个.txt文件,其中包含您希望它键入的所有内容(不包括回车符,行间除外),然后创建如下宏:
#n::
Loop, Read, inputFile.txt
{
Send {Enter}%A_LoopReadLine%{Enter}
}
return
基本上,你可以运行宏并打开游戏,这样你就可以开始键入enter、character information、enter,但要按windows键和“n”键。然后,宏将在“inputFile.txt”的每一行循环,并刺激输入一个enter、该行,然后输入一个enter。听起来可能,名称和原因列表来自哪里?
Send
和ControlClick
命令应该完成大部分工作。1.最好的解决办法是解决根本原因。i、 e.使系统更加健壮,防止“权力战争”,因为用户也可以编写Scipt来重新启用他们的帐户。我想你没有400个理由,但只有一手。我将创建一个带有用户ID+原因ID的txt文件,以及另一个带有原因ID和扩展文本的文件。通过这种方式,您不必重复原因文本400次,如果某些内容发生变化,您只需修改原因文本一次。