Sign in to follow this  
Followers 0
James

MSN auto message

34 posts in this topic

#1 ·  Posted (edited)

Hey, this is my second example script, but I call it first because my other was moved :P

Anyways, its simple.

This is the new version, 1.2.

;------------------------------------------
;
; Name: MSN Auto Message
; Author: Secure_ICT
; Version: 1.2
;
;------------------------------------------

#include <GUIConstants.au3>

Opt("WinTitleMatchMode", 2)

$window = GUICreate("MSN Auto-Reply", 339, 417, -1, -1)
$start = GUICtrlCreateButton("Start MSN Message", 8, 152, 121, 57, 0)
$stop = GUICtrlCreateButton("Stop MSN Message", 8, 224, 121, 57, 0)
$setText = GUICtrlCreateButton("Set text to send", 8, 80, 121, 57, 0)
$start1 = GUICtrlCreateLabel("Start the Message Replier", 144, 168, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
$stop1 = GUICtrlCreateLabel("Stop the Message Replier", 144, 240, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
$help = GUICtrlCreateButton("Help me!!!!", 8, 296, 321, 81, 0)
$welcome = GUICtrlCreateEdit("", 9, 8, 322, 57, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, StringFormat("Welcome to the MSN Auto Replier by Secure_ICT. To start press \r\nSet Text and enter the text you wish to be entered when someone \r\ntalks to you.\r\n"))
$disclaimer = GUICtrlCreateEdit("", 8, 384, 321, 25, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, StringFormat("This is a free script. Edit it to suit your needs.\r\n"))
$setlabel = GUICtrlCreateLabel("Set the text you wish to be sent", 144, 96, 177, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $help
            SplashTextOn ( "Help me", "" & @CRLF & """Welcome to the MSN Auto Message Help."& @CRLF &"It's simple to make this run. All you need to do, is click the Set Text "& @CRLF &"button and "& @CRLF &"enter the text that you wish to be displayed when someone speaks to "& @CRLF &"you."& @CRLF &"You only have to set the text once as it saves the text as a .ini"& @CRLF &" "& @CRLF &"Then just press start and it will enter the message to any open MSN "& @CRLF &"conversation "& @CRLF &"window."& @CRLF &"Need more help? Just ask me on the topic."& @CRLF &""& @CRLF &"Secure_ICT")
            Sleep(10000)
            SplashOff()
        Case $setText
            IniWrite("Text.ini", "MSN Text", "TXT", InputBox("What text should be entered?", "Type : ", "", "", 200, 50) )
            IniWrite("Text.ini", "Conversation", "Last spoke 2", "Not Found")
        Case $start
            TrayTip("MSN Auto Message", "I'm currently running!", 5, 1)
            while 1
                $nMsg = GUIGetMsg()
                    If WinExists("- Conversation") Then
                        WinActivate("- Conversation")
                        Send(IniRead("Text.ini", "MSN Text", "TXT"," Not Found") & "{enter}")
                        IniWrite("Text.ini", "Conversation", "Last spoke 2", WinGetTitle("- Conversation", ""))
                        WinClose("- Conversation")
                    EndIf
                if $nMsg = $stop Then
                TrayTip("MSN Auto Message", "You have stopped me!!", 5, 1)
                    ExitLoop
                EndIf
            WEnd
    EndSwitch
WEnd

Just set text then click start. Change it to suit you.

Thanks to:

th.meger - sorting out .ini issues

polyphem - sorting out loop issues

kohr - helping me all around

jon and team - making autoit

Secure

Edited by Secure_ICT

Share this post


Link to post
Share on other sites



im sorry to tell you that is doesnt work 4 me to bad cause it would be handy for me :P

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Update 17-12-06: Version 1.1

I said I wouldn't release another version. But there was a problem with the other one. I missed out the "Set Text" case.

New:

  • Fixed "Set Text"
  • Added tray tips for start/stop
  • Also got rid of WinKill when it has sent the message (I didn't know who had spoken to me!)
#include <GUIConstants.au3>

Opt("WinTitleMatchMode", 2)

$window = GUICreate("MSN Auto-Reply", 339, 417, -1, -1)
$start = GUICtrlCreateButton("Start MSN Message", 8, 152, 121, 57, 0)
$stop = GUICtrlCreateButton("Stop MSN Message", 8, 224, 121, 57, 0)
$setText = GUICtrlCreateButton("Set text to send", 8, 80, 121, 57, 0)
$start1 = GUICtrlCreateLabel("Start the Message Replier", 144, 168, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
$stop1 = GUICtrlCreateLabel("Stop the Message Replier", 144, 240, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
$help = GUICtrlCreateButton("Help me!!!!", 8, 296, 321, 81, 0)
$welcome = GUICtrlCreateEdit("", 9, 8, 322, 57, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, StringFormat("Welcome to the MSN Auto Replier by Secure_ICT. To start press \r\nSet Text and enter the text you wish to be entered when someone \r\ntalks to you.\r\n"))
$disclaimer = GUICtrlCreateEdit("", 8, 384, 321, 25, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, StringFormat("This is a free script. Edit it to suit your needs.\r\n"))
$setlabel = GUICtrlCreateLabel("Set the text you wish to be sent", 144, 96, 177, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $help
            SplashTextOn ( "Help me", "" & @CRLF & """Welcome to the MSN Auto Message Help."& @CRLF &"It's simple to make this run. All you need to do, is click the Set Text "& @CRLF &"button and "& @CRLF &"enter the text that you wish to be displayed when someone speaks to "& @CRLF &"you."& @CRLF &"You only have to set the text once as it saves the text as a .ini"& @CRLF &" "& @CRLF &"Then just press start and it will enter the message to any open MSN "& @CRLF &"conversation "& @CRLF &"window."& @CRLF &"Need more help? Just ask me on the topic."& @CRLF &""& @CRLF &"Secure_ICT")
            Sleep(10000)
            SplashOff()
        Case $setText
            IniWrite("Text.ini", "MSN Text", "TXT", InputBox("What text should be entered?", "Type : ", "", "", 200, 50) )
        Case $start
            TrayTip("MSN Auto Message", "I'm currently running!", 5, 1)
            while 1
                $nMsg = GUIGetMsg()
                    If WinExists("- Conversation") Then
                        WinActivate("- Conversation")
                        Send(IniRead("Text.ini", "MSN Text", "TXT"," Not Found") & "{enter}")
                    EndIf
                if $nMsg = $stop Then
                TrayTip("MSN Auto Message", "You have stopped me!!", 5, 1)
                    ExitLoop
                EndIf
            WEnd
    EndSwitch
WEnd

Secure

Edited by Secure_ICT

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Another update. Last for today I expect.

;------------------------------------------
;
; Name: MSN Auto Message
; Author: Secure_ICT
; Version: 1.2
;
;------------------------------------------

#include <GUIConstants.au3>

Opt("WinTitleMatchMode", 2)

$window = GUICreate("MSN Auto-Reply", 339, 417, -1, -1)
$start = GUICtrlCreateButton("Start MSN Message", 8, 152, 121, 57, 0)
$stop = GUICtrlCreateButton("Stop MSN Message", 8, 224, 121, 57, 0)
$setText = GUICtrlCreateButton("Set text to send", 8, 80, 121, 57, 0)
$start1 = GUICtrlCreateLabel("Start the Message Replier", 144, 168, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
$stop1 = GUICtrlCreateLabel("Stop the Message Replier", 144, 240, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
$help = GUICtrlCreateButton("Help me!!!!", 8, 296, 321, 81, 0)
$welcome = GUICtrlCreateEdit("", 9, 8, 322, 57, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, StringFormat("Welcome to the MSN Auto Replier by Secure_ICT. To start press \r\nSet Text and enter the text you wish to be entered when someone \r\ntalks to you.\r\n"))
$disclaimer = GUICtrlCreateEdit("", 8, 384, 321, 25, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, StringFormat("This is a free script. Edit it to suit your needs.\r\n"))
$setlabel = GUICtrlCreateLabel("Set the text you wish to be sent", 144, 96, 177, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $help
            SplashTextOn ( "Help me", "" & @CRLF & """Welcome to the MSN Auto Message Help."& @CRLF &"It's simple to make this run. All you need to do, is click the Set Text "& @CRLF &"button and "& @CRLF &"enter the text that you wish to be displayed when someone speaks to "& @CRLF &"you."& @CRLF &"You only have to set the text once as it saves the text as a .ini"& @CRLF &" "& @CRLF &"Then just press start and it will enter the message to any open MSN "& @CRLF &"conversation "& @CRLF &"window."& @CRLF &"Need more help? Just ask me on the topic."& @CRLF &""& @CRLF &"Secure_ICT")
            Sleep(10000)
            SplashOff()
        Case $setText
            IniWrite("Text.ini", "MSN Text", "TXT", InputBox("What text should be entered?", "Type : ", "", "", 200, 50) )
            IniWrite("Text.ini", "Conversation", "Last spoke 2", "Not Found")
        Case $start
            TrayTip("MSN Auto Message", "I'm currently running!", 5, 1)
            while 1
                $nMsg = GUIGetMsg()
                    If WinExists("- Conversation") Then
                        WinActivate("- Conversation")
                        Send(IniRead("Text.ini", "MSN Text", "TXT"," Not Found") & "{enter}")
                        IniWrite("Text.ini", "Conversation", "Last spoke 2", WinGetTitle("- Conversation", ""))
                        WinClose("- Conversation")
                    EndIf
                if $nMsg = $stop Then
                TrayTip("MSN Auto Message", "You have stopped me!!", 5, 1)
                    ExitLoop
                EndIf
            WEnd
    EndSwitch
WEnd

Update just gets the last person spoke to you and saves it in the .ini file

Edited by Secure_ICT

Share this post


Link to post
Share on other sites

Lame :P , cant you just check for the conversation to get a message ? like in TCP ^^

Share this post


Link to post
Share on other sites

Why is it lame?

Its a good attempt. And I dont know how to make it get text without UDF and there isnt one for MSN LIve.

almost everything is more stable than this :P

try TCP/IP of try it whit a com object or something

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

almost everything is more stable than this

It's as simple as this, if you don't like it, don't use it. If you are going to comment helpfully (which you did thank you for that) there is no reason to add insults like this... It was nice of you to try to help him out, but at the same time you managed to be a (can't say twat or idiot...) jerk about it. If you've got something good to say, say it. If you've got something bad to say, keep it to youself. Thanks

EDIT: Secure_IT you should really just delete the old one and put the newest version in the first post makes it less confusing for the people that just want to try it rather than read the entire topic.

Edited by dandymcgee

- Dan [Website]

Share this post


Link to post
Share on other sites

almost everything is more stable than this :P

try TCP/IP of try it whit a com object or something

You obviously have no idea what you're talking about. This is perfectly stable, and what's more, TCP/IP and COM are two completely different things...Windows Live Messenger does have COM and can be controlled with it, but it's just as easy and good to do it this way, so who cares? And the protocol for MSN on TCP/UDP has not been released yet, and it's very hard to get it working reliably. You're "or something" just confirmed that you're clueless about the subject. Please, if you're going to just tell people their scripts are lame, at least know what you're talking about.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Hey, I like your code. I had tried making one of these but some how managed to make it much more complex. Anyways, I have a suggestions for you:

IniWrite("Text.ini", "Record of autoreplies", "This message: '" & $send & "' was sent to " & WinGetTitle("- Conversation", ""), "Date: " &@Mon&"/"&@MDAY&"/"&@Year& " Time: " &@Hour&"/"&@Min&"/"&@Sec)

It doesn't matter much but it does let the person know how many people tried contacting them and when...

Nice code!


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

Thanks. I like that idea. I did try to do that, but I couldn't get it working. I will make an update later, I have my tea now.

I'm thinking of having 2 tabs. One titled "Set your own", the other "Presets".

Would anyone find it useful?

Share this post


Link to post
Share on other sites

Thanks. I like that idea. I did try to do that, but I couldn't get it working. I will make an update later, I have my tea now.

I'm thinking of having 2 tabs. One titled "Set your own", the other "Presets".

Would anyone find it useful?

Yes


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

I like people who don't know the difference between unsigned long int and DWORD and similar obvious things.

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