Version: kdebase-4.4.2 (using KDE 4.4.2) OS: Linux Installed from: Fedora RPMs In kde3 I used to automate mouseclicks & dcop+klipper to screen scrape my konsole output. Now in kde4 I dont have dcop. How can I automate reading of the konsole content from within my perl script. I was hoping qdbus can support function like readSessionWindow(); that returns the Visible text on the window
This feature is very much needed!
*** This bug has been confirmed by popular vote. ***
Well, one obstacle for adding this dbus method is: one session might have multiple independent views, where each view shows different region of the same session output. So to add such a dbus method, it must be per view. But currently konsole creates dbus objects only per window and per session.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/941
Git commit b27e80f2b51214596b1d5bdbd52a91bfa2450b82 by Kurt Hindenburg, on behalf of Theodore Wang. Committed on 13/01/2024 at 18:34. Pushed by hindenburg into branch 'master'. Implemented DBus methods for reading displayed text The four methods allow users to retrieve the text displayed on a view. 1. Session::getAllDisplayedText 2. Session::getAllDisplayedTextList 3. Session::getDisplayedText 4. Session::getDisplayedTextList They can choose the return value to be a single string. Or call the "...List" methods to get a list where every list element is the text on a single line. For methods "getAllDisplayedText" and "getAllDisplayedTextList", the user can specify if trailing empty lines should be removed. For the other two methods, the user can specify the range of lines to be retrieved. M +63 -0 src/session/Session.cpp M +29 -0 src/session/Session.h https://invent.kde.org/utilities/konsole/-/commit/b27e80f2b51214596b1d5bdbd52a91bfa2450b82