MagickCrafter Posted April 13, 2006 Share Posted April 13, 2006 Well, hey all. I am currently working on creating a Magic Online Bot. (I explain further down if you do not know) I am progressing very far, however, I have run into to problems: (I am using AutoIt v3 btw)Number 1:I am trying to figure out what I can do to locate a PM window, display a message (I am not here right now, open trade etc), then close the window. (The PM window is practically just a window that pops up at a different place each time, in a diagonal pattern, when somebody PMs you) I have some code, but, umm, whenever it gets to this part of the code, my computer crashes due to memory problems I am assuming. (Please note that I am running this in a For loop about twenty or so times, so that may be it. But i NEED to do that to locate the PM.)CODE:$pm1 = 672$pm2 = 123$pm3 = 978$pm4 = 555$pm = 4338709$privatemsg = "MagickCrafter's bot is currently running. I am trading 32 cards on this account for 1 ticket. If you have any problems please contact me at magickcrafter@hotmail.com Thank you!"Func Privatemsg() $private = PixelSearch($pm1, $pm2, $pm3, $pm4, $pm) If Not @error Then $pmcheckX = $private[0] - 117 $pmcheckY = $private[1] + 30 $pmcheck = PixelGetColor($pmcheckX, $pmcheckY) If $pmcheck = 14605273 Then $pmboX = $pmcheckX - 173 $pmboY = $pmcheckY + 140 SendMsg($privatemsg, $pmboX, $pmboY) MouseClick("left", $private[0], $private[1]) EndIf EndIfEndFuncFunc SendMsg($a, $X, $Y) Sleep(100) ClipPut($a) Sleep(100) MouseMove($X, $Y) MouseDown("left") MouseUp("left") Sleep(100) Send("{CTRLDOWN}v{CTRLUP}{ENTER}") Sleep(100) MouseClick("left", $X, $Y, 2) Sleep(100) Send("{BACKSPACE}")EndFuncProblem number 2: Whenever my bot sends text, it usually messes up. For example, if it is supposed to send the bot loading message, then the greeting message, it either displays the greeting message twice, the loading message and nothing else, etc. Is the sendmessage function messed up??? Thank you guys so much! Link to comment Share on other sites More sharing options...
GaryFrost Posted April 14, 2006 Share Posted April 14, 2006 for support you need to post in the support section of the forum SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
=sinister= Posted April 14, 2006 Share Posted April 14, 2006 Yes, This is the 'Scripts and Scraps' forum, this is where you post scripts n stuff. For support go to the Support forum. Anyways, welcome to the forums! Please look in the Help file located in your Autoit folder (C:\program files\Autoit) for pixelgetcolor() Link to comment Share on other sites More sharing options...
MagickCrafter Posted April 14, 2006 Author Share Posted April 14, 2006 Yes, thanks for the tips. (As for PixelGetColor, that's not my problem ) But, anyway, I figured out the problem, so yeah. Thanks!!! XP Link to comment Share on other sites More sharing options...
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