lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lynx-dev] Lynx on Linux / automating a search via a script or macro


From: Michael Jones
Subject: [Lynx-dev] Lynx on Linux / automating a search via a script or macro
Date: Sat, 21 Jan 2017 08:12:55 -0500

Hello,

I want to automate a Google search for "foo bar."

I tried using something like this with bash:  lynx
https://www.google.com/#q=foo+bar

But that didn't work.   I created a command script macro for Lynx.
Here is the file:

# Arg0 = lynx
# Arg1 = -cmd_script/tmp/coolmacro
# Arg2 = http://www.google.com
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow


I tried it out:

lynx -cmd_script=/tmp/coolmacro http://www.google.com

The result is I see google with "Sign in" highlighted. If I manually
press the down arrow once, I get to the field to enter Google text.
So this does not work.  I need to at least get to the text field to
input "foo bar."

If I change /tmp/coolmacro to have another "key Down Arrow" stanza,
the result of running lynx with this command script is I see "Images"
highlighted.  There is no number of "key Down Arrow" lines that I can
use to achieve my goal of getting the cursor of Lynx to be on the
search line/field for Google.  I tried many different combinations.

How do I search for "foo bar" automatically?

thanks,

Mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]