applescript - Is this possible ?

Discussion in 'Mac Programming' started by wetgreen, Sep 18, 2011.

  1. wetgreen macrumors newbie

    Joined:
    Sep 18, 2011
    #1
    Hi,

    I would like to accomplish following task using automater/applescript.

    If some experts says if it possible then I will start learning applescript.

    Here are the abstract steps.

    1.Go to website and login (Joomla based website admin-login)
    2.Go to a specific category and create a new content.
    3.Copy text from a local txt file and paste into the new content.
    4.Save the content
    5.Logout the the site.

    Is it possible to do?
    I need to automate this. because I have to do these steps for 1000s of times.

    Thanks in advance for your help.
    Cheers!
     
  2. foidulus macrumors 6502a

    Joined:
    Jan 15, 2007
    #2
    It's certainly within the realm of possibility(Safari has a lot of applescript actions associated with it)....BUT it's certainly not going to be straightforward. Your best bet is to use the Joomla API. The Joomla API is going to be much more straightforward and probably much more future-proof than trying to shoehorn what you want to do into some Applescript.
     
  3. larkost macrumors 6502a

    Joined:
    Oct 13, 2007
    #3
    Additionally, AppleScript is going to be the wrong choice for this. Much better would be to use a more text-oriented scripting language, especially one that has good http support. In my descending order of preference for this would be: Python, Perl, and bash (or other shell scripting language). That last one is going to require more work as you probably will be making multiple calls to curl, and you are going to need to save cookies from one call to the next. All are going to require you to come to understand how logging in works from a http standpoint (good knowledge to have), and a bit about http.

    But foidulus is correct, this whole direction is a huge hack, and not a good direction to go in.

    But I do feel a bit dirty here, since the only reasons I can think about to do this are: 1) spamming message boards, and 2) spamming cross-site exploits onto message boards. Anything else and there would be far better ways to to this from the database side.
     
  4. wetgreen thread starter macrumors newbie

    Joined:
    Sep 18, 2011
    #4
    Hi,

    Thanks for your replies.

    Your reply gave me some idea to understand the problem. I'm a chip design engineer with little software background.

    I never thought of using perl for this. I know this already.

    working with DB, I am little worried about this since sometime ago i messed up my site and the site was down for week.

    I decided to go in one of these two directions "Perl" and "Joomla API".

    Thanks for clearing some clouds :)

    Cheers!
     

Share This Page