Corleone
Well-Known Member
- Joined
- May 24, 2013
- Messages
- 2,255
A simple method to implement an anti AFK behavior with Windows standard applications
is running a VBScript in the background as a Windows process.
This always works without stressing one or more Honorbuddy processes by reducing
their CPU/FPS load, because it is completely independent from HB.
Q: How to run the Anti-AFK script
A: Copy the script into a text editor and adjust the "step left" and "step right" keys
to your needs (short instruction on top of the script).
After that, save the script with the extension "something.VBS" to your harddisk.
Now start your WoW.
You are ready to start Anti-AFK by a double-click on your VBS file now. That's all.
The script terminates itself after the last WoW instance has been closed and the actual
executed time lapse expired.
Otherwise you can terminate the process by opening your taskmanager and kill wscript.exe.
Q: What does the script do?
A: After each time lapse, the script brings the (stacked) WoW window(s) on top and lets your
toon step left-right for about 1 millisecond.
This ist almost not detectable (makes 1 or 2 pixels) and surely not as conspicious
than making a jump or other funny contortions.
Q: This script doesn't work on my PC
A: First you have to check, if your Windows has Windows Scripting Host (WSH) installed,
which should be delivered with Windows by default.
Open START -> Run, write wscript.exe into the input field and then hit OK.
If a "WSH Options" window opens, everything is ok.
Otherwise install Windows Script from Microsoft:
Windows Script 5.6 aus dem Microsoft Download Center herunterladen.
This script is designed for fishing. It's not tested for other purposes, but should work likewise for idling around.
However, you should better terminate the script before fighting in dungeons for example, because the steps may cancel your spell casts.
Have fun.
is running a VBScript in the background as a Windows process.
This always works without stressing one or more Honorbuddy processes by reducing
their CPU/FPS load, because it is completely independent from HB.
Q: How to run the Anti-AFK script
A: Copy the script into a text editor and adjust the "step left" and "step right" keys
to your needs (short instruction on top of the script).
After that, save the script with the extension "something.VBS" to your harddisk.
Now start your WoW.
You are ready to start Anti-AFK by a double-click on your VBS file now. That's all.
The script terminates itself after the last WoW instance has been closed and the actual
executed time lapse expired.
Otherwise you can terminate the process by opening your taskmanager and kill wscript.exe.
Q: What does the script do?
A: After each time lapse, the script brings the (stacked) WoW window(s) on top and lets your
toon step left-right for about 1 millisecond.
This ist almost not detectable (makes 1 or 2 pixels) and surely not as conspicious
than making a jump or other funny contortions.
Q: This script doesn't work on my PC
A: First you have to check, if your Windows has Windows Scripting Host (WSH) installed,
which should be delivered with Windows by default.
Open START -> Run, write wscript.exe into the input field and then hit OK.
If a "WSH Options" window opens, everything is ok.
Otherwise install Windows Script from Microsoft:
Windows Script 5.6 aus dem Microsoft Download Center herunterladen.
This script is designed for fishing. It's not tested for other purposes, but should work likewise for idling around.
However, you should better terminate the script before fighting in dungeons for example, because the steps may cancel your spell casts.
Have fun.

Code:
' Anti-AFK for single or multiple WoW sessions
' --------------------------------------------
' coded by Corleone, 12/2013
'
' Assign 2 keys of your choice in WoW for sideward moving to the left and to the right,
' or use your already predefined keys.
' Alter those keys in the user config section below (in quotation marks!) as described:
'
' i.e. "A" for left, "D" for right,
' or as presetted here as an example "%{left}" = ALT+left arrow, "%{right}" = ALT+right arrow
'
' Special keys are SHIFT = +, CTRL = ^, ALT = %
' Non-ASCII keys have to be enclosed in curly brackets { }, i.e. "^{F12}" for CTRL-F12
' You can find more keycodes here: http://msdn.microsoft.com/en-us/library/8c6yea83
'
' This VBS script accepts a numeric value of milliseconds as start parameter for the repetition time.
' Default value is 200000 milliseconds if no parameter is passed.
' The script closes automatically when no more WoW instances are running and the iteration expires.
On Error Resume Next
' ########################### begin user config
strStepLeft = "%{left}"
strStepRight = "%{right}"
' ########################### end user config
Set WshShell = Wscript.CreateObject("WScript.Shell")
Set args = WScript.Arguments
num = args.Count
if num = 0 then
n = 200000
else
n = args(0)
end if
strComputer = "."
strExeName = "Wow.exe"
Do
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("Select * from Win32_Process")
numCount = 0
For Each objProcess in colProcessList
If Instr(1, objProcess.Name, strExeName) then
numCount = numCount + 1
End If
Next
If numCount = 0 then
Exit Do
End If
For Each objProcess in colProcessList
colPID = objProcess.processID
colName = objProcess.Name
If Instr(1, colName, strExeName) then
WshShell.AppActivate colPID
WshShell.sendkeys strStepLeft
WshShell.sendkeys strStepRight
End If
Next
Wscript.sleep n
Loop
MsgBox "No running WoW instance found. Terminating AntiAFK now.",0,"AntiAFK VBS"
Last edited: