Jump to content

DirectX Problems


Recommended Posts

post your script so we know how you're trying to accomplish this.

<{POST_SNAPBACK}>

Sure sure.

HotKeySet("{PAUSE}", "halo")

Func halo()
Send("text", 1)
Endfunc

While 1
  sleep (100)
Wend

The most simple code in the world :whistle: As you can see, the game is halo.

EDIT: btw, I think that ANY scripts don't work for games =\

Edited by meamrussian
Link to comment
Share on other sites

yes, that's exactly it. I already press the button to talk to other people, and I just want it to type in text to send to other players. It's just a handy tool for me to use to type something in very quickly instead of having to type the whole thing. I just want to press pause, have text typed in, and that's it. Just a simple send. But, it doesn't work with the game, and I want it to :whistle:

Hehe, thanks a lot for the help.

Link to comment
Share on other sites

  • Moderators

Could you mouseclick to the area where you want to chat then use the send?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

did you try ControlSend()?

try using the AutoIt Window Info tool on this screen to get what you need to use ControlSend()

<{POST_SNAPBACK}>

Well, I now tried using the following code, but it didn't work:

HotKeySet("{PAUSE}", "halo")

Func halo()
ControlSend("Halo", "",,"text",1)
Endfunc

While 1
  sleep (100)
Wend

Halo is the title window, there is no text, no control id, and the text is text, flag 1 (to be sent rw). It doesn't work (and I don't think I made a mistake.

I think it's just the game stopping it from doing something?

Thanks for the help so far.

Edited by meamrussian
Link to comment
Share on other sites

After a quick experiment, it would seem you're right. It's not a matter of not being able to send though, it seems more like the keys are not reaching the script. Halo seems to be capturing the keys completely, not allowing AutoIt's Hotkey function to see them, a workaround I found is using the IsPressed UDF (look in my sig).

#include <IsPressed.au3>

Func Halo()
   Send('You pressed the pause key', 1)
EndFunc

While 1
  If _IsPressed('13') Then
    Halo()
  EndIf
  Sleep(10)
WEnd

I had to drop the sleep down otherwise it wasn't always catching the key, it still isn't perfect, but it's something you can work with.

Link to comment
Share on other sites

After a quick experiment, it would seem you're right. It's not a matter of not being able to send though, it seems more like the keys are not reaching the script. Halo seems to be capturing the keys completely, not allowing AutoIt's Hotkey function to see them, a workaround I found is using the IsPressed UDF (look in my sig).

#include <IsPressed.au3>

Func Halo()
   Send('You pressed the pause key', 1)
EndFunc

While 1
  If _IsPressed('13') Then
    Halo()
  EndIf
  Sleep(10)
WEnd

I had to drop the sleep down otherwise it wasn't always catching the key, it still isn't perfect, but it's something you can work with.

<{POST_SNAPBACK}>

Thanks! I will try that now. But, may I ask, how did you find out about that code? I searched IsPressed in the help, and nothing comes up. Actually, none of the _ functions come up. Sorry for being a noob, but I would like to learn. Thanks!
Link to comment
Share on other sites

_ispressed is a UDF. search the forum.

<{POST_SNAPBACK}>

Alright. So I took the ispressed code from http://www.autoitscript.com/forum/index.ph...wtopic=5760&hl= and saved the code as ispressed.au3.

Then, I used the code given before. It doesn't work at all. I also looked over the ispressed code and didn't see anywhere to change anything. If someone could please help, that would be awsome. Can someone walk me through the process or make this script, because I'm obviously doing something wrong. This will help me learn the code better.

Thanks.

Link to comment
Share on other sites

Copied and pasted:

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Halo

Class: Halo

Size: X: 0 Y: 0 W: 1024 H: 768

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 512 Y: 384

Cursor ID: 15

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0xECE9D8 Dec: 15526360

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size:

Control ID:

ClassNameNN:

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...