Jump to content

How could you do this?


Recommended Posts

I need to be able to do 1 of 2 things.

1. Is there a way to copy and paste stuff from a website that doesn't let you highlight stuff?

2. Is there a way to wait until a page loads in FireFox, then do stuff, and if it doesn't load(because the website is too busy and is slow) have it refresh then wait until it is loaded? Does WinWaitActive work like that, and if it does, can you make it so it waits until a window is loaded even if you don't know its name?

Link to comment
Share on other sites

Would this load the website, check and see if there is a dark green pixel(or whatever color it is) at the spot, and if there isn't have it refresh until there is a pixel there?

Global $n=152, $t = 0, $pix

while $n < 494 
    MouseClick("left", 770, 64)
    Send("{DELETE}http://serebii.net/pokedex-dp/" & $n & ".shtml{ENTER}")
    $pix = PixelGetColor(477, 332)
    If $pix = 0x383838 Then
        
    Else
        While $pix != 0x383838
            MouseClick("left", 93, 68)
            Sleep(10000)
            PixelGetColor(477, 332)
        WEnd
    EndIf
    
;put stuff to do here
    
WEnd

Also, how would you make something copy and paste? Would you highlight it with MouseClickDrag, Send("{CRTL}C"), then Send("{CTRL}P"). The help files don't really explain how to copy and paste, so yeah :rolleyes:

Ugh, I just tested it and the $pix != color thing doesn't work. Whats another way I can continue that loop forever until there is that color at PixelGetColor?

Edited by Zamp
Link to comment
Share on other sites

for copy paste lookup clipput(), clipget(), Send("^c"), and Send("^v")

and for the ten second delay... you have it "sleep(10000)", but looking up TimerInit() and TimerDiff() and using those instead would be much nicer IMO.

Also you are not ever going to exit your loop without updating the While statements variable ($pix)

While $pix <> 0x383838
            MouseClick("left",LË

BÛY
L
B   ÌÍÜ^H^[Ù]ÛÛÜ

ÍË33"²÷RæVVFVBFòWFFRFRFFf÷"b33c·¢tVæ@
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...