Created
September 18, 2010 09:51
-
-
Save littlefolk/585533 to your computer and use it in GitHub Desktop.
cuteExec from keyhac
This file contains 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
from keyhac import * | |
import pyauto | |
def cuteExec(filename, param=u"", directory=u"", classname=u""): | |
def _cuteExec(): | |
window = pyauto.Window.find(classname, None) | |
if window: | |
if window.isMinimized(): | |
window.sendMessage(pyauto.WM_SYSCOMMAND, pyauto.SC_RESTORE) | |
window.setForeground(True) | |
else: | |
shellExecute(None, None, filename, param, directory) | |
return _cuteExec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment