Hi,
How to disable cache in HTTPQuery?
I have created a little script that downloads a html page every 1 minute.
Code:
http://www.petitiononline.com/mod_perl/signed.cgi?dedis4mw
I wanted to use HTTPQuery in order to download the html into a var.
When using HTTPQuery the page that is saved is the same one all the time.... (caching?)
I used
urldownloadtofile and it get me a new page every time.
I am don't want to use the
urldownloadtofile command in order not to use a temp file.
Code:
#Persistent
#include %A_ScriptDir%\httpQuery.ahk
;Menu, Tray, NoStandard
Menu, Tray, add, Exit, Exit_Menu
Menu, Tray, Default , Exit
Menu, Tray, Tip, MW2 Petition Counter
First_Run=0
SetTimer, Get_Sig, 60000
Get_Sig:
html := ""
URL:= "http://www.petitiononline.com/mod_perl/signed.cgi?dedis4mw"
length := httpQuery(html,URL)
varSetCapacity(html,-1)
Loop, Parse, html ,`n`r
{
Current_Line_TXT=%A_LoopField%
Current_Line_Number=%A_Index%
Search_String=Total Signatures
If Current_Line_TXT Contains %Search_String%
{
RegExMatch(Current_Line_TXT,".*6>(.*)\sT",R_Result)
Result=%R_Result1%
If(First_Run=0)
{
First_Run=1
TrayTip, MW2 Petition Counter, %Result% Players signed!, 5,1
Before=%Result%
}
Else
{
Diff:=(Result-Before)
TrayTip, MW2 Petition Counter, %Result% Players signed!`nA minute ago we had %Before% signatures`nThats %Diff% More!, 5,1
Before=%Result%
}
Return
}
}
Return
Exit_Menu:
Msgbox, 36, MW2 Petition Counter, Are you sure you want to exit?
IfMsgBox, Yes
Exitapp
Else
Return
Help will be very appreciated
Twhyman