Skip to content

Instantly share code, notes, and snippets.

@littlefolk
Created September 18, 2010 09:51
Show Gist options
  • Save littlefolk/585533 to your computer and use it in GitHub Desktop.
Save littlefolk/585533 to your computer and use it in GitHub Desktop.
cuteExec from keyhac
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