pipobona Posted June 5, 2005 Posted June 5, 2005 Hello, I am trying to make a program that communicates with jk3 (starwars jedi knight academy , based on the quake 3 engine) Now I can send a text to it (see the code below) but when the script sends the text , you see it typing it in the chatwindow. What I want is , that you wont see it typing but it just sends the text and it is immediately "Entered" so pressed the enter key very fast , so you wont see it typing the text but only see the chatbox output , or when you send for example a command like /help (is used by a mod for that game) ,that you immediately see the helpmenu and not watch typing the command first. ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: Pipo'Bona <pipobona@gmail.com> ; ; Script Function: ; JK3 Comunication ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstants.au3> GUICreate("JK3 - Comunicate", 100, 50) GUICtrlCreateLabel("Test", 30, 10) GUICtrlCreateButton("start", 70, 50, 60) GUISetState(@SW_SHOW) Sleep(2000) WinWaitActive("Jedi Knight®: Jedi Academy (MP)") Send("/say hallo {Enter}")
/dev/null Posted June 5, 2005 Posted June 5, 2005 but when the script sends the text , you see it typing it in the chatwindow.Check AutoIT Option SendKeyDelay in the help file. To set an option: AutoItSetOption.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
pipobona Posted June 5, 2005 Author Posted June 5, 2005 Check AutoIT Option SendKeyDelay in the help file. To set an option: AutoItSetOption.CheersKurt<{POST_SNAPBACK}>hmm , i tried that , but it still doesnt work . It still shows the typing
t0ddie Posted June 5, 2005 Posted June 5, 2005 (edited) save it to the clipboard, and then send ^v clipput("holy speed batman!") send("^v {enter}") Edited June 5, 2005 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.
/dev/null Posted June 5, 2005 Posted June 5, 2005 save it to the clipboard, and then send ^vOr use ControlSetText. Use AU3Info.exe to figure out the ControlID.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
pipobona Posted June 5, 2005 Author Posted June 5, 2005 save it to the clipboard, and then send ^vclipput("holy speed batman!") send("^v {enter}")<{POST_SNAPBACK}>this option works. the option of the controlid , doesnt work , because the "console" field the text has to be send to hasnt any controlid , as far as I know.I got another question, now the sending works, but I want to send some text when some text is typed ingame ,like:you type ingameconsole:@welcomemsgthen the program replies and enters:Hello , welcome to this server , nice to meet you and the website is http://www.autoitscript.comSo you dont have to type this text over and over again.Which function is used for example :If (function we need) =@welcomemsg Then clipput("Hello , welcome to this server , nice to meet you and the website is http://www.autoitscript.com") send("^v {Enter}")How can i do that? thx..
/dev/null Posted June 5, 2005 Posted June 5, 2005 this option works. the option of the controlid , doesnt work , because the "console" field the text has to be send to hasnt any controlid , as far as I know.Every control should have a control ID. I guess, you did not try Au3Info.exe?If (function we need) =@welcomemsg....How can i do that? thx..ControlGetText(). However, this does not work with every control!. Anyway, we are back to ControlIDs Check out Au3Info.exe. It might solve your problems. It's in the install path of AutoIT.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
MSLx Fanboy Posted June 5, 2005 Posted June 5, 2005 just use a blank Control ID (empty double quotes), and send it to the window Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
t0ddie Posted June 6, 2005 Posted June 6, 2005 (edited) .I got another question, now the sending works, but I want to send some text when some text is typed ingame ,like:you type ingameconsole:@welcomemsg Edited June 6, 2005 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.
pipobona Posted June 6, 2005 Author Posted June 6, 2005 hmm , as far as i know it doesnt work yet . what i got now is: ; Script Start - Add your code below here #include <GUIConstants.au3> GUICreate("JK3 - Comunicate", 100, 50) GUICtrlCreateLabel("Test", 30, 10) GUICtrlCreateButton("start", 70, 50, 60) GUISetState(@SW_SHOW) Sleep(2000) WinWaitActive("Jedi Knight®: Jedi Academy (MP)") $searchmsg = ControlGetText ( "Jedi Knight®: Jedi Academy (MP)", "", "" ) If $searchmsg = "+1hi" Then clipput("Hi, it works!") send("^v {Enter}") EndIf While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend
w0uter Posted June 7, 2005 Posted June 7, 2005 hotkey set to trace the keys. @gets hotkeyd if @ is pressed W gets hotkeyd If W gets pressed E gets hotkeyd if Z is pressed @ gets hotkeyd again and it starts over. till it comes to the end. then the last hotkey is set to type the text. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
w0uter Posted June 7, 2005 Posted June 7, 2005 (edited) like this for ex. type @w0uter and it wil send 'omg lol hax' expandcollapse popupFunc _nub() def() Send('omg lol hax') EndFunc;==> _nub() HotKeyReset('@', '_one') Func _one() HotKeyReset('w', '_two') EndFunc;==> _one() Func _two() HotKeyReset('0', '_three') EndFunc;==> _two() Func _three() HotKeyReset('u', '_four') EndFunc;==> _three() Func _four() HotKeyReset('t', '_five') EndFunc;==> _four() Func _five() HotKeyReset('e', '_six') EndFunc;==> _five() Func _six() HotKeyReset('r', '_nub') EndFunc;==> _six() While 1 WEnd Func HotKeyReset($s_ex_Key, $s_ex_func) $s_keys = StringSplit('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+', '') For $i = 1 To $s_keys[0] HotKeySet($s_keys[$i], 'def') Next HotKeySet($s_ex_Key, $s_ex_func) EndFunc;==> HotKeyReset() Func def() $s_keys = StringSplit('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+', '') For $i = 1 To $s_keys[0] HotKeySet($s_keys[$i]) Next HotKeySet('@', '_one') EndFunc;==> def() Edited June 7, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
Evil Homer Posted September 29, 2005 Posted September 29, 2005 hello! ive just read this and would really like to know how to this for my clan can you just show me how to make somthing like if i say !tele i would enter some tele points into it and it will go there please ill give you lads of references thanks alot!
Evil Homer Posted September 30, 2005 Posted September 30, 2005 Please help i really want to get this working for cod please!
Evil Homer Posted September 30, 2005 Posted September 30, 2005 Please help somone I want to use the if statement so if i where to say !test it would say ^4H^3i Please please help i really need this. and one more thing. is there any way to minimize a quake 3 game using autoscript?
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