Last active
March 6, 2018 00:16
-
-
Save yamadaaaaaaa/ed87e4e394682392fa13f27ad8ad279a to your computer and use it in GitHub Desktop.
japanese file for shotgunRV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from pywinauto import application | |
import time | |
import os | |
import sys | |
rvRoot = r"C:\Program Files\Shotgun" | |
for files in os.listdir(rvRoot): | |
if os.path.isdir(os.path.join(rvRoot,files)) and files[:2] == "RV": | |
app = application.Application.start(os.path.join(rvRoot,files,"bin","rv.exe")) | |
break | |
else: | |
app = application.Application.start(r"C:\Program Files\Shotgun\RV-7.0.0\bin\rv.exe") | |
time.sleep(1.0) | |
app_form = app.top_window_() | |
app_form.TypeKeys("^O") | |
oFileName = unicode( str(sys.argv[1]), "sjis") | |
dialog = app[u"Select Files/Directoris"] | |
dialog.TypeKeys("^A") | |
dialog.TypeKeys(oFileName) | |
dialog.TypeKeys("{TAB}") | |
dialog.TypeKeys("{ENTER}") | |
#app_form.Close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment