Disabling javascript in Firefox with C++

Nov 26, 2009 at 1:25pm
Hi all
I am writing an application allowing my client to send all the contacts/friends on a popular polish social network website the same private message. It's not for spamming purposes - group members are all office colleagues and the point is to send them information on certain job-related events.

I wrote function that simulate pressing a keboard key. My plan was to open the browser window, enter the url to [composing the message] subpage, simulate pressing tab few times (enough to "reach" the textbox where I enter the actual message), paste the message and send it.
And here's the problem: if javascript in mozilla is enabled the number of tabs I have to press isn't constant - it changes depending what ad is beeing displayed at the moment. And that of course is random.
My question: Is there a way to disable javascript in firefox using c++ code? Other than simulating pressing the combination left_alt+t=>left_alt+o=>[reaching the 'content' tab]=>j (that's kinda crazy, but i was desperate =])

Or maybe i chose the wrong road from the start? Maybe there's more elegant way to reach this text box?

For the time beeing let's assume that using Firefox is required. My code opens the given URL in a default browser which is Firefox on my clients computer. But I am willing to consider other options if that will prove impossible to do.

Thanks in advance,
Kronos
Topic archived. No new replies allowed.