chaoscoder Posted August 21, 2014 Share Posted August 21, 2014 Just curious if there's anything I can do to get Scar to work with flash in a VM. Using both Oracle VirtualBox and VMWare Player with Windows 7 and the latest Flash, when I load a flash game or anything, all Scar sees is black (Confirmed by targeting the flash app and using scar screenshot functionality as well as DTM editor). This issue occurs both in IE and FF. As an aside, I am able to get it working in VM with Windows XP and Flash Player 11.5. Just tested with Win7 + Flash 11.5 and had the same issue. So seems win7 related? Anyone able to get scar to work with flash (and read colors properly) in windows 7? Perhaps a setting i need to change...? Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted September 3, 2014 Share Posted September 3, 2014 (edited) SCAR can't read flash afaik. The trick of setting the desktop itself as the client and reading the client window from the desktop might work??? Works with OpenGL and DirectX Java graphics which SCAR can't normally read. Have some code for this kicking around somewhere... Edit: Whoops that was a old post. Should have looked before I replied. Screw it I'll post it anyway. Adapt to your needs as you see fit. Set the bitmap as the client before doing your searching (remember to set client back after) or modify this to search directly on the desktop. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // function GetClientBitmapFromDesktop // // Description: // Capture client window as a bitmap from the desktop rather than reading it // the client itself. // Params: // WaitForClient (in) - Pause to allow client window to come to front? // ClientImage (out) - Bitmap image of client window. // Result (out) - True on success. // Note: // Client must be fully visible on screen or this will not work. Will attempt // to bring client to front. // Revision History: // > 2013-12-02 - Bixby Sayz // - Original version. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ function GetClientBitmapFromDesktop(const WaitForClient: Boolean; out ClientImage: TSCARBitmap): Boolean; var DesktopClient: TSCARClient; // Desktop as a SCAR client. WindowArea: TBox; // Area to capture from the desktop. begin Result := False; ClientImage := nil; // Bring client window to the front. This will not work if client is not // completely visible on the screen. GetClient().Activate(); WindowArea := GetClient().InputArea; // Pause briefly to allow client window to refresh on screen. if WaitForClient then Wait(500); // Capture client area to a bitmap. DesktopClient := TSCARWindowClient.Create(GetDesktopWindow()); with WindowArea do ClientImage := DesktopClient.CaptureEx(X1, Y1, X2, Y2); DesktopClient.Free(); Result := True; end; Edited September 3, 2014 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...