The window id changes with each boot even though it is for the same popup window.
#!/bin/bash
# xdotool selectwindow This determines the window id or 2nd method
# xdotool search --name "Error"
xdotool key --window 16777491 alt+F4
I need help with passing the value of xdotool search --name "Error" to xdotool key --window 16777491 alt+F4 statement.
--- Post updated at 06:35 AM ---
This works if run from a cli window but not when run as a Startup Application.
Using UbuntuMate 18.04.
#!/bin/bash
#
# Automatically close that popup windows that occurs with every boot up
#
# xdotool selectwindow This determines the window id or 2nd method
# xdotool search --name "Error"
id=$(xdotool search --name "Error")
xdotool key --window $id alt+F4