You wrote:
>
>Hey guys im having a little difficulty sending data to my C application
>through python. I have my test.exe that has a input box in a window. I 
>am trying to populate the edit box with input i send to it through
>python. This is a far as I have been able to get so far. any help 
>would be much appreciated. 
>
>import os,sys,subprocess,win32con
>
>from subprocess import *
>from os import *

You don't need those two lines.  In fact, they are a bad idea.  Just say 
"subprocess.Popen" (which is what you are actually doing).

>from ctypes import *
>from ctypes.wintypes import *
>
>appPath=r'"C:\Dev-Cpp\windowsapp.exe"'

You don't need two sets of quotes here.  The file name does not actually have 
quotes.

>p = subprocess.Popen(appPath)
>
>user32 = windll.user32
>
>user32.SetDlgItemTextA(need to put the hwnd handle here i think??? not sure 
>how this is done, 1, "some text") // this is a user32 function that sends text 
>to my inputbox. 

Yes, you need to find the window handle of your dialog.  You can use the 
FindWindow API to do that.
--
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to