AzKay Posted June 30, 2006 Posted June 30, 2006 (edited) #include <IE.au3> $oIE = _IECreate( IniRead( "AutoPosterConfig.ini", "Thread", "Url", "")) While 1 _IEImgClick( $oIE, IniRead( "AutoPosterConfig.ini", "Reply", "Url", "")) _IENavigate( $oIE, "java script:emoticon('" & Iniread( "AutoPosterConfig.ini", "Message", "MessageBody", "") & "')") _IEImgClick( $oIE, IniRead( "AutoPosterConfig.ini", "Submit", "Url", "")) Sleep( 50000 ) WEnd My problem is: It doesnt click the "Submit" button. It puts in "Bump" but doesnt click submit. Any ideas? Edited June 30, 2006 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- #
AzKay Posted June 30, 2006 Author Posted June 30, 2006 And yes it IS the right url. Here is the Ini: [Thread] Url=http://www.gaiaonline.com/guilds/viewtopic.php?t=3894563 [Reply] Url=http://graphics.gaiaonline.com/images/template/button/forum_postreply.gif [Submit] Url=http://graphics.gaiaonline.com/images/template/button/submit_submit.gif [Message] MessageBody=Bump # MY LOVE FOR YOU... IS LIKE A TRUCK- #
gamerman2360 Posted June 30, 2006 Posted June 30, 2006 Instead of getting IE to click it you could look at the fourm form information and have autoit send the GET/POST information using the winhttp.winhttprequest object.
AzKay Posted June 30, 2006 Author Posted June 30, 2006 Mhm, how exactly do you use it? An example? # MY LOVE FOR YOU... IS LIKE A TRUCK- #
goflago Posted June 30, 2006 Posted June 30, 2006 (edited) Mhm, how exactly do you use it? An example?expandcollapse popup;Settings Global $Username = "" ; Username Global $Password = "" ;Password Global $Topic = "" ;Topic number Global $Forum = "" ;Forum number Global $Message = "" ;Text for reply Global $AttachSig = "On" ;Attach signature? Global $Exit = 1 ;Leave it Global $Numb = 0 ;Leave it Global $oHTTP = 0 ;Leave it Dim $TopicCount[2] = ["62","87"] ;Leave it Dim $NonceCount[2] = ["1325115508","133192243"] ;Leave it Dim $CreatedCount[2] = ["1151370821","1151377194"] ;Leave it Dim $DigestCount[2] = ["1131575506","890980296"] ;Leave it ;Hotkeys HotKeySet("^s","Program") HotKeySet("^e","EndProgram") Func Program() If $Exit = 1 Then $Exit = 0 Call("Start") EndIf EndFunc Func EndProgram() $Exit = 1 EndFunc ;Sleep While $Exit = 1 Sleep(100) WEnd Func Start() ;Navigate to Gaia Online & grab "gaia2_sid" cookie. Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET","http://www.gaiaonline.com",False) $oHTTP.SetRequestHeader("User-Agent","Mozilla/5.0 (Windows;U; Windows NT 5.0; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4") $oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded") $oHTTP.Send() Global $gaia2_sid = $oHTTP.GetResponseHeader("Set-Cookie: gaia2_sid") Call("Login") EndFunc Func Login() ;Login to Gaia Online $oHTTP.Open("POST","http://www.gaiaonline.com/gaia/login.php") $oHTTP.SetRequestHeader("User-Agent","Mozilla/5.0 (Windows;U; Windows NT 5.0; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4") $oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded") Local $Sid = StringTrimLeft($gaia2_sid,10) Local $Sid = StringLeft($Sid,32) Local $Login = "username=" & $Username & "&password=" & $Password & "&x=22&y=22&submit=Login&sid=" & $Sid $oHTTP.Send($Login) Call("Post") EndFunc Func Post() ;Post to topic If $Numb = 2 Then $Numb = 0 EndIf $oHTTP.Open("POST","http://www.gaiaonline.com/forum/posting.php") $oHTTP.SetRequestHeader("User-Agent","Mozilla/5.0 (Windows;U; Windows NT 5.0; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4") $oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded") $oHTTP.SetRequestHeader("Referer","http://www.gaiaonline.com/forum/posting.php?mode=reply&tc=" & $TopicCount[$Numb] & "&t=" & $Topic) Global $Post = "addbbcode22=black&addbbcode24=12&addbbcode26=left&compound_type=0&basic_type=0&ajax_submit=&message=" & $Message & "&attach_sig=" & $AttachSig & "&preview=&post=true&add_poll_option=&delete_poll=&update_poll_option=&delete_poll_option=&delete_poll_option_number=0&mode=reply&t=" & $Topic & "&f=" & $Forum & "&p=&nonce=" & $NonceCount[$Numb] & "&created=" & $CreatedCount[$Numb] & "&digest=" & $DigestCount[$Numb] & "&x=32&y=13" $oHTTP.Send($Post) Call("Poll") EndFunc Func Poll() Global $oHTTP = 0 Sleep(61000) $Numb = $Numb + 1 EndFunc ;Loop Script While $Exit = 0 Call("Start") WEnd ROFL! Edited June 30, 2006 by goflago
AzKay Posted June 30, 2006 Author Posted June 30, 2006 I dont need your whole bot xP, Just need an example. like, 2-3 lines. dont need anything else # MY LOVE FOR YOU... IS LIKE A TRUCK- #
AzKay Posted June 30, 2006 Author Posted June 30, 2006 (edited) <td><input type="image" src="http://graphics.gaiaonline.com/images/template/button/submit_submit.gif" onclick="if(window.processSubform){processSubform();}document.post.post.value='true';" alt="Submit" title="Submit" width="67" height="15" /></td> Hmm, thats the code for the button, is that why its not clicking? its an image, but its liek, a button, not a link? Edited June 30, 2006 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- #
AzKay Posted June 30, 2006 Author Posted June 30, 2006 Fixed. Turns out, it was because, after navigating to the javascript, it was waiting for the page to finnish loading, but nothing was loading, cause it was javascript. So yeah, Fixed. # MY LOVE FOR YOU... IS LIKE A TRUCK- #
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now