Issue migrated from trac ticket #15
type: Defect | component: Colloquy (Mac) | severity: Normal | priority: Normal | version: 2.1 (Mac) | status: new | keywords: AS process outgoing chat message send
2005-02-27 17:50:38: @brennanyoung created the issue
I am fond of making text input 'filter' scripts, for example the following script is intended to insert a space between each of the characters of the text input :
using terms from application "Colloquy"
on process outgoing chat message msg in chatView
set msgTxt to (body of msg as string)
set AppleScript's text item delimiters to " "
set msgchars to (characters of msgTxt) as string
set AppleScript's text item delimiters to ""
send chatView message msgchars
return false
end process outgoing chat message
end using terms from
The result of this is that typing 'hello' would appear as 'h e l l o'. (More advanced/specialised filters can easily be imagined).
The problem is that when I 'send' my filtered message from 'process outgoing chat message', 'process outgoing chat message' gets called again, leading to a dead loop.
There are a couple of possible solutions to this problem, but I would suggest an optional extra parameter for 'send' which would ensure that 'process outgoing chat message' does not get called. The exact implementation is not so important however. Whatever works out.
2005-03-15 04:31:40: anonymous commented
"There are a couple of possible solutions to this problem, but I would suggest an optional extra parameter for 'send' which would ensure that 'process outgoing chat message' does not get called. "
I would recommend the opposite - by default, use the Send that does NOT call the plugin handlers. If this error exists in a script, it is because the author is careless; the odds are not good that the author will think to include the optional parameter.
I'd suggest "send chatView message msgchars with plugins" or something to that effect. If this parameter does not exist, it defaults to false and no plugin handlers will be called.
In addition, more often than not, the script author does not want or need the text to be post-processed.
2005-03-23 17:34:07: stacey commented
am sorry that i said what i said i'm sorry lov u lots lov stacey
2005-05-05 23:29:46: @brennanyoung commented
"send chatView message msgchars with plugins" is good :)
2005-10-12 04:39:34: anonymous changed version from 2.0 (2C11) to 2.0 (2D16)
2008-12-30 23:09:26: @xeenon changed version from 2.0 (Mac) to 2.1 (Mac)
2008-12-30 23:09:26: @xeenon commented
Valid as of latest build.
2009-04-16 23:54:59: @akempgen changed component from Colloquy (Mac) to AppleScript Support