kozmik Posted April 7, 2009 Posted April 7, 2009 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.
Authenticity Posted April 7, 2009 Posted April 7, 2009 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.
kozmik Posted April 7, 2009 Author Posted April 7, 2009 So far I have HotKeySet( "ENTER" [, "Send"] ) In line 1. Am I even doing this right? Im so confused
Skruge Posted April 7, 2009 Posted April 7, 2009 So far I have HotKeySet( "ENTER" [, "Send"] ) In line 1. Am I even doing this right? Im so confused 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]
kozmik Posted April 7, 2009 Author Posted April 7, 2009 After about 2 hours of fiddling with it. I still had no success.
Bert Posted April 8, 2009 Posted April 8, 2009 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. The Vollatran project  My blog: http://www.vollysinterestingshit.com/
kozmik Posted April 8, 2009 Author Posted April 8, 2009 I took the class already. It freezes at Initiating File.
CodyBarrett Posted April 8, 2009 Posted April 8, 2009 here is something to get you started.. SORRY VOLLY this guy needs help.. Hotkeyset ('{ENTER}', '_Send') Func _Send () ;YOUR CODE HERE Endfunc [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size]
kozmik Posted April 8, 2009 Author Posted April 8, 2009 (edited) 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 April 8, 2009 by kozmik
CodyBarrett Posted April 8, 2009 Posted April 8, 2009 ok... place Msgbox(0,'','') instead of :YOUR CODE HERE.... then run it Yes thats what a HotKey does [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size]
Authenticity Posted April 8, 2009 Posted April 8, 2009 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.
CodyBarrett Posted April 8, 2009 Posted April 8, 2009 yes.. or you can use _ispressed() inside the While and clear up some of the lines... but this is goood for a begginer [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size]
kozmik Posted April 8, 2009 Author Posted April 8, 2009 Am I missing something? (I most likely am) When I compile it and run it. It doesnt send anything?
Josbe Posted April 8, 2009 Posted April 8, 2009 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. • AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
kozmik Posted April 8, 2009 Author Posted April 8, 2009 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.
Authenticity Posted April 8, 2009 Posted April 8, 2009 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.
kozmik Posted April 8, 2009 Author Posted April 8, 2009 I want it to read a line from the file.txt, paste it and send it.
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