manipulating revBrowser?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

manipulating revBrowser?

Dr. Hawkins
I'm trying to meander through the lack of documentation on this.

Once I open a revBrowser to a site, can I manipulate it--fill fields, mouse
down, select from lists, etc.

And is there a tutorial or example for this?

In particular, I need to operate a single known website (free of javascript
and the like)


--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: manipulating revBrowser?

J. Landman Gay
On 4/15/14, 11:05 PM, Dr. Hawkins wrote:
> I'm trying to meander through the lack of documentation on this.
>
> Once I open a revBrowser to a site, can I manipulate it--fill fields, mouse
> down, select from lists, etc.
>
> And is there a tutorial or example for this?

The Help menu used to point to the sampler stacks but it doesn't any
more. It should. But they still ship with the product and there is a
sample browser stack inside the app bundle on Mac (or inside the app
folder on Windows):

LiveCode.app/Contents/Tools/Resources/Examples/Browser Sampler.rev

The dictionary also has all the commands and functions in the Browser
listing in the left-side column, but you've probably already found those.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: manipulating revBrowser?

Simon
In reply to this post by Dr. Hawkins
I have a feeling this request is about automatically filling in a form and clicking buttons via revbrowser.
It's been years since I last tried but I believe the answer is the same, a sad No.
type
click
Nothing

Never tried re-writing the web page and posting that.
But I did just figure out how to post info to php/cgi on mobile, so that might be possible.

Simon
Reply | Threaded
Open this post in threaded view
|

Re: manipulating revBrowser?

Mike Bonner
Not sure if its changed, but you can execute javascript in the browser.
Look at revbrowserexecutescript and revbrowsercallscript.  Even if the site
itself is free of javascript, you can most likely still use
revbrowserexecutescript to fill in and click things.  Maybe you can get
things working that way.

As for clicking and typing, its possible to tell lc to click at locations
but it only works on stacks. No clicking outside of lc, and unfortunately
revbrowser isn't part of the clickable.

Somewhere around here I have an external that gets around this.  (windows)
  I used it for a remote control app.  App on android, receiver on windows
so that I could move the mouse and click locations.  If you are able to
write in cpp(I'm not but still got something working luckily), you can
probably build an external to do what you need.

Once the framework and all was set up, I used the rnaHelloUser sample as a
base to make the clicker.

I am NOT a cpp programmer, haven't a clue really, but did get the clicker
to work.  One call does both up and down of the left mouse button:


void clickIt(char *p_arguments[],int p_argument_count, char **r_result,Bool
*r_pass, Bool *r_err)
{
const char *t_error;
t_error = NULL;

mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);

*r_result = strdup("");
*r_pass = False;
*r_err = False;
}

Then the declarations

EXTERNAL_BEGIN_DECLARATIONS("clicky")

EXTERNAL_DECLARE_COMMAND("clickit",clickIt)



##
With the new stuff coming out i'm sure writing externals is a different
beast than it was, but even so.  If all you need to do is be able to click,
and send keystrokes to revbrowser, this might do it.  I'll have to dig out
clicky and see if it will actually click in revbrowser, though i'm sure it
will.

I'm also not sure if the switch to webkit is done yet. (that IS what's
happening right?)  Things might improve, or get worse as far as
manipulating the browser, another thing i'm clueless about. :)


On Tue, Apr 15, 2014 at 11:35 PM, As_Simon <[hidden email]> wrote:

> I have a feeling this request is about automatically filling in a form and
> clicking buttons via revbrowser.
> It's been years since I last tried but I believe the answer is the same, a
> sad No.
> type
> click
> Nothing
>
> Never tried re-writing the web page and posting that.
> But I did just figure out how to post info to php/cgi on mobile, so that
> might be possible.
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/manipulating-revBrowser-tp4678333p4678336.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: manipulating revBrowser?

Dr. Hawkins
On Wed, Apr 16, 2014 at 7:23 AM, Mike Bonner <[hidden email]> wrote:

> Not sure if its changed, but you can execute javascript in the browser.
> Look at revbrowserexecutescript and revbrowsercallscript.  Even if the site
> itself is free of javascript, you can most likely still use
> revbrowserexecutescript to fill in and click things.  Maybe you can get
> things working that way.
>

If I'm reading this correctly,  I can send my own message (whatever's
javascript for "put Abc123 into field SomeField",  "chose ChooseMe from
scrolling list scroll" or "push button someButton") to a web page?


> As for clicking and typing, its possible to tell lc to click at locations
> but it only works on stacks. No clicking outside of lc, and unfortunately
> revbrowser isn't part of the clickable.
>
> Somewhere around here I have an external that gets around this.  (windows)
>   I used it for a remote control app.  App on android, receiver on windows
> so that I could move the mouse and click locations.  If you are able to
> write in cpp(I'm not but still got something working luckily), you can
> probably build an external to do what you need.
>

I can't even remember how many times I've learned and forgotten C & C++
over the years.  Most languages stick, but not those.   But the sites I
need to manipulate are simple enough:  all I really need to do is fill
fields, select from scrolling lists, and push buttons.




--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: manipulating revBrowser?

Mike Bonner
Yeah, something like this shoved into a variable tJavascript: document.
getElementById("username").value="Username";

get revbrowserexecutescript(sBrowserId,tJavascript)
would hopefully fill in a form element with the id "username" with the
value "Username"

>If I'm reading this correctly,  I can send my own message (whatever's
>javascript for "put Abc123 into field SomeField",  "chose ChooseMe from
>scrolling list scroll" or "push button someButton") to a web page?




On Wed, May 7, 2014 at 4:37 PM, Dr. Hawkins <[hidden email]> wrote:

> On Wed, Apr 16, 2014 at 7:23 AM, Mike Bonner <[hidden email]> wrote:
>
> > Not sure if its changed, but you can execute javascript in the browser.
> > Look at revbrowserexecutescript and revbrowsercallscript.  Even if the
> site
> > itself is free of javascript, you can most likely still use
> > revbrowserexecutescript to fill in and click things.  Maybe you can get
> > things working that way.
> >
>
> If I'm reading this correctly,  I can send my own message (whatever's
> javascript for "put Abc123 into field SomeField",  "chose ChooseMe from
> scrolling list scroll" or "push button someButton") to a web page?
>
>
> > As for clicking and typing, its possible to tell lc to click at locations
> > but it only works on stacks. No clicking outside of lc, and unfortunately
> > revbrowser isn't part of the clickable.
> >
> > Somewhere around here I have an external that gets around this.
>  (windows)
> >   I used it for a remote control app.  App on android, receiver on
> windows
> > so that I could move the mouse and click locations.  If you are able to
> > write in cpp(I'm not but still got something working luckily), you can
> > probably build an external to do what you need.
> >
>
> I can't even remember how many times I've learned and forgotten C & C++
> over the years.  Most languages stick, but not those.   But the sites I
> need to manipulate are simple enough:  all I really need to do is fill
> fields, select from scrolling lists, and push buttons.
>
>
>
>
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode