hey, so i was trying to script myself some bot for a daily routine actions on this soccer simulator and i encountered a problem- as im trying to log into my account it somehow doesnt fill and send my log on information and i cannot seem to find the problem, tryed many alternatives and none worked and that is what brings me here. Any ideas?
[CmdLetBinding()]
param(
$password = $(throw "The 'password' parameter is required!")#,
#$username = $env:username
)
$username = "None of your business :D"
$ie = New-Object -com InternetExplorer.Application
$doc = $ie.document
$ie.navigate("www.soccerproject.com")
#$ie.visible = $true
do {Sleep 1} until (-not ($ie.Busy))
try {
$usernameField = $doc.getElementById('login')
$usernameField.value = $username
$passwordField = $doc.getElementById('password')
$passwordField.value = $password
#$button = $doc.getElementsByTagName('#') | where{$_.className -eq 'superbutton'}
#$button.click()
$ie.navigate("http://www.soccerproject.com/spnewl_start.php")
do {Sleep 1} until (-not ($ie.Busy))
} catch {$null}You may want to visit the site yourself and check the elements ID, since i could not find the one belonging to the 'superbutton' Log On (wtf is this class anyway?!)
...the script is made in PowerShell v2.