diff options
Diffstat (limited to 'examples/data/scripts/follow.sh')
-rwxr-xr-x | examples/data/scripts/follow.sh | 17 |
1 files changed, 12 insertions, 5 deletions
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 |