[texhax] controlling pdf reader (was Re: beamer and "Read out loud")
Tom Schneider
toms at ncifcrf.gov
Thu Apr 22 20:27:29 CEST 2010
James:
> OK. You didn't reply yet as to what platform you're using.
I'm on OS X these days, but to me it's just another Unix OS so I don't
like Mac specific solutions.
> But with Linux, all you need do is:
>
> (i) Install xdotool which you can grab from:
>
> http://www.semicomplete.com/projects/xdotool
They claim it works on Macs too ...
> The description from its manual page reads:
>
> xdotool lets you programatically (or manually) simulate keyboard input and
> mouse activity, move and resize windows, etc. It does this
> using X11's XTEST extension and other Xlib functions.
>
>
> (ii) Add the following perl to your atchange script:
>
> my $wid= (`xdotool search --title "Adobe Reader"`)[0]; chomp $wid;
> system("xdotool key --window $wid ctrl+r");
>
> The first line will get the window used by AR. Note xdotool may return
> more than one window so we grab the first one and get rid of the line
> separator. The second line then sends the reload short-cut to the target
> window.
>
> I've tested it at my end (OpenSUSE 10.3+KDE+AR9.3.2) and
> it works quite nicely, but I've yet to fully explore
> xdotool so I can't comment on any foibles it might have.
Thanks for the tip!
Tom
Thomas D. Schneider, Ph.D.
National Institutes of Health
schneidt at mail.nih.gov
toms at alum.mit.edu (permanent)
http://alum.mit.edu/www/toms (permanent)
More information about the texhax
mailing list