How do you automatically set the target to a window based off of it's name I remember @Kasi did something like this when he helped me but I can't remember the name of the procedure
How do you automatically set the target to a window based off of it's name I remember @Kasi did something like this when he helped me but I can't remember the name of the procedure
Ok I've never done this before but as as far as I can tell this should work.
Simba Code:var
i: Integer;
Procs: TSysProcArr;
TargetWindow: String;
begin
TargetWindow := 'Chrome';
Procs := GetProcesses;
for i:=0 to High(Procs) do
if Procs[i].Title = TargetWindow then
begin
SetTarget(Procs[i]);
break;
end;
end.
Current projects:
[ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]
"I won't fall in your gravity. Open your eyes,
you're the Earth and I'm the sky..."
What Flight said.
Also look at the function list on simba. specifically the last couple under "Other" and the ones under "Window"
Didn't work :/ I think it's because "Soulsplit" shows up as java platform blah blah blah on task manager
@Kasi Looked there but Couldn't find anything (SetTarget('Soulsplit') = type mismatch..? )
Start by getting a list of all your running processes:
Simba Code:var
i: Integer;
Procs: TSysProcArr;
begin
Procs := GetProcesses;
for i:=0 to High(Procs) do
Writeln('['+ToStr(i)+'] '+Procs[i].Title);
end.
...then determine which one is whatever you're trying to grab. And yes, if it's a private server it'll show up as just Java.
Current projects:
[ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]
"I won't fall in your gravity. Open your eyes,
you're the Earth and I'm the sky..."
From Simba doc:
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 StartsWith(TitlePrefix, T[i].Title) then
begin
Result := True;
if SetAsTarget then
begin
SetTarget(T[i]);
ActivateClient;
end;
end;
end;
There are currently 1 users browsing this thread. (0 members and 1 guests)