开发者

WScript.Shell Run always on top option

开发者 https://www.devze.com 2023-01-12 09:39 出处:网络
I would like to execute WScript.Shell command using Run and set it to be always on top. As far I figured out how to make Popup always on top.

I would like to execute WScript.Shell command using Run and set it to be always on top. As far I figured out how to make Popup always on top.

import win32api, win32com.client

shell = win32com.client.Dispatch('WScript.Shell')
shell.Popup('Message', 0, 'Title', 4096)
win32api.Sleep(100)

Is there a way to do the same thing with Run command? I found some attributes on MS site http://msdn.microsoft.com/en-us/library/d5开发者_高级运维fk67ky(VS.85).aspx but none of them is giving me this option.


This can not be done this way. I installed little utility and obtained always on top functionality.


strCommand = "wscript Test.vbs"

jobProcess = subprocess.Popen(strCommand, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)

stdout, stderr = jobProcess.communicate()
0

精彩评论

暂无评论...
验证码 换一张
取 消