SRL Archive - OSR Help

Detecting change/motion?


Reveille

2012-01-02 23:21:35

How would I detect change/motion in a given window such as the chat window or inventory. For example if a random food item in a certain inventory slot was eaten, how would I detect the motion/change in the inventory slot to then produce a result. I want to use it in a simple script that can be used for a variety of reasons and that uses different windows. I'm fairly new so I'm still learning, but would I have to work with bitmaps? Or is there a simple command for this?

YoHoJo

2012-01-02 23:23:23

Compare inventory count before/after for inventory cahnges.

Reveille

2012-01-02 23:30:56

What if I just wanted to check if there was any change at all in the chat window, like if someone said anything in the public chat.

Press Play

2012-01-04 17:02:42

From: goreguy11
What if I just wanted to check if there was any change at all in the chat window, like if someone said anything in the public chat.

I've never used it before, but I believe you use:
{*******************************************************************************
function GetLastChatText(var chat: String): Boolean;
By: masquerader / Wizzup?
Description: Returns true if blue chat text was found
*******************************************************************************}
You could check what this function returns, and if it's different to the last result, you'll know someone said something new! :)