VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

This code will grab any window text box text from any aplication running on windows 32 bit... and w

kodapt  (2 Submissions)   Windows API Call/Explanation   Visual Basic 5.0   Unknown Difficulty   Mon 4th June 2001   Mon 8th February 2021

This code will grab any window text box text from any aplication running on windows 32 bit... and will put the text on a log file...

API Declarations



' It will grab the text in any Edit Box of any app running on your system.
' Just Start the program and minimize it... then try to open a .txt file and
' then go to C:\testes.txt to see the all text there...

'don´t vote... this is a crap... :]
' cya, koda
'********************************************************


'API Declarations

'to get the foreground window
Private Declare Function GetForegroundWindow Lib "user32" () As Long

'to send a message system
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

'to get the cursor position
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long

'to get the window from a point (y,x)
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long

'to get the window text
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long

'to get the class name (edit,combobox etc..)
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long

Public strBuffer As String ' the string to append to the file that has all the text "grabed"

Public iEnum As Integer ' the file integer to open and write (I/O)
Public hJanelaCima As Long ' the window wich the user has the mouse over
Public hJanelaAntiga As Long ' the ancient window, to controlo if there´s a new window or not

'constants to grab the text
Private Const WM_GETTEXT = &HD
Private Const WM_GETTEXTLENGTH = &HE

'type for the GetCursorPos API
Private Type POINTAPI
x As Long
y As Long
End Type


Rate This code will grab any window text box text from any aplication running on windows 32 bit... and w (1(1 Vote))
This code will grab any window text box text from any aplication running on windows 32 bit... and w.bas

This code will grab any window text box text from any aplication running on windows 32 bit... and w Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters