Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cookies with GetHtml (with QM Internet functions)
#1
Ive searched in the forum but i cant find anything about this:

Is it possible to accept/read cookies when i open a webpage with GetHtml?

Is there a way to see the QM Browser visualli?
And can i define a Screen Resolution for the QM Browser?
#2
Cookies of web pages downloaded by QM functions are stored in Internet Explorer's cookies folder.

Macro Macro1424
Code:
Copy      Help
out

;download web page
str url="http://www.quickmacros.com/forum"
IntGetFile url _s
;;or
;HtmlDoc hd.InitFromWeb(url)

;find newest cookie from the website
Dir d; long ft _ft; str cookie
foreach(d "$Cookies$\g@quickmacros[*].txt" FE_Dir)
,_ft=d.TimeModified
,if(_ft>ft) ft=_ft; cookie=d.FileName(1)

;results
out cookie
str s.getfile(cookie)
out s

How to know cookie name of your website? Use file trigger.

Function cookies
Trigger $f 0x44F "$Cookies$"     Help - how to add the trigger to the macro
Code:
Copy      Help
function event $name [$newname]
;event: 1 added, 2 removed, 4 renamed, 8 modified
out "%i %s" event name

;sel event
,;case 8
,;sel name 3
,,;case "*\Cookies\g@quickmacros[*].txt"
,,;;1
,,;str s.getfile(name)
,,;err ret ;;probably already deleted
,,;out "---- %s ----" name
,,;out s
,,;out "--------------------------------"
#3
Quote:Is there a way to see the QM Browser visualli?

Use web browser control in dialog. Many examples exist in forum. Search for WebBrowser. For example Collected QM apps, functions, samples


Quote:And can i define a Screen Resolution for the QM Browser?

:?:


Forum Jump:


Users browsing this thread: 1 Guest(s)