Latest ACPI update removed some essential configuration
[haiku.git] / 3rdparty / mmu_man / scripts / dumpwin.sh
blob9c8c9c6f3b235eeafc56c7e93009379d6424b2fd
1 #!/bin/sh
3 unescape_url () {
4 echo -e "$(echo $*|sed 's/%/\\\x/g')"
10 dumpview () {
12 # echo "$2= $1 of Window $WIN ="
13 # echo "${2}APP=$APP"
14 # echo "${2}WIN=$WIN"
15 #echo hey "$APP" count View of $1 Window $WIN
17 local CNT="$(hey "$APP" count View of $1 Window $WIN | grep result | cut -d" " -f 7)"
19 if [ -z "$CNT" ]; then
20 # echo "NULL"
21 return 0
24 # echo "${2}CNT=$CNT="
26 if [ "$CNT" -lt 1 ]; then
27 return 0
30 local C=0
32 while [ $C -lt $CNT ]; do
33 local INAME="$(hey "$APP" get InternalName of View $C of $1 Window $WIN | grep result | sed 's/.* : //')"
34 echo "$2:: View $C/$CNT ($INAME) ( View $C of ${1}Window $WIN )"
35 # hey "$APP" get View $C of $1 Window $WIN | awk " { print \" $2\" \$0 } "
36 # hey "$APP" getsuites of View $C of $1 Window $WIN | grep Label >/dev/null
38 # if hey "$APP" getsuites of View $C of $1 Window $WIN | grep Label >/dev/null; then
39 # echo hey "$APP" getsuites of View $C of $1 Window $WIN | grep Label
40 # hey "$APP" get Label of View $C of $1 Window $WIN | grep result | awk " { print \" $2\" \$0 } "
41 # fi
43 # if hey "$APP" getsuites of View $C of $1 Window $WIN | grep Text >/dev/null; then
44 # echo hey "$APP" getsuites of View $C of $1 Window $WIN | grep Text
45 # hey "$APP" get Text of View $C of $1 Window $WIN | grep result | awk " { print \" $2\" \$0 } "
46 # fi
48 if hey "$APP" getsuites of View $C of $1 Window $WIN | grep Value >/dev/null; then
49 echo hey "$APP" getsuites of View $C of $1 Window $WIN | grep Value
50 hey "$APP" get Value of View $C of $1 Window $WIN | grep result | awk " { print \" $2\" \$0 } "
53 #hey "$APP" getsuites of View $C of $1 Window $WIN | awk " { print \" $2\" \$0 } "
55 dumpview "View $C of $1" " $2"
56 let C="$C + 1"
57 done
59 echo "$2<"
62 if [ "$#" -lt 2 ]; then
63 echo "$0 App Window"
64 exit 1
68 APP="$1"
69 WIN="$2"
71 dumpview