Applescript question

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
Livio
Harmless
Posts: 11
Joined: Thu Sep 21, 2006 5:44 pm
Location: Belgium, Europe

Applescript question

Post by Livio »

Hi,

I'm trying to connect Adium to Filemaker via Applescript ... this works, but not 100%. I have difficulties fetching the chat message content in Applescript. I looked everywhere on Google and this forum, but can't find any working examples. Who can help ?

This is what i have so far :

Code: Select all

tell application "Adium"
	activate
	tell the active chat of the first interface controller
		set chatternaam to chat name
		set chatid to ID
	end tell
	
	--set theText to the plainText message of first chat
	--display dialog theText
end tell


tell application "Adium"
	activate
	
	--if theText = "log" then
	if "a" = "a" then
		
		tell application "FileMaker Pro Advanced"
			activate
			go to database "adium"
			go to layout "adium"
			create new record
			set data field "wie" of last record to chatternaam
			set data field "wie_id" of last record to chatid
		end tell
		
 --send (active chat of the first interface controller) message "Filemaker Record added"

	end if
	
end tell


What's the correct applescript code for getting the message from the chat window ?

BTW ... i use version 1.0beta12

Livio
User avatar
Catfish_Man
Cocoaforge Admin
Posts: 1203
Joined: Thu Dec 02, 2004 6:30 am
Location: Portland, Oregon
Contact:

Post by Catfish_Man »

Does this work in b11? (it's worth checking, I did change something AS related)
Livio
Harmless
Posts: 11
Joined: Thu Sep 21, 2006 5:44 pm
Location: Belgium, Europe

Post by Livio »

Haven't tested it with Beta11 as I just started with B12. Where can I download Beta11 ?

http://adiumx.cachefly.net/Adium_1.0b11.dmg -> File not found :-)

Livio
User avatar
Catfish_Man
Cocoaforge Admin
Posts: 1203
Joined: Thu Dec 02, 2004 6:30 am
Location: Portland, Oregon
Contact:

Post by Catfish_Man »

Livio
Harmless
Posts: 11
Joined: Thu Sep 21, 2006 5:44 pm
Location: Belgium, Europe

Post by Livio »

I just tested it with B11 ... makes no difference... sorry :-)


Livio
User avatar
Catfish_Man
Cocoaforge Admin
Posts: 1203
Joined: Thu Dec 02, 2004 6:30 am
Location: Portland, Oregon
Contact:

Post by Catfish_Man »

Excellent! That means I didn't break it. No idea how to fix it though, sorry. My AS knowledge is sadly lacking.
Livio
Harmless
Posts: 11
Joined: Thu Sep 21, 2006 5:44 pm
Location: Belgium, Europe

Post by Livio »

Should this be posted as a bug ?

Livio
Post Reply