Filtering strings with results of AppleScript commands
Posted: Thu Dec 30, 2004 9:24 am
Hi there guys,
I'm interested in getting Adium to filter the screen name of an account's displayName for applescript commands, so I (Kiel) don't have the following display in my message windows, for example:
Kiel (%_album)
message
Dale
reply to message
Ideally, I want to be able to have the following output in the message window:
Kiel (Poodle Hat)
message
Dale
reply to message
Please note that Dale sees my screen name as "Kiel (Poodle Hat)". What I'd like to do is have "Kiel (Poodle Hat)" show on my end of the conversation/message window.
I've downloaded the source code and I'm looking to access the current screen name of the account and format it so the applescript command does not appear in it, rather the result of the command.
First of all, I don't understand how Adium filters NSStrings or NSAttributedStrings for AppleScript commands. It seems there's an instance method I can use in the AIContentController class but I'm unsure how to use it properly (for example, pre-processing the string).
Furthermore, I'm unsure of how to get the account's current displayName. I'm starting to think that I should make the filtering occur when the setDisplayName: method is called, filtering the displayName at the very start.
I'm not too familiar with the code and I'd like to contribute to correcting this minor display flaw. The removal of the %_album would make Adium look more polished and "lovely".
Any suggestions developers or am I on the wrong road?
Thanks in advance,
Kiel :-)
PS: I've written an NSLog() statement in the - [AIListObject ownDisplayName] method to show me the local variable called outName of the instance of AIAccount being used. When the method is called and I open up a message window and send someone a message, the Console writes my screen name as "Kiel (%_album)". Furthermore, if I message myself, Console writes "Kiel (%_album)" and on another line "Kiel (Poodle Hat)". Which screen name of which instance is being used?
I'm interested in getting Adium to filter the screen name of an account's displayName for applescript commands, so I (Kiel) don't have the following display in my message windows, for example:
Kiel (%_album)
message
Dale
reply to message
Ideally, I want to be able to have the following output in the message window:
Kiel (Poodle Hat)
message
Dale
reply to message
Please note that Dale sees my screen name as "Kiel (Poodle Hat)". What I'd like to do is have "Kiel (Poodle Hat)" show on my end of the conversation/message window.
I've downloaded the source code and I'm looking to access the current screen name of the account and format it so the applescript command does not appear in it, rather the result of the command.
First of all, I don't understand how Adium filters NSStrings or NSAttributedStrings for AppleScript commands. It seems there's an instance method I can use in the AIContentController class but I'm unsure how to use it properly (for example, pre-processing the string).
Furthermore, I'm unsure of how to get the account's current displayName. I'm starting to think that I should make the filtering occur when the setDisplayName: method is called, filtering the displayName at the very start.
I'm not too familiar with the code and I'd like to contribute to correcting this minor display flaw. The removal of the %_album would make Adium look more polished and "lovely".
Any suggestions developers or am I on the wrong road?
Thanks in advance,
Kiel :-)
PS: I've written an NSLog() statement in the - [AIListObject ownDisplayName] method to show me the local variable called outName of the instance of AIAccount being used. When the method is called and I open up a message window and send someone a message, the Console writes my screen name as "Kiel (%_album)". Furthermore, if I message myself, Console writes "Kiel (%_album)" and on another line "Kiel (Poodle Hat)". Which screen name of which instance is being used?