Ultrimo Posted July 10, 2011 Posted July 10, 2011 (edited) I have downloaded a script from someone that basically helps in playing a game. The buttons Q, E, W and R are used to cast spells but unfortunately the script is active even when typing and so screws up what you typed by clicking away from the text box and thus removing focus from it. I'd like to be able to make this script be disabled whenever enter is pressed and then re-enable the next time enter is pressed. The reason for this is that when you chat in game you must first press enter to bring up the text box so I would like the script disabled then. You then press enter again to send the message, at which point I'd like the script to function once again. Here is the script: expandcollapse popup#include <Misc.au3> $typing = 0 $dll = DllOpen("user32.dll") HotKeySet("+{PAUSE}", "exitsc") $qpressed = False $wpressed = False $epressed = False $rpressed = False While 1 if (_IsPressed("51", $dll)) Then $qpressed = True ElseIf ($qpressed) Then $qpressed = False; MouseClick("left"); endIf if (_IsPressed("57", $dll)) Then $wpressed = True ElseIf ($wpressed) Then $wpressed = False; MouseClick("left"); endIf if (_IsPressed("45", $dll)) Then $epressed = True ElseIf ($epressed) Then $epressed = False; MouseClick("left"); endIf if (_IsPressed("52", $dll)) Then $rpressed = True ElseIf ($rpressed) Then $rpressed = False; MouseClick("left"); endIf WEnd Func exitsc() DllClose($dll) Exit EndFunc As you can see I attempted to create a variable called typing but everything I tried from there didn't work. I have basically no understanding of how this scripting works. Thank you. Edited July 10, 2011 by Ultrimo
AdmiralAlkex Posted July 10, 2011 Posted July 10, 2011 Hi and Welcome to the forums!Please note that we can't help you with this subject as it's strictly forbidden by the forum rules to discuss any game automation.I hope you'll understand. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Ultrimo Posted July 10, 2011 Author Posted July 10, 2011 Oh, well if possible could someone explain how to make a toggle script disregarding the whole concept of the game?
Ultrimo Posted July 11, 2011 Author Posted July 11, 2011 Nevermind, done it after a tedious amount of reading. Thanks for the help everyone.
somdcomputerguy Posted July 11, 2011 Posted July 11, 2011 The teacher(s) who taught you how to read and the authors of the Helpfile deserve your thanks.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
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