0

I am a freelancer, I have to upload images on a website, and I need automation. Taking example of this website, in google chrome, I can open console and enter

 $('#wmd-image-button').click()

And this will open popup-up to insert image.

I was using Internet explorer with autohotkey, using "DOM", here is the problem: I cannot run internal functions like "CKEDITOR.tools.callFunction(4,this);",

I can only use functions like wb.document.getElementById("cke_8").Click(), but on their website, the button is triggered with mousedown, and nothing happens with click().

IE is not letting me trigger mousedown() and I am stuck at this part! Should I try to learn to build chrome extension for this? OR is there a way to trigger internal javascript functions using AHK in IE? Or Is there a completely different "correct" way to press the "image upload" button programmatically?

PS: If there is something wrong with this question, please comment before downvoting!

0

AutoHotkey provides more of an external capability to the browser vs. easy access to the internal content and functions of a page loaded within the browser.

Are you stuck with IE and Chrome? Can you use Firefox and possibly the GreaseMonkey add-on to automate this?

| improve this answer | |
  • its an old question, I should have replied to myself. This button is actually imageupload button on ckeditor. I tried to trigger this button in chrome, firefox etc. The button only triggers when I manually click it, but does not get triggered by javascript (probably due to security reasons). But element.focus() worked. So now I use autohotkey to send {enter} key when focus is on the button. Does not always work, but it gets my job done most of the time :) – user257838 Sep 27 '15 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy