Bixby Sayz Posted August 7, 2012 Share Posted August 7, 2012 Since I use SMART (a lot) when running scripts I always like to make sure any dtms I create work both with a targeted browser client and using SMART. Except it is never quite that simple... I use a simple little test script (see below) that checks to find the dtm 1) on main screen, 2) tabs along the top of bank, 3) bank contents, 4) inventory, and 5) chat box. And of course it behaves differently using SMART. I test it by placing my item in the first slot of a bank tab (so item appears on the tabs across the top of bank because sometimes those items are slightly different than items in the bank itself), and in the inventory. (See screenshot) First run I just uncomment SMART define and let 'er rip just to get SMART loaded. Second run I login, open bank, toggle SMART to enabled, and run it. Third run I comment out SMART define, toggle SMART to disabled, target SMART as if it were a browser and run it again. In the screen shot and script I am testing a normal log. Using SMART: Found on main screen (86,69)Not found on bank tabs Not found in bank Not found in inventory Not found in chat Treating SMART window as just a browser: Found on main screen (90,73)Found on bank tab 2 (90,73) Found in bank slot 0 (49,115) Found in inventory slot 0 (574,236) Not found in chat What the? Crap like this drives me round the bend. (Yes I have tripled checked my graphics settings in SMART) [sCAR]program new; {$DEFINE RS2} {$DEFINE SMART} {$I OSI\OSI.scar} procedure Test; var DTM: Integer; P: TPoint; begin // Logs - Normal DTM := DTMFromString('78DA633464606058CA800292BC7418B880342310FF0702467D206315031A6002938C501EA32690584E849A19F8D500004555082D'); try // Find anywhere on main screen if FindDTM(DTM, P.X, P.Y, MSX1, MSY1, MSX2, MSY2) then begin WriteLn(Format('Found on main screen (%d,%d)', [P.X, P.Y])); MMouse(P.X, P.Y, 0, 0); end else WriteLn('Not found on main screen'); // Find on tabs along top of bank if FindDTM(DTM, P.X, P.Y, MBX1, (MBY1 - 40), MBX2, (MBY1 + 7)) then begin WriteLn(Format('Found on bank tab %d (%d,%d)', [(((P.X - 25) div 48) + 1), P.X, P.Y])); MMouse(P.X, P.Y, 0, 0); end else WriteLn('Not found on bank tabs'); // Find in bank itself if FindDTM(DTM, P.X, P.Y, MBX1, MBY1, MBX2, MBY2) then begin WriteLn(Format('Found in bank slot %d (%d,%d)', [CordsToBankSlot(P), P.X, P.Y])); MMouse(P.X, P.Y, 0, 0); end else WriteLn('Not found in bank'); // Find in inventory if FindDTM(DTM, P.X, P.Y, MIX1, MIY1, MIX2, MIY2) then begin WriteLn(Format('Found in inventory slot %d (%d,%d)', [CordsToItemSlot(P), P.X, P.Y])); MMouse(P.X, P.Y, 0, 0); end else WriteLn('Not found in inventory'); // Find in chat box if FindDTM(DTM, P.X, P.Y, MCX1, MCY1, MCX2, MCY2) then begin WriteLn(Format('Found in chat (%d,%d)', [P.X, P.Y])); MMouse(P.X, P.Y, 0, 0); end else WriteLn('Not found in chat'); finally FreeDTM(DTM); DTM := 0; end; end; begin ClearDebug; SetUpOSI; Test; end.[/sCAR] Quote Link to comment Share on other sites More sharing options...
FHannes Posted August 8, 2012 Share Posted August 8, 2012 Afaik SMART isn't meant to work like that? I don't really know that much about it... Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted August 8, 2012 Author Share Posted August 8, 2012 Treating as a browser you mean? Not really but it works. If the script doesn't load the SMART library but the window is already up then as far as SCAR is concerned it's just another client window. I could load up the browser but why bother when there is a handy web browser right there in front of you. What drives me crazy is how color and other finding routines behave differently when using SMART in a script. To make it even more fun if you do a get color at point (somex,somey) it returns the same color using either SMART or the browser (*most* of the time). And then sometimes with no consistency get color will return meaningless values under SMART, causing the finding routines to fail. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted September 14, 2012 Author Share Posted September 14, 2012 Is anyone else having issues with dtm finding using SMART? (Or is anyone even bothering these days) Running a test script that loads Iron Ore dtm from Smithing.scar then looks for it on: Entire Screen, Main Screen, Bank Tabs, Bank Screen, Inventory. Run this with a browser as client it finds every single one. Run this using SMART and it finds the Entire Screen and Bank Tab and that's it. Both the web client and SMART have the identical graphics settings (triple checked). Quote Link to comment Share on other sites More sharing options...
LordJashin Posted September 15, 2012 Share Posted September 15, 2012 You're lucky, mine wont even load right now. I tried reinstalling JAVA, reinstalling INCLUDES. SCAR 3.35 portable and SCAR 3.36 alpha. I tried cleaning caches and all that fun stuff. Wth. I think maybe the port it is trying to use, another program is using it? Yes I disabled anti virus and firewall Quote Link to comment Share on other sites More sharing options...
LordJashin Posted September 15, 2012 Share Posted September 15, 2012 I propose we add a legacy SMART support. For SMART 6.9 Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted September 15, 2012 Author Share Posted September 15, 2012 6.9 did seem a lot more stable. Actually I had good luck with it up until 7.1. SMART has been nothing but a pain in the ass since 7.2. Benland claims 8 is way more stable than 7.2. Who knows. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted September 15, 2012 Share Posted September 15, 2012 (edited) Yeah i finally got it working. But who knows maybe if i close and try to reopen again it will flop lol. But SetupOSI isn't seeing it there. So it goes through its damn wait procedures for like 12000000, before it does anything I'm on the character creation screen. So maybe that's why. Is there a way to bypass the waits? Is 8 compatible with SCAR? Also how the hell do you use SMART without using SetupOSI procedure. Edited September 15, 2012 by LordJashin Quote Link to comment Share on other sites More sharing options...
FHannes Posted September 15, 2012 Share Posted September 15, 2012 Is 8 compatible with SCAR? SMART 7.x and up aren't compatible with SCAR, hence the bridge plugin I wrote. When I have some time, I'll see if I can port SMART 8. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted September 15, 2012 Share Posted September 15, 2012 SMART 7.x and up aren't compatible with SCAR, hence the bridge plugin I wrote. When I have some time, I'll see if I can port SMART 8. Would it be possible to implement legacy support, and use SMART 6.9? I think I might just make another pull request Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted September 15, 2012 Author Share Posted September 15, 2012 Is 8 compatible with SCAR?No. Also how the hell do you use SMART without using SetupOSI procedure.Take a look at SMART.scar in the OSI\RS2\Misc folder. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 10, 2012 Author Share Posted November 10, 2012 Did I mention to anyone how I managed to resolve this last time? Blasted thing is doing it again: Search for dtms works for browser, fails miserably using SMART. Completely uninstalled SCAR, deleted all caches and appdata. Did a complete reinstall. Still buggered. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 10, 2012 Share Posted November 10, 2012 Well, the coordinates are different. I think SMART is slightly smaller than browser on its box size or w/e. Also... Java, and SMART, might render RS2 a "little" bit different on the graphics? I doubt it tho... Try doing the targeting from the desktop thing, that janilabo I think used, or maybe it was you. My brain is lost atm. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 10, 2012 Author Share Posted November 10, 2012 Try doing the targeting from the desktop thing, that janilabo I think used, or maybe it was you. My brain is lost atm.Yeah that was me. And that does work: Disable SMART, comment out SMART from script, target SMART window (so SMART window is now treated as "just another client") and voila it finds it. Re-enable SMART, un-comment SMART in script, and doesn't find. Aaaaaaaaaaaargh. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 10, 2012 Share Posted November 10, 2012 You can try messing with the ImageArea, InputArea, size of the SMART window, and other things. Can't think of anything else you could try though... You are using the new SMART that Freddy wrapped right? Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 12, 2012 Author Share Posted November 12, 2012 You are using the new SMART that Freddy wrapped right?I am using the version of SMART supplied by the OSI include. Is there a newer one? Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 12, 2012 Share Posted November 12, 2012 No that's the one! The SMART on Benlands github is at version 8 i think now Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 12, 2012 Author Share Posted November 12, 2012 No that's the one! The SMART on Benlands github is at version 8 i think now8.1 one actually. I couldn't even get it working properly with Simba itself, so I gave up quickly. Reminds me: I need to post over there and ask what gives. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 12, 2012 Share Posted November 12, 2012 Did you get the latest version 0.99? 0.98.6 or w/e doesn't work with the latest SMART. You have to have the latest. Look around for a link, I think under announcements for download. Quote Link to comment Share on other sites More sharing options...