Adium Robots
Adium Robots
Hey friends,
Arent there any robot scripts for adium ?
Has someone out there development somekind of robot for his client, that he/she could share with us ?
I´m wondering if it is possible, I have few client´s that ask me about there specific web addresses very often, and I was wondering if there was some robot solution to this ?
Arent there any robot scripts for adium ?
Has someone out there development somekind of robot for his client, that he/she could share with us ?
I´m wondering if it is possible, I have few client´s that ask me about there specific web addresses very often, and I was wondering if there was some robot solution to this ?
-
sfb
Perhaps you could try an applescript.
http://adiumxtras.com/index.php?a=search&cat_id=6
You could also make your own.
http://adiumxtras.com/index.php?a=search&cat_id=6
You could also make your own.
I don't think there is any (ro)BOT available at this moment. I'm working on something, but i'm stuck because the Applescript support for Adium is not good. We are missing important stuff, despite what the Adium Applescript dictionary says about the available functions. for example you can't parse the message you receive in Applescript... this means you can't do any actions based on the message content of a chat ...
Livio
Livio
Euuhmm ...
What about : * Adium Suite > Content > plainText message
- plainText message (Unicode text) : The message of this content, in plain text (losing all formatting and embedded information).
- HTML message (Unicode text) : The message of this content, in HTML.
---------
Also this is advertised in the dictionary, but the last 2 items don't work as expected :
tell the active chat of the first interface controller
set chatternaam to chat name
set chatid to ID
set chatdatum to date opened -> doesn't work !
set chatfoto to chat image -> doesn't work !
end tell
Livio
What about : * Adium Suite > Content > plainText message
- plainText message (Unicode text) : The message of this content, in plain text (losing all formatting and embedded information).
- HTML message (Unicode text) : The message of this content, in HTML.
---------
Also this is advertised in the dictionary, but the last 2 items don't work as expected :
tell the active chat of the first interface controller
set chatternaam to chat name
set chatid to ID
set chatdatum to date opened -> doesn't work !
set chatfoto to chat image -> doesn't work !
end tell
Livio
- evands
- Cocoaforge Admin
- Posts: 3152
- Joined: Thu Dec 02, 2004 10:55 pm
- Location: Decatur, GA
- Contact:
That's talking about existing messages in the chat, not messages as they come in; also, it's almost certainly broken in Adium 1.0 (chats are no longer keeping track of their previous chat messages, so there's no way this information is accessible) so should be removed from the dictionary unless someone is willing to fix it. So if you're using the beta, yeah, the dictionary is lying.Livio wrote:Euuhmm ...
What about : * Adium Suite > Content > plainText message
- plainText message (Unicode text) : The message of this content, in plain text (losing all formatting and embedded information).
- HTML message (Unicode text) : The message of this content, in HTML.
I've never understood setting stuff to variables in Applescript. I find that sometimes you can use objects directly but not store them to a variable. What does 'doesn't work' mean in this context?Also this is advertised in the dictionary, but the last 2 items don't work as expected :
tell the active chat of the first interface controller
set chatternaam to chat name
set chatid to ID
set chatdatum to date opened -> doesn't work !
set chatfoto to chat image -> doesn't work !
end tell
Livio[/quote]
- evands
- Cocoaforge Admin
- Posts: 3152
- Joined: Thu Dec 02, 2004 10:55 pm
- Location: Decatur, GA
- Contact:
*nod* It'd definitely be good for it to work that way. I'm just saying that I've never, in a general sense (not just in Adium), been able to consistently use applescript variables. This lack of Applescripting knowledge on my part certainly doesn't help considering that I also personally implemented most of the Applescript support in Adium -- the blind leading the blind!Livio wrote:I want to put the values into variables because I use the values at a later stage to log them in a Filemaker database.
So it always returns NULL? It doesn't give an error?That "Doesn't work" means that this part doesn't work :-) haha
I do not get any value's returned for 'chat image' and 'date opened'.
I feel I should chime in on this one because I'm currently toying with a small solution that requires me to use and IM client to connect with FileMaker.evands wrote:That's talking about existing messages in the chat, not messages as they come in; also, it's almost certainly broken in Adium 1.0 (chats are no longer keeping track of their previous chat messages, so there's no way this information is accessible) so should be removed from the dictionary unless someone is willing to fix it. So if you're using the beta, yeah, the dictionary is lying.Livio wrote:Euuhmm ...
What about : * Adium Suite > Content > plainText message
- plainText message (Unicode text) : The message of this content, in plain text (losing all formatting and embedded information).
- HTML message (Unicode text) : The message of this content, in HTML.
I've never understood setting stuff to variables in Applescript. I find that sometimes you can use objects directly but not store them to a variable. What does 'doesn't work' mean in this context?Also this is advertised in the dictionary, but the last 2 items don't work as expected :
tell the active chat of the first interface controller
set chatternaam to chat name
set chatid to ID
set chatdatum to date opened -> doesn't work !
set chatfoto to chat image -> doesn't work !
end tell
Livio
I've been able to get things working using 0.89.1.
It sucks to hear that 1.0 breaks things and it would be nice to find a good solution. Granted the dictionary and AS support is pretty inferior, but here's a solution that grabs the last message from the log of the active chat window.
The problem is if other windows pop up from new inbound chat sessions. You'd have to make some type of polling solution that watched to see that either no windows were open or you have to use a really bad kludge of using
Code: Select all
set visible of window "Window Name" to false
set visible of window "Window Name" to trueThis is the script you attach to Adium's incomming message action
Code: Select all
set db to "Database Name"
tell application "FileMaker Pro Advanced"
do script FileMaker script named "Capture Chat Message" of database db
end tellAnyway...
Then, within your target FileMaker database you can use this code. The tell lines for FileMaker are commented out because it's self referencing.
Code: Select all
--set db to "Database Name"
set cellname to "Field Name"
-- my code assumes the field is a global field
--tell application "FileMaker Pro Advanced"
try
--tell database db
set data of cell named cellname of current record to getLastMessage()
activate
--end tell
on error
display dialog "Can't find cell "" & cellname & "" in this database."
end try
--end tell
on getLastMessage()
tell application "Adium"
activate
set chatnick to ID of the active chat of the first interface controller
set chatcontent to plainText message of content of active chat of the first interface controller
end tell
return item 1 of (chatcontent)
end getLastMessageMatt Petrowsky
Editor of ISO FileMaker Magazine
http://www.filemakermagazine.com
P.S. Since adium seems to use its own handler for outbound messages (such as on substitute()) is there a way to use the same setup for inbound messages. I know you've got the plist file for watching for the keyword. Is there a way to leverage this same system? It would be easy enough to tell users to prefix their message with a specified keyword. (e.g "sfm: 123 address", where sfm: is a watched inbound message prefix that programmatically ties to an AppleScript - of course, we still have that issue of not being able to get the lastest inbound message effectivly.
Hey Evands,
I just opened 1.0b11 (which updated to b14). What do you say to at least staying backwards compatible with your current stable AS implementation?
I noticed the following changes
Ok, so chat windows no longer show the log of the last X items. It would still be nice if contents remained an element of a chat. The word "contents" would then be more semantically correct since it now appears that "log" was the former element from which plainText message was accessible.
Dang, I wish I knew Objective-C and writing AppleEvents/AppleScript implementations. We could really clean up the dictionary and improve support. Alas, I have a normal work routine and little time.
If anything, it would be nice to get something in the app that allowed access to the most recent inbound message. I read the thread on the "security" issues and it seems like there is no security issue when the client is in full control of what events happen and what AppleScripts they trigger.
Oh, and one feature that would be nice is an action such as "Bring window forward" as an event for things like Message received.
I just opened 1.0b11 (which updated to b14). What do you say to at least staying backwards compatible with your current stable AS implementation?
I noticed the following changes
Code: Select all
0.89.1 chat object
contains contacts, contents; contained by Adium controllers.
1.0b14 chat object
contains contacts; contained by Adium controllers.Dang, I wish I knew Objective-C and writing AppleEvents/AppleScript implementations. We could really clean up the dictionary and improve support. Alas, I have a normal work routine and little time.
If anything, it would be nice to get something in the app that allowed access to the most recent inbound message. I read the thread on the "security" issues and it seems like there is no security issue when the client is in full control of what events happen and what AppleScripts they trigger.
Oh, and one feature that would be nice is an action such as "Bring window forward" as an event for things like Message received.
- Catfish_Man
- Cocoaforge Admin
- Posts: 1203
- Joined: Thu Dec 02, 2004 6:30 am
- Location: Portland, Oregon
- Contact:
[quote="digumo"]
If anything, it would be nice to get something in the app that allowed access to the most recent inbound message.
/quote]
This seems reasonable. Next to no memory bloat, and I think we store the last 25 messages for option-up/down anyway.
I think part of the problem (or at least my problem) is that the devs know how easy it is to write filter plugins that pipe stuff to other processes, so this AS stuff feels incredibly clunky
If anything, it would be nice to get something in the app that allowed access to the most recent inbound message.
This seems reasonable. Next to no memory bloat, and I think we store the last 25 messages for option-up/down anyway.
I think part of the problem (or at least my problem) is that the devs know how easy it is to write filter plugins that pipe stuff to other processes, so this AS stuff feels incredibly clunky
You've got no argument from me about how much easier it is to mix together a little shell, perl or sed/awk combos. The trick is the combination of knowledge and comfort by the person trying to do the automation.Catfish_Man wrote:I think part of the problem (or at least my problem) is that the devs know how easy it is to write filter plugins that pipe stuff to other processes, so this AS stuff feels incredibly clunky
While you and I may be comfortable throwing together various functions in a text document, it's the "availability" of AppleScript that empowers people who don't specifically view themselves as developers. There are likely more people who are "less afraid" to open an AppleScript to modify it (because of great marketing and tools by Apple) than those who will make the connection that logic is logic regardless if your "if" condition is in Perl or AppleScript.
Plus, the common perception of AppleScript is that it helps the Macintosh in being a more "automated" platform. While you can automate pretty much anything on any platform with enough know-how, AppleScript (while not as efficient as doing things within the shell or a nice fast language) brings the automation to a wider audience. Heck, I work in FileMaker, and while it can do quite a bit, it's still a toy when compared to doing things in PHP or Perl. It's the "easy factor" that makes it such a productive tool - the same with AppleScript (and now using Automator).
If you guys wanted to have open dialog about implementation, I'd love to have a topic on suggested methods. The dictionary is pretty convoluted right now. Or, from what I hear, the original AIM client had a pretty good implemention of event based triggering of AppleScripts (although I've not used it).
Matt
P.S. While writing a shell script, using sed to strip the HTML from the log burried in a specific location (using regex) may seem easy enough, simply understanding <.*?> can be quite confusing compared to "get message -1 of frontmost chat log" where (-1 would be the most recent message of a chat window when compared to the first message - which would be 1) Heck, let's get on Skype, using OmniOutliner (and or SubEtha) and revise the terminology in the AS dictionary.
Just out of curiosity, why exactly would you need to hop on Skype, given the fact that an IM client is being discussed and likely used already?digumo wrote:Heck, let's get on Skype
Try my software!
#define ADIUMX pimp //by me
#define QUESTION ((2b) || (!2b))
Have you hugged a programmer today?
#define ADIUMX pimp //by me
#define QUESTION ((2b) || (!2b))
Have you hugged a programmer today?
Touché bgannin, I think, as I'm getting older in life (which is not that old - 35), that the lost art of getting to know people (especially people smarter than yourself) in a more conventional fashion, holds more value today as we become more and more disconnected because of technology. (ok, maybe a little too touchy-feely but...)bgannin wrote:Just out of curiosity, why exactly would you need to hop on Skype, given the fact that an IM client is being discussed and likely used already?
We can know people through their zeros and ones, but I'm finding that synergy is increased when you "know" the people you work with - open source or otherwise - simply because you get to know more about who they are. Don't we all like to be known for what we know, who we are and what we like?
Or stated in another way... It's just great to get to know people in a more personal manner and since it's practially free to do so - why not?
Matt
P.S. I've added my chat IDs to my profile