SRL Archive - RS3 Help

Detect red border message?


Bixby Sayz

2014-09-15 13:34:00

When you attempt to do something in RS3 that you cannot (Example: use an agility shortcut when lacking the required agility level) a message box with a red border and white text flashes on screen briefly then fades away.

Is there anything in SRL existing to detect this and get the text. Nothing jumped out at me perusing through the includes. Came up with my own to detect the red boarder and get the text but having a devil of a time to get the text to ocr properly. Hoping I missed something and there is something already built in I can use.

Clarity

2014-09-15 13:36:33

What warning specifically are you trying to detect? There may be an easier method depending on what you are doing.

Bixby Sayz

2014-09-15 13:39:17

Exactly as I stated: "You need Agility level x.". I would prefer to bundle the detection into a routine that I can re-use in the future (potentially in a different context).

Coh3n

2014-09-15 14:10:23

From: Bixby Sayz
Is there anything in SRL existing to detect this and get the text. Nothing jumped out at me perusing through the includes. Came up with my own to detect the red boarder and get the text but having a devil of a time to get the text to ocr properly. Hoping I missed something and there is something already built in I can use.
Have you tried using tesseract to find the text inside the box?

As far as I know there isn't an SRL function for this – just functions that will find text inside a given box.

Bixby Sayz

2014-09-15 14:52:18

I have it working now. A *tiny* mistake in another custom routine of mine was returning the wrong text points messing up the ocr. Fixed that and now it works like a charm.

Now my big dilemma is: what do I call this? Is it a failure message, requirements message, or get totally unimaginative and call it a red border dialog? This is important stuff lol.

Coh3n

2014-09-15 20:34:01

From: Bixby Sayz
I have it working now. A *tiny* mistake in another custom routine of mine was returning the wrong text points messing up the ocr. Fixed that and now it works like a charm.

Now my big dilemma is: what do I call this? Is it a failure message, requirements message, or get totally unimaginative and call it a red border dialog? This is important stuff lol.
getDialogMsg? getPopupMsg? getFailureMsg? Those are my best ideas. :p

getRedBorderDialogMsg? Lol

The Mayor

2014-09-15 21:12:47


if getPopupDialogFailureMessageInsideRedBorder() then
begin
writeLn('We just found the popup dialog failure message inside the red border!');
end;