PalliePascal Posted November 7, 2005 Share Posted November 7, 2005 I'm trying to make a script that makes my healing in world of warcraft a bit easier. Because I can't set my left mousebutton to a hotkey in-game. My current healing hotkey is F2 in-game. So I want the script to press F2 when I press my left mouse button, but the script gives an error when I do that.It looks like this, but I don't know what the problem is. The -> <- part gives the error. Func SimpleHealer() While 1 -> If _IsPressed(01) then <- Send("{F2}") else Sleep(10) EndIf Wend EndFunc Link to comment Share on other sites More sharing options...
BigDod Posted November 7, 2005 Share Posted November 7, 2005 (edited) I'm trying to make a script that makes my healing in world of warcraft a bit easier. Because I can't set my left mousebutton to a hotkey in-game. My current healing hotkey is F2 in-game. So I want the script to press F2 when I press my left mouse button, but the script gives an error when I do that.It looks like this, but I don't know what the problem is. The -> <- part gives the error. Func SimpleHealer() While 1 -> If _IsPressed(01) then <- Send("{F2}") else Sleep(10) EndIf Wend EndFuncDo you have "#Include <Misc.au3>" at the top of your script. If you do could you please post the error.Edit - Copied from help file#include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 250 ) If _IsPressed("23", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf WEnd DllClose($dll) Edited November 7, 2005 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 8, 2005 Share Posted November 8, 2005 Why is this post in AutoItX? This is for the DLL/COM version of AutoIt. BTW: I tryed _IsPressed('01') and it works just fine, no error. I tryed the whole script only replacing Send({F2}) with MsgBox(0, '', '') and I got a MessageBox each time I clicked with no error. Link to comment Share on other sites More sharing options...
PalliePascal Posted November 11, 2005 Author Share Posted November 11, 2005 Btw: Sorry if I posted this in the wrong section. I still can't get the script working. I tried BigDod's script, but it doesn't work. I know I can do this with hotkeys, but I use the hotkeys to active and pause my bot. This is the complete script: HotKeySet("{F5}", "HealBot") HotKeySet("{F6}", "PauseBot") HotKeySet("{F7}", "ExitBot") MsgBox(0, "Heal-Bot Hotkeys", "F5 = Play Bot" & @CRLF & "F6 = Pause Bot" & @CRLF & "F7 = Exit Bot") While 1 Sleep(10) Wend Func HealBot() While 1 if _IsPressed("01") then MsgBox(0, "Congrats", "It works!") else Sleep(100) EndIf Wend EndFunc Func PauseBot() While 1 Sleep(100) Wend EndFunc Func ExitBot() Exit EndFunc But the if _IsPressed() part still gives an error, any ideas how to fix that? Link to comment Share on other sites More sharing options...
poisonkiller Posted November 12, 2005 Share Posted November 12, 2005 your script first line must be: #include <Misc.au3> Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 13, 2005 Share Posted November 13, 2005 (edited) Please inform us to the exact message error. You may not be #include-ing as poisonkiller says. @poisonkiller: it doesn't have to be the first line, just before it gets used Edited November 13, 2005 by Icekirby1 Link to comment Share on other sites More sharing options...
poisonkiller Posted November 13, 2005 Share Posted November 13, 2005 @Icekirby1: Yea i know, but in my script all #includes are first lines Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 14, 2005 Share Posted November 14, 2005 It's just one of the code-readability things. I do it to. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now