Sign in to follow this  
Followers 0
originalogy

Newbie Question, Mouse Clicking not working

5 posts in this topic

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!

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by bam5

[center]JSON Encoding UDF[/center]

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 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

endif

wend

If 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! :-)

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