473,499 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open a program with python minimized or hidden.

6 New Member
Hi,

What I'm trying to do is to write a script which would open an application only in process list. Meaning it would be "hidden". I don't even know if its possible in python.

If its not possible, I would settle for even a function that would allow for a program to be opened with python in a minimized state like "wsMinimized" from Delphi, something like this:

Expand|Select|Wrap|Line Numbers
  1. import subprocess
  2. def startProgram():
  3.     subrpocess.minimize(subprocess.Popen('C:\test.exe')) #  I know this is wrong but you get the idea...
  4. startProgram()
Any ideas?
Feb 23 '10 #1
6 7732
bvdet
2,851 Recognized Expert Moderator Specialist
There is a way on Windows using win32com.client. Example
Expand|Select|Wrap|Line Numbers
  1. import win32com.client
  2. wordapp = win32com.client.Dispatch("Word.Application")
  3. wordapp.Visible=0
Feb 23 '10 #2
wtzolt
6 New Member
@bvdet
Yes the problem is that the program that i want to lounch and hide doesn't have
a COM server registered under the name.
Its just a simple number crunching program outputting the results onto desktop.

There has to be a way to do this using subprocess...
Feb 23 '10 #3
bvdet
2,851 Recognized Expert Moderator Specialist
Try the following. It may not work on child windows spawned by the process.
Expand|Select|Wrap|Line Numbers
  1. import subprocess
  2.  
  3. info = subprocess.STARTUPINFO()
  4. info.dwFlags = 1
  5. info.wShowWindow = 0
  6. subprocess.Popen("notepad.exe", startupinfo=info)
Feb 23 '10 #4
wtzolt
6 New Member
Not working...
Had no idea such a simple thing to do was so awkward.
Feb 23 '10 #5
Glenton
391 Recognized Expert Contributor
Perhaps it can be done with threads?
Feb 24 '10 #6
wtzolt
6 New Member
Never worked with threads so can't really imagine where to even begin to be honest.
Feb 24 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

13
35479
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
4
4999
by: ulysses | last post by:
hi, I'm working in python 5 months. I think it's very cool language. I do a p2p python program GUI. First I make a software by wxpython. But I find wxpython use many many memory. Second I use...
40
10758
by: Brian Jorgenson | last post by:
On my web page, I have a few hyperlinks with target frame of _blank. The hyperlink brings up a second window, but everytime I click on thie hperlink, it keeps bringing up a new window and not...
1
1776
by: yan martin | last post by:
Hi, I am using this script "function openFullscreen(page) { var yes = 1; var no = 0; windowprops = "width=" + (screen.width-10) + ",height=" + (screen.height-50) + ",top=0,left=0";...
0
2070
by: cemal eroglu | last post by:
Hi, I don't use CreateNoWindow=True since I would like to see this application on the task manager (as an application) and I should be able to end the task (and its child processes etc). So I used...
1
1103
by: nassar | last post by:
I want to know how i can make my program always get the messages sent by keyboard even when its window is hidden, minimized, or not in focus? i know that the usual message handlers like: void...
2
9753
by: Mads Westen | last post by:
Hi, I need to run a batch file wich I would like to run minimized. The batchfile runs a exe file with some arguments, and deletes af file, and remanes another. How can I do that minimized? I...
1
2537
by: Sorin Schwimmer | last post by:
Hi, I tried for the first time a Tix Tree, so, if my question is naive, I apologize upfront. The following code: <code> from Tix import * r=Tk()
9
9929
by: jvdb | last post by:
Hi all, I've created a program that receives files and opens the corresponding program (for example adobe acrobat). However, when started, i would like to see nothing of the running program. I...
1
4374
by: setori88 | last post by:
Hi guys this script i downloaded from here, http://win32com.goermezer.de/index.php?option=com_content&task=view&id=193&Itemid=274 I copied this script and setup and instance of open office...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7386
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5468
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3098
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.