originalogy Posted September 2, 2007 Share Posted September 2, 2007 Here's my problem. I'm trying to stay logged into Facebook, so that I can leave my computer and have it auto login when it times out and logs me out of Facebook. So the method I took was to try to determine when the login button appears on the web page versus the regular logged in page. I then have the mouse click the login button, and then open up a Webpage on my desktop (which is a page that just has two Facebook pages in separate iframes). Then just basically repeat the whole thing so that I stay logged in indefinitely. Here's my code so far, and it isn't really working out at all. some of the code is probably just completely wrong. I've tried searching for tutorials, but I haven't really come across any that have helped me. while 1=1 Sleep(1000) $var1 = PixelGetColor ( 678 , 311 ) if $var1 = 3889560 then MouseClick("left", 678, 311, 1) Sleep(5000) Send("!F") Send("O") MouseClick("left", 152, 289, 1) Send("{ENTER}") else endif wend Thanks in advance for any help! Link to comment Share on other sites More sharing options...
BAM5 Posted September 2, 2007 Share Posted September 2, 2007 (edited) well you dont need else in there but it looks good and instead of "left" you can have "" and you can try this While 1=1 Sleep(1000) $var1 = PixelGetColor (678, 311) If $var1 = 3889560 Then MouseClick("", 678, 311, 1) Sleep(5000) Send("!{F}") Send("O") MouseClick("", 152, 289, 1) Send("{ENTER}") endif wendoÝ÷ ÚÚºÚ"µÍÚ[HOLBTÛY L BIÌÍÝHH^[ÙXÚ ÎÌLK ÎÌLKÎMM BRYÝÜ[BS[ÝÙPÛXÚÊ ][ÝÉ][ÝË ÎÌLKJBBTÛY L BBTÙ[ ][ÝÉÌÌÎÞÑI][ÝÊBBTÙ[ ][ÝÓÉ][ÝÊBBS[ÝÙPÛXÚÊ ][ÝÉ][ÝËMLKJBBTÙ[ ][ÝÞÑSTI][ÝÊBY[YÙ[¤ Edited September 2, 2007 by bam5 [center]JSON Encoding UDF[/center] Link to comment Share on other sites More sharing options...
originalogy Posted September 3, 2007 Author Share Posted September 3, 2007 It still isn't clicking the link when it comes up. What can I do to find out what is happening in the script? I don't know where to start to fix it. Link to comment Share on other sites More sharing options...
flip209 Posted September 4, 2007 Share Posted September 4, 2007 Does facebook send a popup new window? with a title? cause you could do a winwait("Titlename") then send a click or enter or what ever you need " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
originalogy Posted September 4, 2007 Author Share Posted September 4, 2007 Does facebook send a popup new window? with a title? cause you could do a winwait("Titlename") then send a click or enter or what ever you needI finally fixed it! It turns out that I just needed to add pauses in between instructions. I also coded two different if statements. One for if the text "you need to login to view this page" is above the login screen, and one for when it just presents the login and nothing above it. I left it for several hours and it worked marvelously. Just so you know, here's the code that worked for me.While 1=1 Sleep(1000) $var1 = PixelGetColor (678, 311) $var2 = PixelGetColor (676, 261) If $var1 = 3889560 Then Sleep(50) MouseClick("", 678, 311, 1) Sleep(5000) Send("!{F}") Send("O") Sleep(50) MouseClick("", 152, 289, 1) Send("{ENTER}") else If $var2 = 3889560 Then Sleep(50) MouseClick("", 676, 261, 1) Sleep(5000) Send("!{F}") Send("O") Sleep(50) MouseClick("", 152, 289, 1) Send("{ENTER}") else Sleep(5) endif endifwendIf you have other ways of doing this or more efficient ways, let me know! I'm very interested in learning this scripting language to do various things on my computer.By the way, in case you're wondering why I was writing this script, it's so that I score more points in The Office facebook app's trivia game. I have a webpage written to refresh the page that gets me more points, and I needed to stay logged in to refresh it. I'm #1 in points overall, and now I'll never be beat since I don't need to be near the computer to re-login every time!I love computers! :-) 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