Else it is easy to update my database script , just change i := to last-1 page, for a new section change url and copy script to a new directory.
Maybe that will give you idea, just a rough draft script, an attempt to a brute force with a modo account (captcha, less phpbb secoruity against bot), phpbb search engine works on it, but will take some months to post all, need a real lexer to format to a redeable thing, in other words will post by only one person and first line will be posted by XX at XX/XX/XX XX:XX :
Code: Select all
#NoEnv
SetWorkingDir % A_ScriptDir
URL := "http://www.ahkarchive.com/phpBB3/posting.php?mode=post&f=3"
source := A_ScriptDir "\tutorials"
Gui, Add, ActiveX, w980 h640 vWB, Shell.Explorer
WB.Navigate("http://www.ahkarchive.com/phpBB3/index.php")
Gui, Show
;ComObjectError(0)
return
²::
Loop, % source "\*.*", 2, 0
{
Loop, % A_LoopFileFullPath "\*.*", 0, 0
{
FileRead, data, % A_LoopFileFullPath
page := a_index
if !(p1 := InStr(data, "ipsType_pagetitle"))
break
p2 := InStr(data, "</h1>", 0, p1+1)
title := HTMLDecode(SubStr(data, p1+19+1, p2-p1-19-2))
loop
{
p1 := InStr(data, "<div itemprop=""commentText"" class='post entry-content '>", 0, p2)
if !p1
break
p2 := InStr(data, "<script type='text/javascript'>", 0, p1+1)
text := SubStr( data, p1, p2-p1)
;msgbox % a_index * page "-" title "`n" text
;continue
StringReplace, text, text, <pre style="" class="prettyprint lang-auto linenums:0 prettyprinted">, [code], All
StringReplace, text, text, <pre style="" class='prettyprint lang-auto linenums:0 prettyprinted'>, [code], All
StringReplace, text, text, <pre class="prettyprint lang-auto linenums:0">, [code], All
StringReplace, text, text, <pre class='prettyprint lang-auto linenums:0'>, [code], All
StringReplace, text, text, </pre>,
;StringReplace, text, text, <em class="bbc">, , All
;StringReplace, text, text, </em>, , All
;StringReplace, text, text, <strong class="bbc">, , All
;StringReplace, text, text, </strong>, , All
;StringReplace, text, text, <p class="citation">, [quote], All
;StringReplace, text, text, <p class='citation'>, [quote], All
;StringReplace, text, text, </blockquote>, [/quote], All
;<span style="color:#FF0000"></span>
;<img src="//cdn.autohotkey.com/board//public/style_emoticons/default/sad.png" class="bbc_emoticon" alt=":(">
;<p class="citation">Quote<span></span></p><blockquote class="ipsBlockquote built" data-author="" [vxe]":1v4j5fel"=""><p><strong class="bbc">Why bother with it if I can do the same thing with "If/Else"?!</strong><br>The ternary operator has a coolness factor rating of 14 units = sunglasses. Using it makes your code shorterr, cooler, and more complicated-looking. <br></p></blockquote>
;
;<p class="citation">tidbit, on 07 Sept 2013 - 10:14 PM, said:<a href="http://www.autohotkey.com/board/index.p ... pid=611919" rel="citation" class="snapback right"><img src="//cdn.autohotkey.com/board//public/style_images/marble/snapback.png"></a></p><blockquote class="ipsBlockquote built" data-author="tidbit" data-cid="611919" data-time="1378584855"><p>I think some grammar and some examples could be fixed up a bit.</p></blockquote> <br>
;10µs -> 10µs
text := HTMLDecode(text)
StringReplace, text, text, <!-- m -->, , All
StringReplace, text, text, ’, `', All
subject := title
message := text
if ((a_index = 1) && (page = 1))
WB.Navigate(URL)
else
WB.Navigate(newURL)
while, WB.ReadyState != 4
sleep, 10
if (a_index = 1)
WB.Document.getElementById("subject").value := subject
WB.Document.getElementById("message").value := message
Sleep 4000
WB.Document.getElementById("post").click
Sleep 2000
tooltip % a_index + (page-1)*15
if (a_index = 1)
loop
if (WB.Document.all[76].innerText != "Information") {
sleep 200
newURL := WB.Document.all[90].href
break
}
;<a href="./posting.php?mode=reply&f=3&t=303"><img src="./styles/subsilver2/imageset/en/button_topic_reply.gif" alt="Reply to topic" title="Reply to topic" /></a>
}
}
}
return
esc::
exitapp
HTMLDecode(html)
{
StringReplace, html, html, `n, </p>, All ;`
document := ComObjCreate("HTMLFile")
document.write(html)
return document.body.outerText
}[/code]
but as I said it is a rough draft script, tank, you, and me seem try 3 dirrents ways, it's all good, however if you have a good parser to format all of those text, POly did some mess they are sometimes 3 or 4 format just for code tag, quote or other thing... In other word HTMLDecode function is good and easy, but that will create some new strange char because of multiple Poly formated forum changes...
If there is an expert with phpbb bot...