Actually you can also use AUTOIT which
is OPEN SOURCE and FREE and it can generate
.EXE files for you to launch from your app
I think the limitation of Autoit is that it
needs the app to be in Focus.. It cannot
send info to windows if the app is not in focus
Aprivate
I forgot to mention,
The 'lparam' eg (&H70032)
PostMessage(handle, WM_LBUTTONDOWN, 1,&H70032 )
Will change everytime you re-spy on the windows
by repeating the mouse click. Thats because
you can hardly place the mouse back over the same
spot. To play safe, place the mouse over the CENTER...
Hi
I have done these things before but in Main
Visual Basic . The following link shows
how to do a post message in VBA.
http://visualbasic.ittoolbox.com/documents/popular-q-and-a/closing-application-through-vba-event-1975
What you need to do for ANY windows application
in order to send or...
You May want to monitor the window of the
application with SPY on the following
messages.
WM_KEYDOWN
WM_KEYUP
Post this message to the target window with
allthe same parameters copied when you spy on
it. I think this should work..
It is the equilvalent to the mouse message
that would work...
Yes You can send the WM_LBUTTONDOWN postmessages
to do the File Open.
If the application is running under a LOCKED
windows screen , you MAY be able to do it.
There are other VB commands like app.activate("window name") that you can use and also the SENDKEYS command.
For the logged out test...
Just a correction to my comment:
To use POSTMESSAGE/Setwindow text in a forms
application, I found that if I wrap
the functions in a separate class file
and I call it using my own function in
the class, it works.
To send hot keys you get the application
or the window in FOCUS by using
Setforegroundwindow and Setfocus then
use the KEYBD_EVENT function to send your
key.
This is the Lowest level function and it
is called when you press the letters on the
keyboard.
Aprivate
Hi
It seems logical what you are doing but
you are on the wrong path.
In order to do this sucessfully you need to
1) Avoid a FORMS VB.NET application
use Module
sub main()
end sub
end Module
If U dont do this VB.net will screw up at runtime
with an exception with...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.