Hey,
how can you find and use a client window with simba. Lets say by size or by title.
Is there an inbuild function ?
Hey,
how can you find and use a client window with simba. Lets say by size or by title.
Is there an inbuild function ?
you could make the icon as a DTM then adjust accordingly using MouseSetClientArea
Don't use DTM's.. They're over suggested.. It's not the answer to everything. Not sure why anyone would use a DTM to find a window. No disrespect to the suggester above, but I wouldn't use a DTM..
Simba Code:function FindWindow(TitlePrefix: String): Boolean;
var
T: TSysProcArr;
I: Integer;
begin
T:= GetProcesses();
for I := 0 to high(T) do
if ExecRegExpr(TitlePrefix, T[i].Title) then //If you aren't familiar with RegExpressions, use (Pos(...) > 0)
Result := True;
end;
OR use an extension:
For other extension stuff, view my extension here: http://villavu.com/forum/showthread.php?t=65657PHP Code:function FindWindow(ClassName, WindowName: PChar): HWND; external 'FindWindowA@User32.dll'
function FindSmart: HWND; //Returns a handle to the found window..
var
Smart: HWND;
begin
Smart:= FindWindow('SunAwtFrame', 'Public SMARTv6.9 - SMART Minimizing Autoing Resource Thing - By BenLand100');
result:= Smart;
end;
Last edited by Brandon; 09-26-2012 at 09:16 PM.
I am Ggzz..
Hackintosher
Thanks for the replies.
Can you set the found window as new client for simba ?
Simba Code:function FindAndSetTarget(TitlePrefix: String; SetAsTarget: Boolean): Boolean;
var
T: TSysProcArr;
I: Integer;
begin
T:= GetProcesses();
for I := 0 to high(T) do
if ExecRegExpr(TitlePrefix, T[i].Title) then
begin
Result := True;
if SetAsTarget then
begin
SetTarget(T[i]);
ActivateClient;
end;
end;
end;
I am Ggzz..
Hackintosher
So doing this:
Would work if we didn't have SMART defined but had an RS window open, whose name Has Runescape at some point? Or does the word have to be at the beginning of the title?Simba Code:{$IFDEF SMART}
//six hour fix, etc.
{$ELSE}
FindAndSetTarget('Runescape'; True);
{$ENDIF}
Miner & Urn Crafter & 07 Chicken Killer
SPS BlindWalk Tutorial
Working on: Nothing
teacher in every art, brought the fire that hath proved to mortals a means to mighty ends
Thats working great *-* thanks so much.
One more question... Can you find Child elements in Windows, Like Edit fields and stuff. And Can you send text to those ? With like "Post Message" ???
With an extension that would be no problem. With Simba I don't think so :S
Maybe a plugin? Why not make a plugin that does all that stuff and returns the handles?
Getting ChildWindow handles would be quite the task in Lape and Simba since those are windows extensions.
Perhaps if Simba could use Typedefs to get exported functions from a DLL. Other than that, an Extension or a plugin WILL be required.
I remember writing an "extension" called SmartChat that does this. I believe Daniel has also written a "plugin" that contains most WinAPI functions and you just load it and use it.
I am Ggzz..
Hackintosher
Hi!
Can you also CLOSE, MINIMIZE, MAXIMIZE a target window ??
There are currently 1 users browsing this thread. (0 members and 1 guests)