This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Automation in Konqueror?

Tags: None
(comma "," separated)
User avatar
joon
Registered Member
Posts
20
Karma
0

Automation in Konqueror?

Wed Aug 17, 2011 7:08 pm
Hi,

I was wondering if there is any way to automate some tasks in Konqueror.
Specifically, I need to select many checkboxes on a website, and it would be great if I can simulate the accesskey strokes. (ctrl then a, ctrl then b, etc)

I tried autokey a little bit but it seems activating accesskey does not work .. (tried to send ctrl keystroke but it made Konqueror unresponsive)

Thanks!
john_hudson
Registered Member
Posts
549
Karma
2
OS

Re: Automation in Konqueror?

Wed Aug 24, 2011 6:32 pm
AFAIK it is not possible because what a checkbox does on a website is controlled by the website code; for example, if you fire an onclick event, the website code determines what happens next. Konqueror parses the code to ensure that the data relevant to the onclick event is sent to the originating website but it is difficult to see how it could understand all the different ways different web designers might want to do something and interpret one set of commands for all these different approaches.


John Hudson, proud to be a member of KDE forums since 2008-Oct.
User avatar
joon
Registered Member
Posts
20
Karma
0

Re: Automation in Konqueror?

Wed Aug 24, 2011 6:39 pm
Thanks for the reply.

Actually I managed to do this with xdotool. The following script:

Code: Select all
WID=`xdotool search "Konqueror" | head -1` 
xdotool windowactivate --sync $WID
xdotool key --clearmodifiers --delay 50 ctrl c ctrl d ctrl e ctrl f ctrl g ctrl h ctrl i ctrl j ctrl k ctrl l


activates Konqueror, and select 10 checkboxes, c to l, in this particular application. Now I can replace 20 mouse clicks (or 40 keystrokes) with this script. Very happy :)
john_hudson
Registered Member
Posts
549
Karma
2
OS

Re: Automation in Konqueror?

Wed Aug 24, 2011 6:41 pm
Good thinking - but I presume if works for one website only - or can it be generalised?


John Hudson, proud to be a member of KDE forums since 2008-Oct.
User avatar
joon
Registered Member
Posts
20
Karma
0

Re: Automation in Konqueror?

Wed Aug 24, 2011 7:00 pm
john_hudson wrote:Good thinking - but I presume if works for one website only - or can it be generalised?


Oh actually the whole purpose of this was to make it work for that particular website for me. I guess depending on websites' settings, one need to change letters which are assigned to the checkboxes.

-Joon


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]