I have a program that generates xml files. I need to use the xml data to fill out a form on a website. (and then use a loop to do this multiple times). From the research I've done so far, it sounds like the way to do this is to have imacros open the xml file in the browser, then scrape the data, then open the web form and fill it out.
Now, how does all that fit into one script? Can one script both read data and then use it to fill out a form?
I also looked into autohotkey but it seemed a lot more complicated than imacros - does anyone have an opinion on what is more suitable for this task?
I would appreciate if anyone can point me in the right direction here. Thanks!
(in case anyone asks, I thought about skipping the form and using curl to post the data, but it turned out to be way too complicated. it's a government site, using servlets to validate information, and i gave up on that.)
AutoHotkey is a fine choice for this task. More specifically you want to use COM Objects to access your XML data and Internet Explorer COM Objects to paste information to your website.
XML COM Example:
IE COM Example:
Perhaps this example of how to scrape XML data under 'iMacros for Firefox' will be helpful to you:
Anyway I believe that you should apply the JavaScript Scripting Interface in order to accomplish successfully this task.