Added Revision and some other minor cleanup

This commit is contained in:
markm 2006-01-20 01:47:01 +00:00
parent 1e1eea4f5d
commit bc3c410aa3
2 changed files with 156 additions and 145 deletions

@ -12,6 +12,7 @@ More then likely you will need to modify the apppath
entry in the 't' dictionary to where you have entry in the 't' dictionary to where you have
extracted the WinRAR executables. extracted the WinRAR executables.
""" """
__revision__ = "$Revision$"
import sys import sys
@ -148,4 +149,5 @@ rar_dlg = app._window(title_re = ".* - WinRAR.*")
get_winrar_dlgs(rar_dlg, x) get_winrar_dlgs(rar_dlg, x)
# exit WinRar # exit WinRar
time.sleep(.5)
rar_dlg.MenuSelect(t['File->Exit'][x]) rar_dlg.MenuSelect(t['File->Exit'][x])

@ -18,20 +18,29 @@
# Suite 330, # Suite 330,
# Boston, MA 02111-1307 USA # Boston, MA 02111-1307 USA
"Some automation of Windows Media player"
__revision__ = "$Revision$"
#import os #import os
import time import time
import sys
from pywinauto import application from pywinauto import application
from pywinauto import tests
def WindowsMedia(): def WindowsMedia():
app = application.Application() app = application.Application()
app._connect(path = ur"C:\Program Files\Windows Media Player\wmplayer.exe") try:
app._connect(
path = ur"C:\Program Files\Windows Media Player\wmplayer.exe")
except application.ProcessNotFoundError:
print "You must first start Windows Media "\
"Player before running this script"
sys.exit()
app.WindowsMediaPlayer.MenuSelect("View->GoTo->Library") app.WindowsMediaPlayer.MenuSelect("View->GoTo->Library")
app.WindowsMediaPlayer.MenuSelect("View->Choose Columns") app.WindowsMediaPlayer.MenuSelect("View->Choose Columns")