jvanegmond Posted May 2, 2006 Posted May 2, 2006 (edited) I was doing a remote control project and a MSN Messenger bot at the same time, and i wondered what would come out if i'd combine them. So i was scripting for about 5 minutes and then did a little debugging and here it is.Notes:Read Line 6 (Line 6 = Dim $conversation = "Conversation" ; <====== "Conversation" in English, "Gesprek" in Dutch etc. make sure this is right or it will fail)Enable the little popup message when someone tells you somethingYou probably need a fairly new version of msn messenger. It was tested on MSN Messenger 7.5.Syntax list(send this to the client):MsgBoxTITLE~MESSAGE~commandSends a message box with the custom TITLE and MESSAGE.CDOpen~commandOpens all CD trays.CDClose~commandCloses all CD trays. *(Kinda slow)RunFILEPATH~commandRuns FILEPATH.TypeMESSAGE~commandEquivalent of AutoIt's 'Send'.VolumeNUMBER~commandSets the wave volume to number in %.CloseTITLE~commandCloses the window that has title TITLE.TalkMESSAGE~commandWIN_XP Only i think, allows the PC to say something.If OS is not WinXP the client will crash.MouseBUTTON~X~Y~commandClicks with BUTTON at X and Y coordinates.MouseX~Y~commandMoves the mouse to X and Y coordinates.BlockInput~commandAllowInput~commandBlocks and allows the user to type input.Shutdown~commandShuts the computer down.If you want more commands you can script them on your own, it's not hard, look at the examples: there are plenty in my script.Ok, have fun and i hope it works expandcollapse popupOpt("WinTitleMatchMode", 2) Opt("TrayAutoPause",0) Opt("SendKeyDelay", 1) Dim $title, $msg Dim $conversation = "Conversation" ; <====== "Conversation" in English, "Gesprek" in Dutch etc. make sure this is right or it will fail While 1 If WinExists("Alert") Then $title = StringSplit(StringTrimRight(WinGetTitle("Alert"), 8), @CRLF) If Not @error Then If StringInStr( StringRight($title[2], 12) , "~command") > 0 Then ControlClick("Alert", "", "DirectUIHWND1") $succes = WinWaitActive($conversation,"", 4) If $succes Then Sleep(10) Send("{ESC}") $data = StringTrimRight(StringStripWS($title[2], 3), 8) If StringInStr($data, "MsgBox") > 0 Then $abc = StringSplit(StringReplace($data, "MsgBox", ""), "~") If $abc[0] = 2 Then MsgBox(0, $abc[1], $abc[2]) ElseIf $abc[0] = 1 Then MsgBox(0, "", $abc[1]) EndIf EndIf If StringInStr($data, "CDOpen") > 0 Then $var = DriveGetDrive( "CDROM" ) If NOT @error Then For $i = 1 to $var[0] CDTray($var[$i], "Open") Next EndIf EndIf If StringInStr($data, "CDClose") > 0 Then $var = DriveGetDrive( "CDROM" ) If NOT @error Then For $i = 1 to $var[0] CDTray($var[$i], "Close") Next EndIf EndIf If StringInStr($data, "Run") > 0 Then $data = StringReplace($data, "Run", "") Run($data) EndIf If StringInStr($data, "Type") > 0 Then $data = StringReplace($data, "Type", "") Send($data) EndIf If StringInStr($data, "Volume") > 0 Then $data = StringReplace($data, "Volume", "") SoundSetWaveVolume($data) EndIf If StringInStr($data, "Close") > 0 Then $data = StringReplace($data, "Close", "") WinClose($data) EndIf If StringInStr($data, "Talk") > 0 Then $data = StringReplace($data, "Talk", "") Local $o_speech = ObjCreate("SAPI.SpVoice") $o_speech.Speak($data) $o_speech = "" EndIf If StringInStr($data, "Mouse") > 0 Then $abc = StringSplit(StringReplace($data, "Mouse", ""), "~") If $abc[0] = 3 Then If $abc[1] = "left" Then MouseClick("left", $abc[2], $abc[3], 1, 0) ElseIf $abc[1] = "right" Then MouseClick("right", $abc[2], $abc[3], 1, 0) EndIf ElseIf $abc[0] = 2 Then MouseMove($abc[1], $abc[2], 0) EndIf EndIf If StringInStr($data, "BlockInput") > 0 Then BlockInput(1) EndIf If StringInStr($data, "AllowInput") > 0 Then BlockInput(0) EndIf If StringInStr($data, "Shutdown") > 0 Then Shutdown() EndIf EndIf EndIf Else ControlClick("Alert", "", "DirectUIHWND1") $succes = WinWaitActive($conversation,"",4) If $succes Then Send("{ESC}") EndIf EndIf EndIf Sleep(10) WEnd Edited April 24, 2007 by Manadar github.com/jvanegmond
jvanegmond Posted May 2, 2006 Author Posted May 2, 2006 First you should, Enable the little popup message when someone tells you something It's under MSN Messenger's options somewhere you have probably seen it. Then you should log in on MSN, run the script. And then get on a different computer if possible, logon a different account and send a message to the person who is running the client. For examples what to send look in my syntax list. You can also ask a friend to send you these commands. github.com/jvanegmond
EL Diablo Posted May 2, 2006 Posted May 2, 2006 How do I send a command to them to shut down that computer?
jvanegmond Posted May 2, 2006 Author Posted May 2, 2006 You should follow the same steps as instructed on their computer first. This is no malware or anything, just something you can use to implement in a server script or anything like that. github.com/jvanegmond
RazerM Posted May 3, 2006 Posted May 3, 2006 (edited) this is awesome! I'd like to note that the Shutdown command needs a number. 1 is shutdown I have started to make a quick Commander to make things easierexpandcollapse popup;=============================================================================== ; ; Program Name: MSN Commander ; Description:: Sends commands on MSN to a pc running Manadar's MSN remote control ; Requirement(s): AutoIt Beta ; Author(s): RazerM ; ;=============================================================================== ; #include <GUIConstants.au3> GUICreate("MSN Commander", 600, 500) $convolist=GUICtrlCreateCombo("Choose Conversation.. (Press Update List to list new conversations)", 10, 365, 580) $update = GUICtrlCreateButton("Update List", 10, 335, 80) GUICtrlCreateGroup("MsgBox", 10, 10, 150, 90) $msgtitle = GUICtrlCreateInput("Title", 15, 25, 140, 20) $msgtext = GUICtrlCreateInput("Text", 15, 50, 140, 20) $msgsend = GUICtrlCreateButton("Send", 40, 72, 80, 25) GUICtrlCreateGroup("Block Input", 170, 10, 90, 80) $inputblock = GUICtrlCreateButton("Block", 175, 25, 80, 25) $inputallow = GUICtrlCreateButton("Allow", 175, 55, 80, 25) GUICtrlSetState($inputallow, $GUI_DISABLE) GUICtrlCreateGroup("CD Door", 270, 10, 90, 80) $cdopen = GUICtrlCreateButton("Open", 275, 25, 80, 25) $cdclose = GUICtrlCreateButton("Close", 275, 55, 80, 25) GUISetState() ListMSN() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $update ListMSN() Case $msgsend WinActivate(GUICtrlRead($convolist)) Send("MsgBox" & GUICtrlRead($msgtitle) & "~" & GUICtrlRead($msgtext) & "~command{ENTER}") Case $inputblock WinActivate(GUICtrlRead($convolist)) Send("BlockInput~command{ENTER}") GUICtrlSetState($inputblock, $GUI_DISABLE) GUICtrlSetState($inputallow, $GUI_ENABLE) Case $inputallow WinActivate(GUICtrlRead($convolist)) Send("AllowInput~command{ENTER}") GUICtrlSetState($inputblock, $GUI_ENABLE) Case $cdopen WinActivate(GUICtrlRead($convolist)) Send("cdopen~command{ENTER}") Case $cdclose WinActivate(GUICtrlRead($convolist)) Send("cdclose~command{ENTER}") EndSwitch WEnd Func ListMSN() $var = WinList() For $i = 1 to $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" AND IsVisible($var[$i][1]) And StringInStr($var[$i][0], "- Conversation") Then GUICtrlSetData($convolist, $var[$i][0]) EndIf Next EndFunc Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc Edited May 3, 2006 by RazerM My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
Flamingwolf Posted April 23, 2007 Posted April 23, 2007 (edited) woah this is so 1337!!!! im going to have to modify this to do some other stuff >=D EDIT: is it just me, i cant see it >< EDIT2: sorry about bumping this, i just saw this in a thread in general help and support and didnt notice how old it was Edited April 23, 2007 by Flamingwolf
Skrip Posted April 24, 2007 Posted April 24, 2007 Manadar. You might want to post a code. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
WhOOt Posted April 24, 2007 Posted April 24, 2007 I would really like to see this working wheres the code? Mandanar? I know its old, but it might still work? WhOOt
jvanegmond Posted April 24, 2007 Author Posted April 24, 2007 (edited) Sorry, it was in an attachment and I removed it due to space limitations and a few downloads...I'm going to boot up my old computer to get the source right now, be right back.Edit: Got it...See initial post. Edited April 24, 2007 by Manadar github.com/jvanegmond
Skrip Posted May 5, 2007 Posted May 5, 2007 I realise this thread is really old. But is it possible to make it read the conversation window, instead of the message chat box in the courner? [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
James Posted May 5, 2007 Posted May 5, 2007 It doensn't work for me.. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Skrip Posted May 5, 2007 Posted May 5, 2007 They need to have the program on their computer, and have the convo window closed. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
James Posted May 5, 2007 Posted May 5, 2007 I know, and I tried it, but it closes their MSN window. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Pascal257 Posted May 5, 2007 Posted May 5, 2007 It should be posible to send any command with FileWrite and Run AutoItExe... (if it is installed on the PC) Because now its pretty difficult to get more commands and its very much code... Hope you know what I mean...
James Posted May 5, 2007 Posted May 5, 2007 Not got a clue.. I see how it works.. Reads the conversation for a word If a command word exists then it does something.. But, it doesn't work. I'm using Windows Live Message 8.1 Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
jvanegmond Posted May 6, 2007 Author Posted May 6, 2007 But, it doesn't work. I'm using Windows Live Message 8.1It does state 'MSN Messenger' in the topic title. I've not used this with anything else, but I've switched to Windows Live Messenger now too. You're on your own creating a bot for that. I suggest using a Messenger Object to receive the messages. github.com/jvanegmond
James Posted May 6, 2007 Posted May 6, 2007 Yeah, thought so, but some people dont call it live messenger (n00bs) oh well. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
jvanegmond Posted May 6, 2007 Author Posted May 6, 2007 Yeah, thought so, but some people dont call it live messenger (n00bs) oh well.My script may suggest that I am quite the newbie, but check out some of the later ones. github.com/jvanegmond
James Posted May 6, 2007 Posted May 6, 2007 I wasn't calling you a n0b, which your certanly not. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
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