From 007b87d48b647b0bdf4d8bc8bd28796d3cca05d2 Mon Sep 17 00:00:00 2001 From: Paweł Zuzelski Date: Sun, 28 Mar 2010 21:52:50 +0200 Subject: more events from follow script emit FORM_ACTIVE on TEXT, PASSWORD, TEXTAREA and SELECT reset mode on other INPUT elements (checkboxes, radiobuttons etc) Additionaly: does not invoke item.select() on elements. --- examples/data/scripts/follow.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'examples/data/scripts/follow.sh') diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index 76dd1d2..af9e277 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -17,10 +17,17 @@ shift echo 'script @scripts_dir/follow.js "@{follow_hint_keys} '$1'"' | socat - unix-connect:$socket -# Read variable set by script. If it equals XXXFORMELEMENTCLICKEDXXX emit -# FORM_ACTIVE event -echo 'js rv' \ - | socat - unix-connect:$socket \ - | grep -q XXXFORMELEMENTCLICKEDXXX \ +# Read variable set by script. If it equals XXXEMIT_FORM_ACTIVEXXX emit +# FORM_ACTIVE event. If it equals XXXEMIT_ROOT_ACTIVEXXX emit ROOT_ACTIVE +# event. +rv=$(echo 'js rv' | socat - unix-connect:$socket) + +echo $rv \ + | grep -q XXXEMIT_FORM_ACTIVEXXX \ && echo 'event FORM_ACTIVE' \ | socat - unix-connect:$socket + +echo $rv \ + | grep -q XXXRESET_MODEXXX \ + && echo 'set mode =' \ + | socat - unix-connect:$socket -- cgit v1.2.3