Skip to content

Instantly share code, notes, and snippets.

@midN
Created December 30, 2018 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save midN/e726c2759d71ad5f7e8f01f71e770b2b to your computer and use it in GitHub Desktop.
Save midN/e726c2759d71ad5f7e8f01f71e770b2b to your computer and use it in GitHub Desktop.
func OpenAndPlay() {
// Last menu could be something else, first call to Home doesn't open SmartCast, it just turns on TV
key_command.Home()
// It takes about 15s to open SmartCast menu with animation loading
key_command.Home()
time.Sleep(15 * time.Second)
// Just incase Vizio menu was frozen, go left 10x times :shrug:
key_command.Left()
key_command.Left()
key_command.Left()
key_command.Left()
key_command.Left()
key_command.Left()
key_command.Left()
key_command.Left()
key_command.Left()
key_command.Left()
// Self explanatory
key_command.Down()
key_command.Down()
key_command.Down()
// Youtube is 3rd from the left
key_command.Right()
key_command.Right()
time.Sleep(1 * time.Second)
key_command.Click()
// Youtube opening takes about 12s
time.Sleep(12 * time.Second)
volume.SetVolume(8)
key_command.Click()
}
func NextVideo() {
key_command.Click()
time.Sleep(1 * time.Second)
key_command.Right()
key_command.Click()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment