Jump to content
Press_ALT_F4

how can i target a window

Recommended Posts

hi,

how can i target a window in the script?

for example the window-title is "game" :)

 

hope for answer

bye :)

 

You can use the window API. FindWindows - SCAR Divi Manual and FindWindowsEx - SCAR Divi Manual should be what you're looking for. Once you have the windowhandle you need, just do SetClient(TSCARWindowClient.Create(YourHandle)).Free;

Link to comment
Share on other sites

Hi,

 

thanks for your answer :).

its not work :(

what is wrong in my script?

activating is working but not targeting.

 

 

FENSTER := FindWindowsEx(GetDesktopWindow, 'game', '', False, False, True);

 

if Length(FENSTER) > 0 then

begin

ActivateWindow(FENSTER[0]);

SetClient(TSCARWindowClient.Create(FENSTER[0])).Free;

result:=true;

end;

 

hope for answer,

bye :)

Link to comment
Share on other sites

thanks for answer,

 

thats what i want when the script is running set a target.

when i run the script it dont work. in the view "target client" is no changing to see.

 

Yes, as I said, the client is not changed globally, just for the script. The target client box is part of the IDE, it has nothing to do with the script that's running.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...