Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Which scripting language to use?

  • 17-04-2009 11:05AM
    #1
    Registered Users, Registered Users 2 Posts: 60 ✭✭


    Hi I want to create a desktop app (c# prob) that controls or manipulates a form on a 3rd party web page. This would save me loading the browser, loggin on, inputting data, clicking buttons etc. I would need to provide my own log on information as well of course.

    Not having done much work in this area I was wondering would a scripting language like pearl, python, ruby allow me to do such? Which one is best IYO?

    If using one of these would I be able to execute the script easily from my desktop app?

    I was thinking script as may need to hook into the same script from applications on different platforms (eg mobile). Thanks for the heads up, just gathering info before I head down the wrong road!


Comments

  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    I'm completely confused. If it's a desktop app and an existing form, then none of the web platforms apply.

    And if it's a 3rd party web page (where you don't have any access other than the web) you're probably looking at a browser plugin.

    But be careful; a lot of "automated" tasks like this could be viewed as "DoS" attacks or hack attempts, so if the 3rd party doesn't know about it then it mightn't work for long if they become concerned and block your IP.


  • Closed Accounts Posts: 18,966 ✭✭✭✭syklops


    Perl is your ownly man for something like this.

    Check out:

    http://www.perl.com/pub/a/2003/01/22/mechanize.html

    I have used it before to automate actions on a website and it rocks.

    Long live the Camel!

    EDIT: I just realised I am wearing a perl camel t-shirt. Strange...


  • Registered Users, Registered Users 2 Posts: 60 ✭✭Owen101


    Cheers, will start into pearl then was just looking for the start point ;)

    Liam, its definitely a small desktop application and not a web app (otherwise I may as well use the original site). Basically this thing would allow me to enter the same information into the desktop app as if using the 3rd party web site. Im just want to avoid loading up the browser! The 3rd party would know about me as Id be using the same login as if I was using the site directly.

    I enter my data in the form in the desktop app, it goes away to the 3rd party website and, using the script or whatever in the background, enters my data there and clicks the submit button for me.

    Although this all sounds very pointless, the automation factor would be a real time saver for me, especially if I can do a moble application to use the same script - its a v long winded process to get to the form on the web site I need if you follow my drift..


  • Closed Accounts Posts: 532 ✭✭✭Pub07


    You just want to autocomplete forms? And autohotkey script could do that no problem.


  • Registered Users, Registered Users 2 Posts: 2,119 ✭✭✭p


    There's a library called CURL that's designed for exactly this. It's often used with Perl, but perhaps there's a C# port too. Here's what a quick google found me:

    http://curl.haxx.se/
    http://en.wikipedia.org/wiki/CURL
    http://www.codeproject.com/KB/IP/urlnewwindow.aspx


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,931 ✭✭✭Ginger


    If its just posting data to a form, its pretty trivial in C#

    Just open an network connection, set the http headers and post the data,


  • Closed Accounts Posts: 3 Snake Logan


    If you're used to C# or Perl, that will probably do the job. Otherwise, I'd recommend trying Python or Ruby.

    Dive Into Python has some good advice & sample code for HTTP stuff.


Advertisement