←  [EN] Enduser support

Forums

»

Close dialog after script execution throug...

's foto Gleno0h 3 okt 2019

Hi guys,
I've created a script to control my philips hue lights which i've assigned to a hotkey. All works perfect.

What i would like to know is how i can AUTO close the "press ok to close" screen after pressing the hotkey (a.k.a script dialog)

Or is there another way perhaps?

Thanks!
Veranderd door Gleno0h, 3 oktober 2019 - 08:09
Citeren

's foto mrvica 3 okt 2019

rename your

script.sh

to

!script.sh

!preceding exclamtion mark

Citeren

's foto Gleno0h 3 okt 2019

rename your
script.sh
to
!script.sh
!preceding exclamtion mark


So easy... Thanks!
Citeren

's foto Pike_Bishop 3 okt 2019

or instead rename to !script.sh ;

BOXIP=http://localhost
WGET=/usr/bin/wget

and on the right place then that;
$WGET -q -O - $BOXIP/web/remotecontrol?command=174 # 174 = key for exit
or instead;
$WGET -q -O - $BOXIP/web/remotecontrol?command=352 # 352 is key for ok

regards

Pike

Citeren

's foto littlesat 4 okt 2019

The wget trick is ugly when you think about what happens in your box and eg you press another button or so before the script ends.... use the ! is strongly recommended.
Veranderd door littlesat, 4 oktober 2019 - 07:53
Citeren

's foto Pike_Bishop 20 okt 2019

hmm, but what is now if i have a script that runs longer and i need no output because i have logging build in in the script

and i want only to see a startmessage a endmessage and a error message with wget if the script fails ?

for these scripts i closed first after start from the script the window with wget and a button command as example;

$WGET -q -O - $BOXIP/web/remotecontrol?command=352

and then the script runs in the background and only the messages that i have build in in the script are coming on display and are automatically closed after a timeout.

 

this are not works anymore, earlier that works without problems, but now indifferent the script is named !blabla.sh or only blabla.sh it didn't work because the osd from the script

is open until then the script runs, and you can nothing do in this time with the box.

i don't know if this have to do with exclamation mark but it's not a good solution as it is now for scripts they runs longer.

 

 

regards

Pike

Citeren