Jump to content
kimi18

"ActivateWindow" (scar 3.39)

Recommended Posts

Helló

 

I need some help. I change the window to "full size", and then, when the Scar activate this window, the windows become previous size... But why? Or, it could have some solution to reset?

 

This is my scar code (this code from the Scar-Wiki) :

var 
  Wnds: THwndArray; 
  w,h:Integer; 

begin
  Wnds := FindWindowsEx(GetDesktopWindow, 'Notepad', '', False, False, True);
  if Length(Wnds) > 0 then begin
     ActivateWindow(Wnds[0]);
     GetWindowSize(GetActiveWindow,w,h);
     writeln('w: ' + inttostr(w) + '; h: ' + inttostr(h));
 end;
end.

 

Thanks...

 

Sorry for my English :o

Link to comment
Share on other sites

Helló

 

I need some help. I change the window to "full size", and then, when the Scar activate this window, the windows become previous size... But why? Or, it could have some solution to reset?

 

This is my scar code (this code from the Scar-Wiki) :

var 
  Wnds: THwndArray; 
  w,h:Integer; 

begin
  Wnds := FindWindowsEx(GetDesktopWindow, 'Notepad', '', False, False, True);
  if Length(Wnds) > 0 then begin
     ActivateWindow(Wnds[0]);
     GetWindowSize(GetActiveWindow,w,h);
     writeln('w: ' + inttostr(w) + '; h: ' + inttostr(h));
 end;
end.

 

Thanks...

 

Sorry for my English :o

Hello kimi!

 

Sorry for slow response man..

Yeah, this is a bug that you discovered.

 

Freddy fixed the issue for v3.40 (link takes you to SCAR Divi Development releases) :)

 

Regards,

-Jani

Link to comment
Share on other sites

Hello :)

Thank you, and this version is usable? Or we know other bug?

 

And another question... "FindBitmapSpiral"

 

program New;
var
Bmp:TSCARBitmap;
x,y:Integer;
begin
 Bmp := TSCARBitmap.Create('deNpjZ2BnGIQAAAjLAA8=');  //now only black square
 if FindBitmapSpiral(Bmp,x,y,0,0,800,600) then writeln('found:' + inttostr(x) + '/' + inttostr(y));
end.

 

It is always true, and x=0, y=0.... -_-, why not return the exact coordinates? Another bug?

Link to comment
Share on other sites

Hello :)

Thank you, and this version is usable? Or we know other bug?

 

And another question... "FindBitmapSpiral"

 

program New;
var
Bmp:TSCARBitmap;
x,y:Integer;
begin
 Bmp := TSCARBitmap.Create('deNpjZ2BnGIQAAAjLAA8=');  //now only black square
 if FindBitmapSpiral(Bmp,x,y,0,0,800,600) then writeln('found:' + inttostr(x) + '/' + inttostr(y));
end.

 

It is always true, and x=0, y=0.... -_-, why not return the exact coordinates? Another bug?

Yeah that definitely seems to be another bug..

 

I recommend using FindBitmap() for now - FindBitmap(x, y, Bmp, 0, 0, 800, 600) - because it doesn't have this problem.

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...