Sorry about the late reply, John I got the following error when I ran your code:
"Value of type "System.IntPtr' cannot be converted to 'Integer'."
The following line was highlighted:
SetForegroundWindow(pcs(0).MainWindowHandle)
What's wrong?
Hello!
How would I go about running a program located at a specific location on my hard-drive upon the click of a button?
I found this code on the internet for runing notepad:
Dim objShell
objShell = CreateObject("WScript.Shell")
objShell.Run("notepad")
How would i do...
John, would you be kind enough to provide some examples?
I'm really struggling here.
Luke I played around with that code and sure enough it works for notepad but when I tried it for other applications I couldn't get it to work.
I need to do this for a little project of mine but I don't know how:
1. Bring another program that is already running into focus. (I didn't make this second program).
2. Find the first textbox on this other program and type some text into it.
3. Have my program simulate a user typing.
Is this...
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.