Niv Posted September 21, 2005 Posted September 21, 2005 (edited) Been making a World of Warcraft AutoIt script. What this script basicly does is spam SPACE every 2-4 minutes. First it goes into a standby mode (infinitely loops). Then when I press the PAUSE key it initiates the anti afk routine and hits space every 2-4 minutes. Up to this part it works. Now when I hit PAUSE it does pause as I want it to. Now the problem is, when I hit PAUSE again to resume it, it doesn't. Why? I'd like it to be able to pause and resume. I can start, I can pause, but then I can't resume it. No idea why Know any further tricks to improve or shorten my script? Thanks in advance. Code below: WinWaitActive("World of Warcraft") HotKeySet("{pause}","activate") HotKeySet("!{pause}","inactive") While 1 $a = 0 inactive() $a = 0 start() WEnd func inactive() Do Until $a = 1 EndFunc func activate() $a = 1 EndFunc func start() Do Send("{SPACE}") Sleep(Random(120000,240000)) Until $a = 1 EndFunc func quit() Exit EndFunc Edited September 21, 2005 by Niv
Dragosani Posted September 21, 2005 Posted September 21, 2005 I also play WoW and I can't think of any good reason why you would want to do this.
Valuater Posted September 21, 2005 Posted September 21, 2005 like this HotKeySet("{PAUSE}", "TogglePause") Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc hope that helps... bty... how does this script help wow? 8)
Niv Posted September 21, 2005 Author Posted September 21, 2005 This script helps WoW for a simple reason. I play the European version of WoW and they haven't fixed /afk flag reseting upon joining a battleground instance. What this means is that if I afk for longer than 5 minutes, the /afk flag gets attached to me. I'm sitting in the battleground queue, a spot becomes available, my autojoin addon then autojoins it. Then I get kicked from the battleground because I had the /afk flag. Blizzard said that joining a battleground should reset your /afk but it doesn't. They need to hotfix it, otherwise you get kicked everytime. Queues take about 20-40 minutes and I can assure you I don't feel like coming every 5 minutes to my computer and hitting the space button.
seandisanti Posted September 21, 2005 Posted September 21, 2005 This script helps WoW for a simple reason. I play the European version of WoW and they haven't fixed /afk flag reseting upon joining a battleground instance. What this means is that if I afk for longer than 5 minutes, the /afk flag gets attached to me. I'm sitting in the battleground queue, a spot becomes available, my autojoin addon then autojoins it. Then I get kicked from the battleground because I had the /afk flag. Blizzard said that joining a battleground should reset your /afk but it doesn't. They need to hotfix it, otherwise you get kicked everytime. Queues take about 20-40 minutes and I can assure you I don't feel like coming every 5 minutes to my computer and hitting the space button.one issue you're probably going to run into is key trapping within the WoW application. i know with FFXI in order to enable your own hotkeys etc, you have to be running with a windower program. Depending on the type of feedback you're able to return from the WoW application, you may want to setup another trigger...one thing i've done before was PixelChecksum() for the first 4 characters in the chat box. i could then use a 4 character string typed into chat to trigger the function in an already running script...
Niv Posted September 21, 2005 Author Posted September 21, 2005 Cameronsdad, fortunately the pause key works well and WoW does not interfere with it. Valuater, much thanks, your bit of code really helped a lot! I've revised it, I know the code isn't perfect, but most important of all the app works as intended. Clicking pause starts it, clicking pause again stops it, rinse and repeat. Is there any way to display the ToolTip('AntiAFK started.',0,0) in a smooth manner? Even if I set it to display for 1 or 2 seconds. For those 2 seconds it flashes and blinks very fast, like if there was some problem with the refresh rate or whatever. Is there any way to display the ToolTip smoothly? Here's the revised code that works: WinWaitActive("World of Warcraft") HotKeySet("{PAUSE}", "TogglePause") HotKeySet("!{PAUSE}","Quit") Dim $Paused TogglePause() While 1 Start() WEnd func Start() ToolTip('AntiAFK started.',0,0) Sleep(1000) ToolTip("") While 1 Send("{SPACE}") Sleep(Random(120000,240000)) WEnd EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused WEnd Start() EndFunc func Quit() Exit EndFunc
Valuater Posted September 21, 2005 Posted September 21, 2005 maybe this... cant test it WinWaitActive("World of Warcraft") HotKeySet("{PAUSE}", "TogglePause") HotKeySet("!{PAUSE}","Quit") Dim $Paused TogglePause() While 1 ;Start() Sleep(20) WEnd func Start() ToolTip('AntiAFK started.',0,0) Sleep(2000) ToolTip("") While 1 Send("{SPACE}") Sleep(Random(120000,240000)) WEnd EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused Sleep(20) WEnd Start() EndFunc func Quit() Exit EndFunc 8)
Niv Posted September 21, 2005 Author Posted September 21, 2005 Nope, the text box still blinks to hell and back for 1-2 sec if not shorter. When I increase the sleep time to 5000, it gives the same effect. But the script itself works well.
Valuater Posted September 21, 2005 Posted September 21, 2005 do you want the tip to show ALL the time that the start function is running?? 8)
Niv Posted September 21, 2005 Author Posted September 21, 2005 No, I want it to be shown for only 1-2 seconds. Right now it blinks very fast for that 1 second or so. Even if you set the tooltip to display infinitely it will keep on blinking all the time. My ideal would be that it stays there smoothly and does not blink/distort.
Valuater Posted September 21, 2005 Posted September 21, 2005 (edited) not on mine ( win Xp ) it does not blink ... just shows for 2 secs and gone 8) Edited September 21, 2005 by Valuater
Niv Posted September 22, 2005 Author Posted September 22, 2005 Oh, you misunderstood me then. It does display smoothly on the Windows Xp desktop of course. However it blinks and distorts when I'm in World of Warcraft full screen mode (1280x1024 85Hz 24bits). It must be some kind of synchronisation display problem, any way to counter it?
Valuater Posted September 22, 2005 Posted September 22, 2005 It must be some kind of synchronisation display problem, any way to counter it?I Seriously doubt it8)
CWW256 Posted September 26, 2005 Posted September 26, 2005 It must be some kind of synchronisation display problem, any way to counter it?Not with World of Warcraft in fullscreen mode.
Knight Posted September 27, 2005 Posted September 27, 2005 I changed it around a little, it works perfect. WinWaitActive("World of Warcraft") HotKeySet("{PAUSE}", "Start") HotKeySet("!{PAUSE}","Quit") TogglePause() func Start() HotKeySet("{PAUSE}") HotKeySet("{PAUSE}", "TogglePause") ToolTip('AntiAFK started.',0,0) While 1 Send("{SPACE}") Sleep(Random(120000,240000)) WEnd EndFunc Func TogglePause() ToolTip('AntiAFK Stopped.',0,0) HotKeySet("{PAUSE}") HotKeySet("{PAUSE}", "Start") While 1 sleep(100) WEnd EndFunc func Quit() Exit EndFunc
Guest neotk5 Posted September 28, 2005 Posted September 28, 2005 Hey, how do you get this to work, i downloaded autoit script, can you tell me what the steps are to running the script, i have the same problem as you, thank you. Hey, I have the same problem as you do, can you tell me how to run this script, I got autoit script but do not know the next steps.
gamerman2360 Posted September 30, 2005 Posted September 30, 2005 If you want the tooltip to show, use WOW in maximized window mode.
RantanplanBK Posted October 7, 2005 Posted October 7, 2005 I changed it around a little, it works perfect.WinWaitActive("World of Warcraft") HotKeySet("{PAUSE}", "Start") HotKeySet("!{PAUSE}","Quit") TogglePause() func Start() HotKeySet("{PAUSE}") HotKeySet("{PAUSE}", "TogglePause") ToolTip('AntiAFK started.',0,0) While 1 Send("{SPACE}") Sleep(Random(120000,240000)) WEnd EndFunc Func TogglePause() ToolTip('AntiAFK Stopped.',0,0) HotKeySet("{PAUSE}") HotKeySet("{PAUSE}", "Start") While 1 sleep(100) WEnd EndFunc func Quit() Exit EndFuncHiho!I am completely new in this terrain, but that's what I am searching for.How can I get it to work, that means, what do I have to do with this script?
sbp Posted October 8, 2005 Posted October 8, 2005 Hi thanks for your script, I have saved it and compiled it into an exe, and it seems to be OK. BUT I dont think it is working. I have this little new icon showing up in the process line, but pressing "pause" doesn't alter anything. And I'm not getting any pop-up window neither in WoW or on the desktop when I'm pressing pause. I have been leaving the cursor on a page in Notepad, and I would imagine that this script would randomly put in Space in the text (as this script is suposed to generate "space" randomly. But no space commands seems to be send? So basicly I need help. Steen
ziiion Posted October 8, 2005 Posted October 8, 2005 Hi thanks for your script, I have saved it and compiled it into an exe, and it seems to be OK.BUT I dont think it is working. I have this little new icon showing up in the process line, but pressing "pause" doesn't alter anything. And I'm not getting any pop-up window neither in WoW or on the desktop when I'm pressing pause.I have been leaving the cursor on a page in Notepad, and I would imagine that this script would randomly put in Space in the text (as this script is suposed to generate "space" randomly. But no space commands seems to be send?So basicly I need help.SteenWinWaitActive("World of Warcraft")this line makes it that it only sends the keystrokes into WoW only when WoW is active(in front of any other aplication) thats why it doessnt send keystrokes to notepad
Recommended Posts