,wifi_on-off.sh 842 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. # Coding: utf-8
  3. # Editor: www.geany.org
  4. # Created 2022-08-10
  5. #_sudo_apt_install_ xdotool
  6. #_sudo_dpkg_i_
  7. # resolution 1152x864
  8. # zoom 110%
  9. source $HOME/.SCR/lib.sh
  10. read login < "$HOME/.ssh/login_router"
  11. read parol < "$HOME/.ssh/parol_router"
  12. firefox_id="$(xdotool search --name "Mozilla Firefox")"
  13. if [ -n "$firefox_id" ]
  14. then
  15. xdotool windowactivate "$firefox_id"
  16. fi
  17. fun_press_key Escape 1
  18. firefox-esr http://192.168.100.1/ &
  19. sleep 7
  20. fun_press_key Escape 1
  21. xdotool type --delay 250 "$login" # login
  22. sleep 1
  23. fun_press_key Tab 1
  24. xdotool type --delay 250 "$parol" # pass
  25. sleep 1
  26. fun_press_button 747 372 1 3 # pess button login
  27. fun_press_key Escape 1
  28. fun_press_button 539 150 1 1 # wlan
  29. fun_press_button 539 150 1 3 # wlan
  30. fun_press_key Escape 1
  31. fun_press_button 391 385 1 4 # on/off wi-fi
  32. fun_press_key Escape 1