BubbleGumDancer Posted October 7, 2010 Share Posted October 7, 2010 Opt("MouseCoordMode", 0) #include <IE.au3> HotKeySet("{ESC}", "Close") Sleep(1000) HotKeySet("{delete}", "Main") $file = FileOpen("Password.ini", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "File open error fucking hell sad message box") Exit EndIf FileClose($file) $Account = IniRead ( "Password.ini", "AD", "Account", "default" ) $Password = IniRead ( "Password.ini", "AD1", "Password", "default" ) Global $ListFile = FileOpen ( "List.txt", 0 ) If $ListFile = -1 Then MsgBox ( 0, "Error", "Unable to open List.txt." ) Exit EndIf Func main () logon () ;logs in to youtube Sleep(1000) logon1 () ;logs into youtube Sleep(1000) logon2 () ; sends data to login box Sleep(1000) EndFunc Func logon () _IECreate ("www.youtube.com") _IELoadWait("http://www.youtube.com") WinSetState("YouTube - Broadcast Yourself. - Windows Internet Explorer","",@SW_MAXIMIZE) EndFunc Func logon1 () Sleep(100) MouseMove(970, 179) Sleep(100) MouseClick("Left") Sleep(1000) logon () ;now log In Sleep(100) MouseMove(774, 396) Sleep(10) MouseClick("Left") Sleep(10) EndFunc Func logon2 () Send($Account) Sleep(10) Send("{TAB}") Sleep(10) Send($Password) Sleep(100) Send("{ENTER}") Sleep(100) EndFunc Func Close() Exit EndFunc while 1 WEnd the purpose of this script is to log into youtube to keep the "last visit date" with in lets say an hour. (I have not added functions to check time and do function @ time/day yet. i have tryed scripting it differently but it still when its logging the account into youtube but keeps making ie windows and i have no idea whats wrong with it. i made small functions to keep from looping and that failed then i made a main function and that is failing too It just needs 1 window to be made not hundreds that keep poping up really fast. If you were twice as smart, you'd still be stupid. Link to comment Share on other sites More sharing options...
trung0407 Posted October 7, 2010 Share Posted October 7, 2010 maybe try the approach to use _IEFormElementSetValue and other function related. It's really hard to follow when there is lots of Send and MouseClick Link to comment Share on other sites More sharing options...
wakillon Posted October 7, 2010 Share Posted October 7, 2010 trun0407 is right , and you should use autoit tag for post your code ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts 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