Hi all,
Can anyone please let me know if it is possible to bring a minimised web page running on mozilla browser to the foreground using shell script.
I am using the following piece of code to bring it to the front on my display:
XCLIENTS=/usr/openwin/bin/xlsclients
XLSCLIENTS_TMP_FILE=/tmp/tmp_xlsclients_$$
this_instance=`$XCLIENTS -display $DISPLAY | grep -c "$COE_CRAFT_URL"`
if ["$this_instance -eq "1"]
then
#echo "A session is already open" >> /tmp/log.txt
$XCLIENTS -display $DISPLAY -l } grep -v 'Machine:' | grep -v 'Name:' | grep 'Instance/Class:' > $XCLIENTS_TMP_FILE
WINDOW_ID_HEX=`paste -s -d "\t\n" $XCLIENTS_TMP_FILE | grep $COE_CRAFT_URL | sed s/://| awk '{print $2}'`
if ["$WINDOW_ID_HEX"!=""]
then
WINDOW_ID_INT=`printf "%d" $WINDOW_ID_HEX`
WINDOW_ID_INT=$<<WINDOW_ID_INT+32>>
$RAISEWIN$DISPLAY $WINDOW_ID_INT > /dev/null 2>&1
fi
exit 1
fi
Please let me know if this will work.
Thanks a lot.
Regards,
Sabi