Chrisaster Posted January 12, 2009 Posted January 12, 2009 I'm pretty new to AutoIt, and I've made a few programs, however I've come across a problem when making a program to send commands to a Source (e.g. GMod, Counter Strike:Source) console. I made a program to send the commands you type in the input box to the console, however it uses a ControlSend function which is unreliable as it assumes the client is in a position where the console is availible, and also assumes the console is not already open. I was wondering if it would be possible to send commands directly to the game but I have no idea what to search and where to start going about this. Any help would be greatly appreciated.
FireFox Posted January 12, 2009 Posted January 12, 2009 @Chrisaster Send() function ? Cheers, FireFox.
Chrisaster Posted January 12, 2009 Author Posted January 12, 2009 (edited) FireFox said: @ChrisasterSend() function ?Cheers, FireFox.FireFox,Thanks for the quick reply, however I was wondering if it would be possible to use functions other than Send or ControlSend to send commands to the clients console. So the command is actually 'injected' into the game using a third party program. Edited January 12, 2009 by Chrisaster
AgentSmith15 Posted January 13, 2009 Posted January 13, 2009 Chrisaster said: FireFox, Thanks for the quick reply, however I was wondering if it would be possible to use functions other than Send or ControlSend to send commands to the clients console. So the command is actually 'injected' into the game using a third party program. Any injected DLL will get you detected by VAC and get you Perma banned. I highly suggest you not to try and take that route. What is the exact problem? I use the code below to limit how fast AutoIt types, so it's for the most part always correct. If you want to ensure that nothing gets messed up you can lock the keyboard till you get to the end of the send. Opt("SendKeyDelay", 20) Opt("SendKeyDownDelay", 5) [center][/center]
Chrisaster Posted January 13, 2009 Author Posted January 13, 2009 (edited) AgentSmith15 said: Any injected DLL will get you detected by VAC and get you Perma banned. I highly suggest you not to try and take that route. What is the exact problem? I use the code below to limit how fast AutoIt types, so it's for the most part always correct. If you want to ensure that nothing gets messed up you can lock the keyboard till you get to the end of the send. Opt("SendKeyDelay", 20) Opt("SendKeyDownDelay", 5) AgentSmith, This program is designed for Garry's Mod and responds to key presses such as Ctrl+F simulating a bind press. However this is slow and not 100% reliable. In Garry's Mod VAC is stated as enabled, however it is not (No idea why). And about: Opt("SendKeyDelay", 20) Opt("SendKeyDownDelay", 5) I give the user an option to set the key stroke delay. Edited January 13, 2009 by Chrisaster
Chrisaster Posted January 13, 2009 Author Posted January 13, 2009 (edited) HLSW is a good example of a program having the capability to do this. Edited January 13, 2009 by Chrisaster
Bam Posted January 13, 2009 Posted January 13, 2009 (edited) I believe steam has no thoughts of inforcing any rules for Gmod, why? simple thiers so maney addons for the game and people alrdy have contraptions that can kill u from farther then u see with a 95% chance of a head shot no mater what. thiers aimbots alrdy in the game ever hear of smartsnap? Ever 1 SHOULD have it (so help full <3) lol and its an aimbot... But for ur problem I dont have an idea sorry but it sounds like it could be realy helpfull Edited January 13, 2009 by Bam
FireFox Posted January 13, 2009 Posted January 13, 2009 @Chrisaster I can't get the control of console and its apparently not a window... I think the last way is to using this : ControlSend("Counter-Strike Source",'','',"something to write in console") Cheeers, FireFox.
Chrisaster Posted January 13, 2009 Author Posted January 13, 2009 (edited) Well I guess I'll have to stick with that then Thanks for the help! Edited January 13, 2009 by Chrisaster
Bam Posted January 14, 2009 Posted January 14, 2009 When hosting a dedicated server off a pc it has a window u can type commands into and if u want to do users commands i believe u can do like "ulx cexec "username" "command";requires ulx other then that idk, u might be able to open the command window on a dedicated server remotly.
Jack023 Posted August 5, 2014 Posted August 5, 2014 I know it's an old thread but I needed it too and find a solution! To send commanda to a game let it: FileWrite(sourcegame/cfg/test.cfg) <-- example Then bind a button ingame like: Bind "kp_end" "exec test" Then you send: Send("{NUMPAD1}") After that FileDelete("sourcegame/cfg/test.cfg") So the full code is like: FileWrite(sourcegame/cfg/test.cfg) <-- example Send("{NUMPAD1}") FileDelete("sourcegame/cfg/test.cfg") You can also make a txtfile with all the commanda you want send then filereadline, filewrite thenthe same.. And instead of send you can use ControlSend too so you cando it out of the game! No problem and have a good day!
Developers Jos Posted August 5, 2014 Developers Posted August 5, 2014 On 8/5/2014 at 7:19 AM, Jack023 said: I know it's an old thread but I needed it too and find a solution! -snip- No problem and have a good day! Just don't when you know and read our current forumrules around Game bots. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts