Simulating mouse clicks with http.request

Hi! You know on some websites that use php or AJAX to allow you to send information usually have a submit button? I was wondering how to allow Codea to send a virtual mouse click.



There’s no way, unless your running a VM or executing PHP or JS or whatever their using in Codea. You can only get the HTML of the webpage.

@prynok if you want to simulate a mouse click from the ipad, not codea, then i remember seeing an app on the appstore that emulates a mouse in a browser. Dont remen
Ber the name though…

@Jmv38 - The Puffin browser in the App Store does this… its also supports Flash as well. :slight_smile:

You don’t need to simulate the button.

The trick is to look at the source of the webpage (on your PC or mac) and figure out what URL the button calls when pressed, and what information it sends to the server. Then you can http.request it.

@ignatz good point. And you can look at the page code from your ipad too (some apps allow to see source code)

@Jmv38 why take an app if you can view it in safari? :wink:

just make a bookmark (i think it’s called like that)
then edit the javascript and paste this in


then whenever you wanna view the source of a website, just click the bookmark when you’re on the page you wanna know the source off :wink:

@Jmv38 Wait, I thought if you got the data with http.request it gives you the source for any website, is that false?

@stevon8ter totally cool! Thanks! Do you have more in stock? =D>
@prynok you are right, but it might be difficult to interpret: depends on the encoding, etc…

@Jmv38 nope my box of tricks is empty now xD

but note that this isn’t my code, this is someone elses code…