any hints on how to download a file with the browser widget?
I already tried e.g. to load a PDF file:
Code: Select all
on browserNavigateBegin pUrl
if pURL ends with ".pdf" then
libURLDownloadToFile pUrl, (specialfolderpath("dektop") & "/test666.pdf")
else
pass browserNavigateBegin
end if
end browserNavigateBegin
on browserDocumentLoadBegin pUrl
if pURL ends with ".pdf" then
libURLDownloadToFile pUrl, (specialfolderpath("dektop") & "/test666.pdf")
else
pass browserDocumentLoadBegin
end if
end browserDocumentLoadBegin
on browserUnhandledLoadRequest pUrl
if pURL ends with ".pdf" then
libURLDownloadToFile pUrl, (specialfolderpath("dektop") & "/test666.pdf")
end if
end browserUnhandledLoadRequest
On my Mac the browser simply displays that clicked file.
I would like to "catch" the users click on a link on the current displayed webpage and NOT pass it.
Something like "on linkclicked tLink" for text fields.
Any hints highly appreciated!
Best
Klaus