Ok, Isn't API where you can find like the TEXT box thingy in the program? Well I use 6.0 Enterprise and I want to find the API for a program. I have no clue on what to do.
Printable View
Ok, Isn't API where you can find like the TEXT box thingy in the program? Well I use 6.0 Enterprise and I want to find the API for a program. I have no clue on what to do.
What do you want ? What is the thingy ? You mean carret?Quote:
Isn't API where you can find like the TEXT box thingy in the program?
Its arcmatch.exe, I want to find the Text box that you write your text in and find a way to make it Enter when done.
First off, API is Application Programming Interface, which allows you to do a load of things not possible in regular windows (like shutdown windows, draw squiggles, change window shapes, etc, etc).
If you want to find the hwnd of a textbox, use the Findwindow API:
VB Code:
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long USAGE: var = FindWindowEx(FindWindow(vbNullString, "Window's Text"), 0&, "Edit", vbNullString)
:rolleyes:You should really start off by understanding the API with something like Karl Moore's API Tutorial, Part I of I.
What do you mean by "make it enter?"
Ah, and you don't find the "API" of a program. You can, however, find the process ID of a program or the hwnd of a window in a program, but not the API (because API is a group of Windows functions compiled with C that is NOT specific to a program).
If you mean stimulating an Enter keystroke, use this:
VB Code:
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Public Const WM_KEYDOWN = &H100 Public Const WM_KEYUP = &H101 Public Const WM_CHAR = &H102 USAGE: Dim hvar As Long hvar = FindWindowEx(FindWindow(vbNullString, "Window's Text"), 0&, "Edit", vbNullString SendMessage hvar, WM_KEYDOWN, 13, 0 SendMessage hvar, WM_KEYUP, 13, 0 SendMessage hvar, WM_KEYCHAR, 13, 0
:)+:)=:D
:D+:mad:=:eek:
You mean simulating, right? ;-)Quote:
Originally posted by Microbasic
If you mean stimulating an Enter keystroke:
(Sorry; I'm a major grammar freak).
Yes, oh great one;), simulating.
simulating
simulating
simulating
simulating
simulating
simulating
simulating
simulating
simulating
simulating
There, now I'll remember it.
Oh, and Megatron, you mean Sorry, I'm a major grammar freak, right?