Sign in to follow this  
Followers 0
JaysonSenatin

How to auto add comment in website

3 posts in this topic

Hello in my first post!

Performing auto action to a website. The website is provided with comment box.
Need help to insert text in the commentbox and send it repeatedly every 5 mins.

Website: http://dota-trade.com

While Developing an autoit code using  #include <IE.au3> unfortunately the website cant be surf in the Internet Explorer when your login, it says: Your browser does not support Javascript or Cookies.

I dont know if theres otherway to get javascript to IE but as I looked arround I just end up empty.

I tried also #include <WinINet.au3> to directly input the comment through the website but as i studied the code it seems advance and cant get any result even just trying to understand the samples!

like just for example this code:

I change "mozilla to google chrome" cause i dont have mozilla installed

#include "WinINet.au3"
DllOpen("wininet.dll")
 
$internet = _WinINet_InternetOpen("google chrome")
If $internet == 0 Then
    MsgBox(0, "Error", "Setup Error")
EndIf
$ip = "192.168.1.120"
$port = "80"
$internetconnect = _WinINet_InternetConnect($internet, $INTERNET_SERVICE_HTTP, $ip, $port)
 
If @error Then MsgBox(0, "Error", "Error 2")
 
 
 
$data = "go=go"   ; Data encoded
$type = "Content-Type: application/x-www-form-urlencoded\r\n"
$agent = "User-Agent: Mozilla/4.0\r\n"
 
$newdata = $agent & $type
$httprequest = _WinINet_HttpOpenRequest($internetconnect, "POST", "/test.web" )
$addheader = _WinINet_HttpAddRequestHeaders($httprequest, $newdata, $HTTP_ADDREQ_FLAG_ADD)
ConsoleWrite($addheader & @CRLF)
 
;$sendrequest = _WinINet_HttpSendRequest($httprequest)
$sendrequest = _WinINet_HttpSendRequest($httprequest,Default,StringToBinary($data))
 
ConsoleWrite($sendrequest&@CRLF)
local $readfile = Binary("")
Do
$readfile &= _WinINet_InternetReadFile($httprequest, 5000)
Until @error Or Not @extended
 
ConsoleWrite(binarytostring($readfile)&@CRLF)

I wanted to understand this code because this might give me any idea how to start in making a code using wininet.dll!

Help me on how to use wininet.dll or other better staff in performing an auto insert text to a commentbox in a website!

Thank you in advance!

Share this post


Link to post
Share on other sites



Ops i think i commented in a wrong section how to move my post to general help and Support?

Share this post


Link to post
Share on other sites

JaysonSenatin,

Welcome to the AutoIt forum. :)

Correct, you did post in the wrong section - I will move it for you. But more importantly, you appear to have missed the Forum rules on your way in. Please read them now (there is also a link at bottom right of each page) - particularly the bit about not discussing game interaction - and then you will understand why you will get no help and this thread will now be locked. It also seems that you are creating some form of spam tool - so it is a double whammy. :naughty:

See you soon with a legitimate question I hope - but please post it in the correct section. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0