Sign in to follow this  
Followers 0
BlackCat

Auto logging yahoo chat

7 posts in this topic

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]")

Share this post


Link to post
Share on other sites



try activate yahoo window using WinActivate("Yahoo!Messenger") before Send username line...


Hi ;)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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

I agree. Sometimes give a script 200 milisecond sleep better than no sleep at all..


Hi ;)

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
Share on other sites

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

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