Ok so I am trying to make a bot in AHK..I never use this and its my first time no hating LOL..I know various programming languages and such and figured this would be easy, but its not LOL
Anyway, I have 2 questions. 1 How do you impliment the gmail trick into the bot for the the first 2 imput fields?
And #2 it submits to the search at the top of the page and not the register button, how do you define what submit button on a page when has more than one?
Here is what I have so far which doesnt work.
I used the COM tutorial for most of that while I further my understanding..I dont want to be spoonfed,so if someone can help can you explain what your answer is and means and not just say here. K thanks
FileInstall, IMDB.txt, IMDB.txt
#Include Com.ahk
Gui +LastFound
Gui, Add, Edit, x12 y12 w110 h20 vuserinput1, Email
Gui, Add, Edit, x132 y12 w110 h20 vuserinput2, Confirm Email
Gui, Add, Edit, x12 y42 w110 h20 vuserinput4, Year of Birth
Gui, Add, Edit, x132 y72 w110 h20 vuserinput5, Zip postal code
Gui, Add, Edit, x12 y72 w110 h20 vuserinput6, Country
Gui, Add, Edit, x132 y102 w110 h20 vuserinput7, password
Gui, Add, Edit, x12 y102 w110 h20 vuserinput8, confirm password
Gui, Add, Button, x132 y132 w110 h20 , OK
COM_AtLaxWinInit()
pwb:=COM_AtlAxGetControl(COM_AtlAxCreateContainer( WinExist(), 1, 1, 500, 500, "shell.explorer") )
COM_Invoke(pwb, "Navigate", "https://secure.imdb.com/register-imdb/?why=personalize")
Gui, Show, x100 y200 h500 w500, Bot
Return
ButtonOK:
Gui, Submit, NoHide
JS := "javascript:document.getElementById('email1').valu e='" userinput1 "';void(0)"
JS1 := "javascript:document.getElementById('email2').valu e='" userinput2 "';void(0)"
JS2 := "javascript:function D(a,b){c=b.split('|');d=false;for(q=0;q<c.length;q ++){if(c[q]==a)d=true;}return d;}function E(){f1=document.forms[1];for(i=0;i<f1['gender'].length;i++){if(D(f1['gender'][i].value,'F')){f1['gender'][i].checked=true;}}}E()"
JS4 := "javascript:document.getElementById('year').value= '" userinput4 "';void(0)"
JS5 := "javascript:document.getElementById('postal').valu e='" userinput5 "';void(0)"
JS6 := "javascript:document.getElementById('country').val ue='" userinput6 "';void(0)"
JS7 := "javascript:document.getElementById('pass1').value ='" userinput7 "';void(0)"
JS8 := "javascript:document.getElementById('pass2').value ='" userinput8 "';void(0)"
JS9 := "javascript:document.forms[0].submit()"
M = 1
loop
{
COM_Invoke(pwb, "Navigate", JS)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS1)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS2)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS4)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS5)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS6)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS7)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS8)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS9)
Sleep, 100
Sleep, 2500
COM_Invoke(pwb, "Navigate", "https://secure.imdb.com/register-imdb/?why=personalize")
Sleep, 1500
}
GuiClose:
Exitapp[/CODE]


LinkBack URL
About LinkBacks
Reply With Quote


