AgentSmith15 Posted December 14, 2005 Share Posted December 14, 2005 I have been searching through the forums, and I have also read the documentation and could not find what I was looking for. So I have two questions 1.) How can I assign a number pad key like {NUMPAD0} to be a hotkey to launch the send key function? 2.) I am running this game and the accuracy of a weapon get worse when you hold down the left key on the mouse. Therefore, I was thinking is it possible when you hold down the left key instead of a continuous left click that it left clicks rapidly? ß Yea I know I am lazy Can anyone help me with these two problems? [center][/center] Link to comment Share on other sites More sharing options...
GaryFrost Posted December 14, 2005 Share Posted December 14, 2005 HotKeySet("{NUMPAD0}","YourFunctions") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
BigDod Posted December 14, 2005 Share Posted December 14, 2005 This might help you figure out the left mouse click thing #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 200 ) If _IsPressed("01", $dll) Then MsgBox(0,"_IsPressed", "Left Mouse Key Pressed") ExitLoop EndIf WEnd DllClose($dll) 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...
AgentSmith15 Posted December 14, 2005 Author Share Posted December 14, 2005 (edited) Okay I have this, but I did a syntax check and says the syntax is wrong HotKeySet("{NUMPAD0}", "Send("Please stop Tk'ing"[,1])") Edited December 14, 2005 by AgentSmith15 [center][/center] Link to comment Share on other sites More sharing options...
GaryFrost Posted December 14, 2005 Share Posted December 14, 2005 (edited) Okay I have this, but I did a syntax check and says the syntax is wrong HotKeySet("{NUMPAD0}", "Send("Please stop Tk'ing"[,1)") HotKeySet("{NUMPAD0}", "YourFunction") Func YourFunction() Send("Please stop Tk'ing",1) EndFunc Edited December 14, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
lopolop Posted December 14, 2005 Share Posted December 14, 2005 (edited) no.. HotkeySet("*KEY TO SEND*", "*FUNC NAME*") soo it would be like HotKeySet("{NUMPAD0}", "Send") Func Send() Send("Please Stop Tk'ing", 1) EndFunc While 1 Sleep(1000) WEnd The sleep loop is too keep auto it running... [EDIT] gafrost hadnt post before Edited December 14, 2005 by lopolop Link to comment Share on other sites More sharing options...
BigDod Posted December 14, 2005 Share Posted December 14, 2005 (edited) Okay I have this, but I did a syntax check and says the syntax is wrong HotKeySet("{NUMPAD0}", "Send("Please stop Tk'ing"[,1])")Try HotKeySet("{NUMPAD0}", "SendMessage") While 1 Sleep(100) WEnd Func SendMessage() Send("Please stop Tk'ing",1) EndFunc Edit Too slow again Edited December 14, 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...
AgentSmith15 Posted December 14, 2005 Author Share Posted December 14, 2005 Thanks for explaing my stupid mistake Now going to try to understand BigDod hint... [center][/center] Link to comment Share on other sites More sharing options...
AgentSmith15 Posted December 14, 2005 Author Share Posted December 14, 2005 I think the script detects if the left mouse key is pressed ?.?.? [center][/center] Link to comment Share on other sites More sharing options...
BigDod Posted December 14, 2005 Share Posted December 14, 2005 I think the script detects if the left mouse key is pressed ?.?.?That is what you wanted. 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...
AgentSmith15 Posted December 14, 2005 Author Share Posted December 14, 2005 (edited) That is what you wanted. Oh, I see now...Okay I know when the left key is pressed how can I tie that together with the MouseClick function? Edited December 14, 2005 by AgentSmith15 [center][/center] Link to comment Share on other sites More sharing options...
BigDod Posted December 14, 2005 Share Posted December 14, 2005 (edited) Oh, I see now... Okay I know when the left key is pressed how can I tie that together with the MouseClick function?Not ideal #include <Misc.au3> $dll = DllOpen("user32.dll") $pos = MouseGetPos() while 1 sleep(50) if _IsPressed("01", $dll) then MouseClick("left",$pos[0],$pos[1],10) Endif WEnd DllClose($dll) This will give bursts of 10 clicks for every time you click the left button Edit Removed MouseClick("left") from first line of code. Edited December 14, 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...
AgentSmith15 Posted December 14, 2005 Author Share Posted December 14, 2005 (edited) oh , Thank You!!! I really hate to ask this and should have asked ealier but is there a way I can put a interval between the shots? Is it a good idea to put #include <Misc.au3>MouseClick("left") at the beginning of the code? Edited December 14, 2005 by AgentSmith15 [center][/center] Link to comment Share on other sites More sharing options...
BigDod Posted December 14, 2005 Share Posted December 14, 2005 oh , Thank You!!! I really hate to ask this and should have asked ealier but is there a way I can put a interval between the shots? Is it a good idea to put #include <Misc.au3>MouseClick("left") at the beginning of the code?The #include <Misc.au3> goes at the top the rest of the line was a pasting error. If you read about MouseClick in the helpfile you will see that there is a speed option that can be added to the command. 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...
Sardith Posted December 14, 2005 Share Posted December 14, 2005 What is this script for AgentSmith15?... [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font] Link to comment Share on other sites More sharing options...
AgentSmith15 Posted December 14, 2005 Author Share Posted December 14, 2005 What is this script for AgentSmith15?...It's for Halo... About the auto left click, in Halo if you were to hold the left key down to shoot someone after three continuous shots it gets very inaccurate. And about the hotkeys, We run a server and we need to type alot of stuff. From Rcon commands to telling someone to watch their language... [center][/center] Link to comment Share on other sites More sharing options...
AgentSmith15 Posted December 14, 2005 Author Share Posted December 14, 2005 Okay so this is what I have... #include <Misc.au3>MouseClick("left") If WinExists($g_szVersion) Then Exit; It's already running, keeps only one copy of the script running. AutoItWinSetTitle($g_szVersion) WinWaitActive("Halo"); Pauses execution of the script until the Halo window is active. opt("SendKeyDelay", 200); Alters the the length of the brief pause in between sent keystrokes. opt("SendKeyDownDelay", 120); Alters the length of time a key is held down before released during a keystroke. HotKeySet("{NUMPAD0}", "SendMessage") While 1 Sleep(100);The sleep loop is too keep Autoit running. WEnd Func SendMessage() Send("t Please stop Tk'ing", 1) EndFunc ;==>SendMessage ; Below is the auto left click code $dll = DllOpen("user32.dll") $pos = MouseGetPos() While 1 Sleep(50) If _IsPressed ("01", $dll) Then MouseClick("left", $pos[0], $pos[1], 10) EndIf WEnd DllClose($dll) Yes, I know I need to set a title and i'm looking how to do it... [center][/center] Link to comment Share on other sites More sharing options...
Sardith Posted December 14, 2005 Share Posted December 14, 2005 WinSetTitle ( "title", "text", "newtitle" ) [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font] Link to comment Share on other sites More sharing options...
AgentSmith15 Posted December 14, 2005 Author Share Posted December 14, 2005 (edited) WinSetTitle ( "title", "text", "newtitle" )I looked at that and thought it was only for changing the title I'm still getting an error with the code below? WinSetTitle("Agent's Halo Script", "", "") Edited December 14, 2005 by AgentSmith15 [center][/center] Link to comment Share on other sites More sharing options...
Sardith Posted December 14, 2005 Share Posted December 14, 2005 (edited) Set a title, as in change a title.. A little more explanation would be good if you could. I think what I posted will work... Edited December 14, 2005 by Sardith [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font] 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