dopeness Posted December 18, 2012 Share Posted December 18, 2012 I know i'm doing this correct, but no matter what I do it can never find the bitmap. The class name of the game window is called "SDL_app", could that be the problem? Anybody know what's wrong? Quote Link to comment Share on other sites More sharing options...
LordJashin Posted December 18, 2012 Share Posted December 18, 2012 A number of things could be going wrong. We need to see your script or part of it. For one you need GetClient.Activate; at the start of your script to activate the window you selected with the crosshairs Quote Link to comment Share on other sites More sharing options...
dopeness Posted December 18, 2012 Author Share Posted December 18, 2012 A number of things could be going wrong. We need to see your script or part of it. For one you need GetClient.Activate; at the start of your script to activate the window you selected with the crosshairs I've already done that. I've used Scar plenty of times before (the older versions) and working with this type of stuff was easy - and worked. Now it seems the new version is full of broken functions. Here is my code: [sCAR] program New; var five: TSCARBitmap; var x,y: integer; begin five:= TSCARBitmap.Create('deNpVVflPVFcUnnvfcgf7g3UFCcyOA7OwzQIzb' + '+a9B8Migjog4AIoioMMDMzALJi0icUhTS1tWpNKrUm1aFL7e7Wu+EPTtDH1H7D' + 'axNrE/hs9584Q2+Rk8ubd+777nfN959xqwz4DqfQaTBHi6KH1A7ThEHUdEVxHq' + 'Dsu8KD8Gf96BqmbhyteekNdhzEaBmh9P7F3GWrDAEWqA8TRjSCNI2LrCdE3Jvr' + 'GxVb+C8+tJ8WWE0LTqOA5KjYdF1vH363CUmm1cRhgDfYuUu0jtSFS3w/7Jf+4F' + 'JyU28/K7efkEEQCHqT2hOybkKsbKyodrC4mBadwFWMKo21KCp4R/ePAhDj7SU2' + 'QmlUgJrYcl9rOyMp5Fk2yyAxTZ1l0VlaSsjL/nnvA7mxeW7tqqmsUvSNyGJZSs' + 'jLDonNyeBrOldrOAkPM2hylVk3wDAFzeA8IRnXOqM9jaAssmpaUzE5X99qnXz7' + 'd/Hng8EnBfVRWMkzLMDVl1BcQUDkPVOFzLKmFo7kHga2sTLNI0si3GTVAg0+yY' + 'iRX1Xzw9q2NX3/5bWT0NHUNScoS05aMehpDS0EuQEP0T1DPEDUp1KJSRJsA2nA' + 'W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CS0adVfvYVZVCi/KSgqhgpMSCNo0SuCSA' + 'qiaNlLXS91H4A1oAe0vBSZF/znaMinu3l9vd3aq+vDQcH/fwbZgO4iyd8cu0aQ' + 'I/mkxAKadgKTgQyxaXQ8FqKpmg5nfgHD9wcTzDAneYeo9Rl3HiGMA3hvsnQabZ' + 'nDoxNFJ7DFi6yb749R7QvCOwEWGOA0DwMcAU7eqmeyqw3uwJogpg/fsHcTWQaw' + 'Q3QZrj8EC0UWsEJ3EAhEjlm5YIjaA7eQ7VVJKsLKR7rT/C17wwRs='); //debugbitmap(five); getClient.activate; wait(100); repeat if(findbitmapTol(x,y,five,403,685,454,740,100))then begin writeLn('found bitmap at ' + intToStr(x) + ',' + intToStr(y)); end else writeLn('missing bitmap'); wait(1000); until false; end. [/sCAR] Quote Link to comment Share on other sites More sharing options...
LordJashin Posted December 18, 2012 Share Posted December 18, 2012 (edited) Is the bitmap from pre SCAR 3.35? If so you need to convert it to the new Bitmap string format. Do Tools->Update Bitmaps. Yeah I don't see anything wrong with your script. If your really paranoid about it. Try reinstalling SCAR, and deleting its appdata in C:\Users\You\appdata You also don't need the second var bold keyword. If all else fails, try making a new bitmap? This compiles fine for me. O yeah try doing something like this too, SCAR might see the image area or x, y differently. Check the corner coords: [scar] program New; var x, y, w, h: Integer; Bmp: TSCARBitmap; begin Bmp := TSCARBitmap.Create('deNpjZGBk+P//PwAGDQMA'); GetBoxSize(GetClient.ImageArea, w, h); FindBitmap(x, y, Bmp, 0, 0, w - 1, h - 1); end. [/scar] Edited December 18, 2012 by LordJashin Quote Link to comment Share on other sites More sharing options...
Janilabo Posted December 18, 2012 Share Posted December 18, 2012 dope, have you tried does SCAR find any other bitmaps for you? I mean... Like, is it only problematic in that game? Also, if you have found bugs in SCAR Divi, you should report them HERE - so Freddy can fix them. -Jani Quote Link to comment Share on other sites More sharing options...
FHannes Posted December 18, 2012 Share Posted December 18, 2012 Is the bitmap from pre SCAR 3.35? If so you need to convert it to the new Bitmap string format. Do Tools->Update Bitmaps. All bitmaps with the prefix "d" are 3.35+ EDIT: If SDL uses hardware accelerated graphics, it's possible that SCAR can't capture the window. Quote Link to comment Share on other sites More sharing options...
dopeness Posted December 18, 2012 Author Share Posted December 18, 2012 All bitmaps with the prefix "d" are 3.35+ EDIT: If SDL uses hardware accelerated graphics, it's possible that SCAR can't capture the window. It has in the previous versions. I made a trigger bot with it - though that used the findColor function. It was still able to capture the window though. Quote Link to comment Share on other sites More sharing options...
FHannes Posted December 18, 2012 Share Posted December 18, 2012 As far as I'm aware, FineBitmapTol should work correctly. Try DebugBitmap(GetClient.Capture); to see if it captures the window correctly. If so, make sure that the search area contains the entire bitmap. If that still doesn't help, post a screenshot of the window here and I'll take a look. Quote Link to comment Share on other sites More sharing options...
dopeness Posted December 18, 2012 Author Share Posted December 18, 2012 That's weird. I have the Scar window over the windowed game and select the windowed game as the active client or w/e. I do the debug client.capture and it still shows the scar window on the front of the game window. Do you still need to see a screen shot? Or do you want the screenshot and the code? Quote Link to comment Share on other sites More sharing options...
Janilabo Posted December 18, 2012 Share Posted December 18, 2012 Did you use DebugBitmap(GetClient.Capture) before or after GetClient.Activate? Try this: begin GetClient.Activate; Wait(500); DebugBitmap(GetClient.Capture); end. Quote Link to comment Share on other sites More sharing options...
dopeness Posted December 18, 2012 Author Share Posted December 18, 2012 Did you use DebugBitmap(GetClient.Capture) before or after GetClient.Activate? Try this: begin GetClient.Activate; Wait(500); DebugBitmap(GetClient.Capture); end. Yeah, that's probably the problem for that. Freddy, do you need a screen shot of the window? - - - Updated - - - ^ Yeah I had it before, lol. Here is the screen shot Freddy: I'm trying to detect the little Blue thing to the left of the 100 at the bottom. Quote Link to comment Share on other sites More sharing options...
FHannes Posted December 18, 2012 Share Posted December 18, 2012 Well, finding the bitmap on the screenshot with your script works fine. Make sure that scar isn't covering the window when you start the script. Also, if that's not the case, then it's probably an issue with the hardware accelerated graphics. Try Janilabo's snippet. Quote Link to comment Share on other sites More sharing options...