Jump to content

Auto logging yahoo chat


BlackCat
 Share

Recommended Posts

Hi guys. I can't know why my code not working. Plz help me check it. Thank u

Code:

MgsBox(1,"Auto Login Yahoo","Do You Want Login Yahoo")

Run("C:/Program Files/Yahoo!/Messenger/YahooMessenger.exe"); run file yahoo

WinWaitActive("Yahoo!Messenger")

Send("UserName"); Your user name

Send("[tab]")

Send("PassWord"); Your pass word

Send("[enter]")

Link to comment
Share on other sites

Run("C:/Program Files/Yahoo!/Messenger/YahooMessenger.exe")

Wrong slashes.

Also:

Send("[enter]")

should be:

Send("{enter}")

Adding some sleeps may be beneficial, in my experience winwaitactive() doesn't necessarily mean the window is ready for input.

And what is the problem specifically?

$WinTitle = "Yahoo!Messenger" ;Window Title
$Username = "" ;Your Username
$Password = "" ; Your Password
$Path = "C:\Program Files\Yahoo!\Messenger\YahooMessenger.exe" ;Yahoo Path

$Return = MsgBox(4,"Auto Login Yahoo","Do You Want Login Yahoo") ;Yes/No Message-Box

If $Return = 6 Then ;Yes was pushed
    If Run($Path) = 0 Then ; run file yahoo
        MsgBox(0, "Error", "Yahoo failed to start")
    Else
        While 1
            WinActivate($WinTitle)
            If WinActive($WinTitle) Then ExitLoop
            Sleep(100)
        WEnd
    EndIf
        
        Sleep(200)
        Send($Username)
        Send("{Tab}")
        Sleep(10)
        Send($Password); Your pass word
        Sleep(10)
        Send("{Enter}")
EndIf

That should do what you want.

Edited by Cheez
Link to comment
Share on other sites

I don't have messenger installed in my system but I recommend you to use ControlCommand function.

Check first if AutoIt Window Info tool can read the yahoo messenger controls.

[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]
Link to comment
Share on other sites

  • 3 years later...

@Cheez

Run("C:/Program Files/Yahoo!/Messenger/YahooMessenger.exe")

Wrong slashes.

Also:

Send("[enter]")

should be:

Send("{enter}")

Adding some sleeps may be beneficial, in my experience winwaitactive() doesn't necessarily mean the window is ready for input.

And what is the problem specifically?

$WinTitle = "Yahoo!Messenger" ;Window Title
$Username = "" ;Your Username
$Password = "" ; Your Password
$Path = "C:\Program Files\Yahoo!\Messenger\YahooMessenger.exe" ;Yahoo Path

$Return = MsgBox(4,"Auto Login Yahoo","Do You Want Login Yahoo") ;Yes/No Message-Box

If $Return = 6 Then ;Yes was pushed
    If Run($Path) = 0 Then ; run file yahoo
        MsgBox(0, "Error", "Yahoo failed to start")
    Else
        While 1
            WinActivate($WinTitle)
            If WinActive($WinTitle) Then ExitLoop
            Sleep(100)
        WEnd
    EndIf
        
        Sleep(200)
        Send($Username)
        Send("{Tab}")
        Sleep(10)
        Send($Password); Your pass word
        Sleep(10)
        Send("{Enter}")
EndIf

That should do what you want.

$Id = "IdYahoo"

$Password = "123456"

ControlSend("[CLASS:YahooBuddyMain]", "", "Edit1", $Id)

ControlSend("[CLASS:YahooBuddyMain]", "", "Edit2", $Password

Link to comment
Share on other sites

  • Moderators

incepator,

Cheez has not been online since Sep 09 - I doubt he is interested any more. Please do not necro-post - we discourage it because the language has changed so much that the code is usually no longer runnable or the problem has been solved elsewhere. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...