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 *
from ctypes import *
from ctypes.wintypes import *
appPath=r'"C:\Dev-Cpp\windowsapp.exe"'
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.
C code below for reference
CreateWindow( "edit", "",
WS_VISIBLE|WS_CHILD|WS_BORDER|ES_AUTOHSCROLL|ES_AUTOVSCROLL,
0, 0, 300, 20, hwnd, (HMENU)1, hThisInstance, NULL);
SetDlgItemTextA(hwnd, 1, "some text")
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32