Sign in to follow this  
Followers 0
qixx

Send message if If chat-window is closed

4 posts in this topic

English:

So, my question is, how I do it,

that if I press the M button, the

the text only typing in the chat input box

if this is closed, so no

if I write a text with an "M" in the

middle of my message stands "EXAMPLE TEXT" >_<

Description for code:

GTA:SA:MP = The program :(

t = Open the input box

EXAMPLE TEXT = Text is typing

{ENTER} = Send the message into chat

Sry for my english, but I'm german. :(

---------------------------------------------

Deutsch:

Also, meine Frage ist, wie ich es schaffe,

dass ich, wenn ich die Taste M drücke, der

Text nur in die Chat-Input-Box gerschrieben

wird, wenn dieses geschlossen ist, damit nicht,

wenn ich einen Text mit einem M schreibe,

mittendrin das "EXAMPLE TEXT" steht. :D

Erklärung für den Code:

GTA:SA:MP = Das Programm

t = Öffnet die Chat-Input-Box

EXAMPLE TEXT = Der Text, der gesendet werden soll

{ENTER} = Sendet den Text in den Chat

---------------------------------------------

The Code:

HotKeySet(M, "_start1")

Func _start1()
    If WinActive("GTA:SA:MP") Then
    Send("T")
    Send("EXAMPLE TEXT")
    Send("{ENTER}")
    Else
    EndIf
EndFunc

Share this post


Link to post
Share on other sites



Use a different HotKey and make sure you enclose the key in quotes. You didn't do that in your code.

HotKeySet("^m", "_Start1")


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Yes, i know that it would be better to

use another key, but I'm want to use M. :(

All auf the F1-F12 keys I used. Now I have

to use some other keys like "M". >_<

Edit:

I know, that it works. I used the

Chaos A.D. Keybinder and this works.

The problem with this program is, that

it have to few input boxes. :(

Edited by qixx

Share this post


Link to post
Share on other sites

Also, 'Else' isn't a must in every If statement.

Share this post


Link to post
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
Sign in to follow this  
Followers 0