Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // note, that PrevCaption and CurrCaption must not be local variables in this scope
- PrevCaption := CurrCaption;
- CurrCaption := GetWinCaption;
- if CurrCaption <> PrevCaption then
- ShowMessage('changed')
- else
- ShowMessage('not changed');
- // or better have just one "global" variable holding the last caption
- var
- LastCaption: string;
- procedure UpdateCaption;
- var
- S: string;
- begin
- S := GetWinCaption;
- if S <> LastCaption then
- begin
- LastCaption := S;
- ShowMessage('changed');
- end
- else
- ShowMessage('not changed');
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement