trešdiena, 2011. gada 20. aprīlis

Applescript to check .LV short domain name availability

set the_list to {"q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "a", "s", "d", "f", "g", "h", "j", "k", "l", "z", "x", "c", "v", "b", "n", "m", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}
tell application "Safari"
activate
set URL of document 1 to "https://www.nic.lv/client/check_domain"
delay 10
end tell


repeat with one_let in the_list
repeat with two_let in the_list
tell application "Safari"
do JavaScript "document.getElementById('domain').value = '" & one_let & two_let & "';" in document 1
do JavaScript "$('checkcontent').childElements()[0].submit();" in document 1

delay 5
repeat until ((do JavaScript "document.readyState" in document 1) is "complete")
delay 2
end repeat
end tell

end repeat
end repeat

1 komentārs:

KC teica...

Hi. I really enjoyed my brief visit on your site and I’ll be sure to be back for more.
Can you please consider placing my website on your link list?

Please email me back.

Thanks!
Kevin
kevincollins1012 gmail.com