Automating Ember Media Manager

I use Ember Media Manager to scrape information about my TV show collection. However like the “movies” scraper the TV scraper does not have a button to automatically scrape all details. You have to watch the screen and click the default buttons. This is fine if you only want to scrape one TV show, but when you are scraping your whole database it becomes a pain.

Here is a simple AutoIT script which hits the default buttons for you. This script needs to be stated after Ember Media manager. While Ember is running, the script runs in a continuous loop looking for buttons and clicking them.

ConsoleWrite("Starting" & @CRLF)
While WinExists("Ember Media Manager")
   ;ConsoleWrite("Sleeping...")
   sleep(5000)

   ;ConsoleWrite(" Checking Banner")
   if(ControlCommand("TV Image Selection","","[NAME:btnOK]","IsEnabled")) Then
	  ConsoleWrite(" Clicking Banner")
	  WinActivate("TV Image Selection")
	  ControlClick("TV Image Selection","","[NAME:btnOK]")
	  ConsoleWrite(@CRLF)
   EndIf

   ;ConsoleWrite(" Checking Show details")
   if(ControlCommand("Edit Show","","[NAME:OK_Button]","IsEnabled")) Then
	  ConsoleWrite(" Clicking Show details -> " & WinGetTitle("Edit Show"))
	  WinActivate("Edit Show")
	  ControlClick("Edit Show","","[NAME:OK_Button]")
	  ConsoleWrite(@CRLF)
   EndIf



   ;ConsoleWrite(@CRLF)
WEnd
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s