I'm building a kind of a auto-cliker program and didn't found any working code. Can someone help or show me where find this?
Thank you in advance.
Website Login
-
- User
- Posts: 81
- Joined: Thu Sep 23, 2010 4:22 am
Website Login
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
Re: Website Login
If it's ok for you to use the webgadget, try to look at this code for some ideas.
http://www.purebasic.fr/english/viewtop ... 09#p350209
http://www.purebasic.fr/english/viewtop ... 09#p350209
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
-
- User
- Posts: 81
- Joined: Thu Sep 23, 2010 4:22 am
Re: Website Login
Thank you, that is a perfect start. I had modify your function to improve your code.
Code: Select all
Procedure WebGadget_SetFieldText (nGadget, sFieldName.s, sValue.s)
Protected sScript.s
;sScript = "document." +sForm + "." + sFieldName + ".value = " + sValue + ";"
sScript = "var elements = document.getElementsByName('"+ sFieldName + "');"
sScript + "for (var i = 0; i < elements.length; ++i)"
sScript + "{"
sScript + "if (elements[i].tagName.toLowerCase() == 'input')"
sScript + "{"
sScript + "elements[i].value='" + sValue + "';"
sScript + "break;"
sScript + "}"
sScript + "}"
WebGadget_ExecScript (nGadget, sScript)
EndProcedure
Last edited by Vitor_Boss® on Sun Jan 29, 2012 1:05 am, edited 1 time in total.
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
Re: Website Login
Thank you for letting me know.
Yes, using javascript *you* can write many useful functions to expand that code.
Just not myself because I'm not very fluent in JS !
Yes, using javascript *you* can write many useful functions to expand that code.
Just not myself because I'm not very fluent in JS !
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
-
- User
- Posts: 81
- Joined: Thu Sep 23, 2010 4:22 am
Re: Website Login
Sorry about that, I don't know expressions in English. What I mean is "I had modify your code to improve the login page".
Thank you very much. And I'm not a JS programmer too.
Thank you very much. And I'm not a JS programmer too.
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.