BlackCat Posted September 16, 2009 Share Posted September 16, 2009 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 More sharing options...
Mison Posted September 16, 2009 Share Posted September 16, 2009 try activate yahoo window using WinActivate("Yahoo!Messenger") before Send username line... Hi ;) Link to comment Share on other sites More sharing options...
Cheez Posted September 16, 2009 Share Posted September 16, 2009 (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 September 16, 2009 by Cheez Link to comment Share on other sites More sharing options...
Mison Posted September 16, 2009 Share Posted September 16, 2009 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 ;) Link to comment Share on other sites More sharing options...
nfaustin Posted September 16, 2009 Share Posted September 16, 2009 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 More sharing options...
incepator Posted February 14, 2013 Share Posted February 14, 2013 @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 More sharing options...
Moderators Melba23 Posted February 14, 2013 Moderators Share Posted February 14, 2013 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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