Jump to content

winwait or something similar, pls help


Recommended Posts

Hey guys. I am new to autoit and found my first problem that i cant get my head around. I am trying to write a simple script, that copies some text, then clicks somewhere, then waits till the next page is loaded, and paste it again. Now I tried to use winwait but it doesnt seem to work. In specific: I have a Internetsite, copying text from it, clicking a button, waiting till next page is loaded, pasting what i just coppied before. The problem is that the title of the ie window always changes a bit, but there is a specific text, like 1234 on the next page after clicking the button. once that text apears, i want the script to paste the copied stuff.

Would be really great if somebody could help me out here, would safe me about 2 hours of work while getting to know autoit a bit better =)

Heres my script so far:

$accountstoget = 20
$accountsgotten = 0
Do
    sleep(1000)
    MouseClickDrag ( "left", 364, 88, 406, 88, 10) 
    Send("^c");copying
    sleep(500)
    MouseClick( "left", 400, 100, 1, 20);clicking the button
    WinWait ( "Microsoft Internet", "1234" );waiting till the next page loads with 1234 in it, this is where i am stuck, macro wont continue even though page is loaded and it sais 1234 in it
    MouseClick ( "left", 864, 88 , 1 , 10 ) 
    Send("^v")
    sleep(500)
    $accountsgotten = $accountsgotten + 1
        MsgBox(0, "doneit", $accountsgotten)
Until $accountsgotten = $accountstoget
Edited by crazycrash
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...