Timbuktu and applescript help... PLEASE

Hello All

I’m a software developer for a School Board in Ontario.
I’ve developed a nice filemaker solution for our boards service techs.

I want to integrate timbuktu connectivity into my app via AppleScript.
I’m finding it very very hard to understand AppleScript’s syntax.
I’ve used the record feature in Apple’s Script Editor to try and get a better understanding but would love to have some code example, which are specific to Timbuktu.

In the end all I would like the script to do is open timbuktu and connect to a specified machine with out any user interaction. I’ve looked at Timbuktu’s Apple Script Dictionary and can see the application keywords I need to use to accomplish this but don’t have the understanding of how to properly use them with in AppleScripts Syntax.

I’ve searched the web for hours and haven’t come up with anything so any help would be greatly appreciated.


The following script will initiate a new control session using Timbuktu.

tell application "Timbuktu Pro"
	make new control session connecting to internet address {internet name:"host.domain.dom", connecting as:"username", with password:"secretword"} when rejected let user reenter
end tell

Fortunately, Timbuktu supports AppleScript recording, and that’s one of the easiest ways to learn controlling this application - TB2’s dictionary, while comprehensive, isn’t the most logically constructed.

Thanks Camelot for the tip it worked perfectly!

Do you know if I can tickle a timbuktu client connection via applescript?

I want to be able to tell if the user is online so to speak from my filemaker app via applescript

if the user is online then the option to connect to the user’s machine via timbuktu would be highlighted


The following code will give you a list of all current sessions on the remote machine.

set theMachine to "eppc://host.domain.dom"
tell application "Timbuktu Pro" of machine theMachine
	using terms from application "Timbuktu Pro"
		get address of every incoming connection
	end using terms from
end tell

You’ll need to change the first line to match your target machine, and that machine will have to have ‘Remote Apple Events’ enabled (System Preferences → Sharing → Remote Apple Events.

The results from the script will include the IP address and user name of all remote connections. You’ll need to add your own error checking - for example, the code will fail if Timbuktu Pro application isn’t running

Note that since the code will fail if Timbuktu Pro isn’t running, this isn’t foolproof. The only other way I can think of checking for existing TB2 sessions is to check for network connections on port 407:

tell application "System Events" of machine theMachine
	using terms from application "System Events"
		do shell script "netstat -an|grep 407"
	end using terms from
end tell

This will show the IP address of any established connections but won’t tell you who initiated the connection, or if it’s a file exchange, control or look session.

thanks again

does anyone know if there is a terminal command equivalent to the “Port Scan” function in Network utility - seems all the functions in this app are terminal commands executed though a GU except port scan - I’ve search the web and have found references to the command for other platforms but issuing “portscan” in macosX returns “portscan: Command not found.”

I’m thinking I could use this command to make sure a client has timbuktu incoming access enabled eg: portscan IP XXX.XXX.XXX.XXX:407 is my thinking correct???

this is a great site!

You don’t need to run a port scan to see if a particular port is open or not. Telnet will do this for you:

telnet host.domain.com 407

will either connect (if TB2 is running) or return connection refused.

Of course, you can’t do anything with TB2 via a telnet connection, so you’ll need to break the telnet connection by typing Ctrl-] followed by the letter q and return, but at least you’ll know if it’s running or not.

for port scanning, install nmap http://www.insecure.org/. it will give you more info. than you need, but it’s handy. just grep the output for port 407.

by the way, i tried this last night (connecting via a script) and found the TB2 pro classic app would try to launch, so i had to open the app first. what am i doing wrong?

property x : ""

set appPath to "crackmonkey:Applications:Timbuktu Pro:Timbuktu Pro.app"
tell application "Finder"
	open appPath
	set x to text returned of (display dialog "enter IP address:" default answer x)
	tell application "Timbuktu Pro"
			make new control session connecting to internet address {internet name:"x", connecting as:"xx", with password:"xxx"} when rejected let user reenter
		on error
			display dialog "you're probably not connected to a network."
		end try
	end tell
end tell

This is a very common problem, and can usually be overcome by using:

tell application “Timbuktu Pro.app”


tell application “Macintosh HD:Applications:Timbuktu Pro.app”

rather than the generic “Timbuktu Pro”.

The first form identifies a Mac OS X .app, the second form denotes a specific application (handy if you have multiple versions/copies installed on your system)