If you type something in your program, then it must have the focus and the 'open window' would be your application's own.
The basic approach: You would need to find the window of the other program itself first, and transfer the information to it. I can't help you with BlitzPlus, but here's a Blitzmax sample that does what you want:
Const WM_SETTEXT = $00C
Const WM_COPYDATA = 74
Extern "Win32"
Function FindWindow( lpClassName$z, lpWindowName$z ) = "FindWindowA@8"
Function FindWindowEx( hwnd1:Int, hwnd2:Int, lpsz1$z, lpsz2$z ) = "FindWindowExA@16"
Function SendMessage( hwnd, msg, wparam:Byte Ptr, lparam:Byte Ptr ) = "SendMessageA@16"
Function GetLastError()
End Extern
win=FindWindow( "NotePad", "Untitled - Notepad" )
edit=FindWindowEx( win, Null, "Edit", Null )
SendMessage( edit, WM_SETTEXT, Null, "This is a test!" )
It uses the Windows API SendMessage command to send information into the edit field of Notepad. If you have notepad open (without opening any documents so the titlebar has the default "Untitled - Notepad" text in it) and run this in BlitzMax, the text "This is a test!" will appear in the notepad window.
For blitzBlus you'd need to use .decls files for the declarations, and you'd need to look for the specific window that your application is using. You may need a resource editor or the likes to find out the name(s) of the actual input field(s) that you wish to stuff the text into.
|