Stupid Mac::Glue Tricks

| | Comments (0)

perl -MMac::Glue -e '$s = new Mac::Glue "Safari"; $d = $s->obj(document => 1); $s->do_javascript("window.location.reload()", in => $d), sleep 60 while 1'

Yes, I am using Perl to talk to Safari via Apple events to have it execute some JavaScript. It's a bit boggling to me that there's no "reload" event in Safari's dictionary, but, whatever.

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Entry

This page contains a single entry by pudge published on November 13, 2003 4:07 PM.

The Matrix Revolutions (SOME SPOILERS) was the previous entry in this site.

mod_gzip Calling Perl Handlers Twice is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.