News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Run Another Program

Started by Force, March 03, 2012, 12:08:20 AM

Previous topic - Next topic

Force

I made this project by using FindWindow,FindWindowEx Methods

Main program send a text message to EditBox of target program and pushing button of it

and text message is in MessageBox of target program.

hope it helps to anybody

Force
Never Stop Until You Are Better Than The Best

qWord

Sending WM_CHAR to simulate user input is an bad technique and may cause strange behaviour of the target Application. Use SendInput+SetFocus  instead.
FPU in a trice: SmplMath
It's that simple!

donkey

Hi Force,

qWord is correct, do not use WM_CHAR unless you also use AttachThreadInput to synchronize the two threads input queues otherwise the results are unpredictable. You might want to look into the WM_COPYDATA message for passing information between programs.

You should explore ways to accomplish the same task without having to rely on Windows marshalling, as UIPI becomes more restrictive with each successive version of Windows you may find that your programs will fail.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Force

Thanks qWord n Edgar

yeah i felt something was wrong in it but I couldnt find it

Force
Never Stop Until You Are Better Than The Best

Force

I got a new idea
is it possible to login in this forum programatically?
sending username , password and click login button like my project

thanks
Force
Never Stop Until You Are Better Than The Best

dedndave

probably, if you are an expert with PHP   :P

Gunner

You don't need PHP.  Just plain ole sockets or WinInet.
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

dedndave

oh - i thought all that was PHP stuff   :P