Replacements

Posted by Bromik on Sun 31 Jul 2005 08:12 PM — 3 posts, 14,295 views.

#0
I am absolutely new to programming as a whole and having no luck with it so far.

Lets say I would like 'You have recovered balance.' to be replaced with 'BALANCE RECOVERED' in bold white letters. All I know is to send it to myself and not the world.

Thanks in advance.
USA #1
A fairly simple trigger for this could be used, rather than scripting.

In the edit trigger box (after clicking add in the configuration screen for triggers)
Trigger: You have recovered balance.
Send: BALANCE RECOVERED

Check 'Enabled', and 'Omit from output'

Use the drop down to change the colour and style to Bold White.

Change the 'Send to:' drop down to 'Output'

Then click on OK.
Should do it for you. (There are also scripting methods, but this is one of the quicker, easier ways).
Amended on Mon 19 Mar 2007 06:11 AM by Deqitosv
USA #2
But if you demand that it be done in vbscript, you could run something like this (though I don't see why you'd put in the extra effort):

Edit your script file to have this in it:

sub balance(trigger,sent_line,wildcards)
world.colournote "#FFFFFF", "", "BALANCE RECOVERED"
end sub

Save the script then, in the edit trigger box (after clicking add in the configuration screen for triggers)
Trigger: You have recovered balance.
Leave Send blank.

Check 'Enabled', and 'Omit from output'

put the word "balance" in script.

Click OK.