Jump to content
Sign in to follow this  
kozmik

Paste Text in Chat Box

Recommended Posts

kozmik

This is killing ME. Ive been trying make this in AutoIt. Its probably a simple function to.

I want code this:

I press enter, it paste the text from text.txt into like an msn conversation box or any dialog chat box that is open, and Send it.

Also I was also told that I can import the script into mmb. Thats what I would like to do.

So far. Ive gotten no where. Can anyone help me and point me in the right direction? Im so confused and I got a huge headache. :D

Share this post


Link to post
Share on other sites
Authenticity

Read the help file about the functions: HotKeySet, ClipPut (although it's probably unneeded in this case but read anyway );], Send, ControlSend, maybe FileRead. etc.. heh, show some code.

Share this post


Link to post
Share on other sites
kozmik

So far I have

HotKeySet( "ENTER" [, "Send"] )

In line 1. Am I even doing this right? Im so confused :D

Share this post


Link to post
Share on other sites
Skruge

So far I have

HotKeySet( "ENTER" [, "Send"] )

In line 1. Am I even doing this right? Im so confused :D

Welcome to the forums.

- Look at the help file entry for Send()... "ENTER" should be "{ENTER}"

- Brackets "[]" indicate that the parameter is optional. Do not type them.

- Send() already exists, so pick a new name for your function.

Please re-read the help file entries for these functions. When in doubt, run the examples and try to tweak them to gain a better understanding.

Good luck!


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites
kozmik

After about 2 hours of fiddling with it. I still had no success.

Share this post


Link to post
Share on other sites
kozmik

Anyone willing to code this for me?

Share this post


Link to post
Share on other sites
kozmik

bump

Share this post


Link to post
Share on other sites
Bert

Look in my signature for AutoIt 1 2 3.

TAKE THE CLASS. Seriously. Take it. Don't ask for help with your current problem until after you have taken the class. I will bet you will know how to solve the problem you are having after you take the class.

Share this post


Link to post
Share on other sites
kozmik

I took the class already. It freezes at Initiating File. :D

Share this post


Link to post
Share on other sites
CodyBarrett

here is something to get you started.. SORRY VOLLY this guy needs help..

Hotkeyset ('{ENTER}', '_Send')

Func _Send ()
;YOUR CODE HERE
Endfunc

Share this post


Link to post
Share on other sites
kozmik

Hotkeyset ('{ENTER}', '_Send')

Func _Send ()
;YOUR CODE HERE
Endfunc

What does this exactly do? When ENTER is pressed it will send what? I hate being a noob

Edited by kozmik

Share this post


Link to post
Share on other sites
CodyBarrett

ok... place Msgbox(0,'','') instead of :YOUR CODE HERE.... then run it

Yes thats what a HotKey does

Share this post


Link to post
Share on other sites
kozmik

I ran it. Its not doing anything.

Share this post


Link to post
Share on other sites
Authenticity

Try this:

HotKeySet('{ENTER}', '_Send')
HotKeySet('{ESC}', '_EXIT')

While 1
   Sleep(50)
WEnd

Func _EXIT()
   Exit
EndFunc

Func _Send()
   MsgBox(0x40, 'Title', 'Text')
EndFunc

Hit enter to run _Send function to see the message box and hit ESC to exit the script. The idea is to make a hot-key script that process code when you hit the hot-key and do nothing but sleep when no matching hot-key was pressed, such as the enter with this script.

Share this post


Link to post
Share on other sites
CodyBarrett

yes.. or you can use _ispressed() inside the While and clear up some of the lines... but this is goood for a begginer

Share this post


Link to post
Share on other sites
kozmik

Am I missing something? (I most likely am) When I compile it and run it. It doesnt send anything?

Share this post


Link to post
Share on other sites
Josbe

Am I missing something? (I most likely am) When I compile it and run it. It doesnt send anything?

Of course, you're forgotten read the info detailed in the helpfile about the functions included in that small code.

Share this post


Link to post
Share on other sites
kozmik

According to what he told me to do. Doesnt work. When I run it, and press enter it doesn't send anything in the chatbox. So something is wrong.

Share this post


Link to post
Share on other sites
Authenticity

Is the file.txt is open in notepad or you want to read it using FileRead or what? It won't do what you didn't tell it to do.

Share this post


Link to post
Share on other sites
kozmik

I want it to read a line from the file.txt, paste it and send it.

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  

×