Jump to content

Recommended Posts

Posted

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}")
Posted

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.

Cheers

Kurt

__________________________________________________________(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 *

Posted

Check AutoIT Option SendKeyDelay in the help file. To set an option: AutoItSetOption.

Cheers

Kurt

<{POST_SNAPBACK}>

hmm , i tried that , but it still doesnt work . It still shows the typing
Posted (edited)

save it to the clipboard, and then send ^v

:(

clipput("holy speed batman!")

send("^v {enter}")
Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Posted

save it to the clipboard, and then send ^v

Or use ControlSetText. Use AU3Info.exe to figure out the ControlID.

Cheers

Kurt

__________________________________________________________(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 *

Posted

save it to the clipboard, and then send ^v

:(

clipput("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:

@welcomemsg

then the program replies and enters:

Hello , welcome to this server , nice to meet you and the website is http://www.autoitscript.com

So 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..

Posted

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.

Cheers

Kurt

__________________________________________________________(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 *

Posted (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 by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Posted

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
Posted

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

Posted (edited)

like this for ex.

type @w0uter and it wil send 'omg lol hax'

Func _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 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

  • 3 months later...
Posted

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!

Posted

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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...