Community Forums Today's Posts     Member List     Archive    
Results 1 to 5 of 5

Thread: Growl OS X

  1. #1
    Join Date
    Apr 2010
    Location
    Butler, TN
    Posts
    1

    Growl OS X

    Anyone have found or made a growl plugin for TeamSpeak3 and OSX

  2. #2
    Join Date
    Nov 2010
    Location
    finland
    Posts
    2
    i made a small lua script that says who started talking via a growl notification.
    Code:
    local function getUsernameByID(serverConnectionHandlerID, userID)
      local clientName, clientNameError = ts3.getClientVariableAsString(serverConnectionHandlerID, userID, ts3defs.ClientProperties.CLIENT_NICKNAME)
    	if clientNameError ~= ts3errors.ERROR_ok then
    		return "Unknown"
    	end
    	return clientName
    end
    
    local function onTalkStatusChangeEvent(serverConnectionHandlerID, status, isReceivedWhisper, clientID)
    	if status==1 then
    		ts3.printMessageToCurrentTab("TestModule: onTalkStatusChangeEvent: " .. serverConnectionHandlerID .. " " .. status .. " " .. isReceivedWhisper .. " " .. clientID)
    		local clients, error = ts3.getClientList(serverConnectionHandlerID)
    		if error == ts3errors.ERROR_not_connected then
    			ts3.printMessageToCurrentTab("Not connected")
    			return
    		elseif error ~= ts3errors.ERROR_ok then
    			ts3.printMessageToCurrentTab("Error getting client list: " .. error)
    			return
    		end
    		local clientName = getUsernameByID(serverConnectionHandlerID, clientID)
    		ts3.printMessageToCurrentTab("name:"..clientName)
    		if error == ts3errors.ERROR_ok then
    			script = 'tell application "GrowlHelperApp"\n'
    			script = script .. ' set the allNotificationsList to {"Test Notification"}\n'
    			script = script .. ' set the enabledNotificationsList to {"Test Notification"}\n'
    			script = script .. ' register as application "TeamSpeak 3 voice name" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "TeamSpeak 3 Client"\n'
    			script = script .. ' notify with name "Test Notification" title "Voice chat" description "'..clientName..' just said something." application name "Growl AppleScript Sample" icon of file "/Applications/TeamSpeak 3 Client.app"\n'
    			script = script .. 'end tell'
    			os.execute("/usr/bin/osascript -e '" .. script .. "'")
    		else
    			ts3.printMessageToCurrentTab("Error getting client name")
    		end
    	end
    end
    Last edited by noobs; 24-11-2010 at 19:31.

  3. #3
    Join Date
    Nov 2010
    Location
    Lisbon
    Posts
    7
    Excelent! That would be cool if works "in-game".

  4. #4
    Join Date
    Nov 2010
    Location
    finland
    Posts
    2
    Quote Originally Posted by orama View Post
    Excelent! That would be cool if works "in-game".
    Well this is just a sam lua script that i hacked up just to test. if you use the sdk and opengl you might get some kind of overlay to work. ond just found out that the cilent id thing dosnt work as i expected, il try to fix it.

    Edit:
    fixed version:
    Code:
    local function getUsernameByID(serverConnectionHandlerID, userID)
      local clientName, clientNameError = ts3.getClientVariableAsString(serverConnectionHandlerID, userID, ts3defs.ClientProperties.CLIENT_NICKNAME)
    	if clientNameError ~= ts3errors.ERROR_ok then
    		return "Unknown"
    	end
    	return clientName
    end
    
    local function onTalkStatusChangeEvent(serverConnectionHandlerID, status, isReceivedWhisper, clientID)
    	if status==1 then
    		ts3.printMessageToCurrentTab("TestModule: onTalkStatusChangeEvent: " .. serverConnectionHandlerID .. " " .. status .. " " .. isReceivedWhisper .. " " .. clientID)
    		local clients, error = ts3.getClientList(serverConnectionHandlerID)
    		if error == ts3errors.ERROR_not_connected then
    			ts3.printMessageToCurrentTab("Not connected")
    			return
    		elseif error ~= ts3errors.ERROR_ok then
    			ts3.printMessageToCurrentTab("Error getting client list: " .. error)
    			return
    		end
    		local clientName = getUsernameByID(serverConnectionHandlerID, clientID)
    		ts3.printMessageToCurrentTab("name:"..clientName)
    		if error == ts3errors.ERROR_ok then
    			script = 'tell application "GrowlHelperApp"\n'
    			script = script .. ' set the allNotificationsList to {"Test Notification"}\n'
    			script = script .. ' set the enabledNotificationsList to {"Test Notification"}\n'
    			script = script .. ' register as application "TeamSpeak 3 voice name" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "TeamSpeak 3 Client"\n'
    			script = script .. ' notify with name "Test Notification" title "Voice chat" description "'..clientName..' just said something." application name "Growl AppleScript Sample" icon of file "/Applications/TeamSpeak 3 Client.app"\n'
    			script = script .. 'end tell'
    			os.execute("/usr/bin/osascript -e '" .. script .. "'")
    		else
    			ts3.printMessageToCurrentTab("Error getting client name")
    		end
    	end
    end
    Last edited by noobs; 24-11-2010 at 19:30.

  5. #5
    Join Date
    Jun 2012
    Location
    Germany
    Posts
    1
    Quote Originally Posted by noobs View Post
    Well this is just a sam lua script that i hacked up just to test. if you use the sdk and opengl you might get some kind of overlay to work. ond just found out that the cilent id thing dosnt work as i expected, il try to fix it.

    Edit:
    fixed version:
    Code:
    local function getUsernameByID(serverConnectionHandlerID, userID)
      local clientName, clientNameError = ts3.getClientVariableAsString(serverConnectionHandlerID, userID, ts3defs.ClientProperties.CLIENT_NICKNAME)
    	if clientNameError ~= ts3errors.ERROR_ok then
    		return "Unknown"
    	end
    	return clientName
    end
    
    local function onTalkStatusChangeEvent(serverConnectionHandlerID, status, isReceivedWhisper, clientID)
    	if status==1 then
    		ts3.printMessageToCurrentTab("TestModule: onTalkStatusChangeEvent: " .. serverConnectionHandlerID .. " " .. status .. " " .. isReceivedWhisper .. " " .. clientID)
    		local clients, error = ts3.getClientList(serverConnectionHandlerID)
    		if error == ts3errors.ERROR_not_connected then
    			ts3.printMessageToCurrentTab("Not connected")
    			return
    		elseif error ~= ts3errors.ERROR_ok then
    			ts3.printMessageToCurrentTab("Error getting client list: " .. error)
    			return
    		end
    		local clientName = getUsernameByID(serverConnectionHandlerID, clientID)
    		ts3.printMessageToCurrentTab("name:"..clientName)
    		if error == ts3errors.ERROR_ok then
    			script = 'tell application "GrowlHelperApp"\n'
    			script = script .. ' set the allNotificationsList to {"Test Notification"}\n'
    			script = script .. ' set the enabledNotificationsList to {"Test Notification"}\n'
    			script = script .. ' register as application "TeamSpeak 3 voice name" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "TeamSpeak 3 Client"\n'
    			script = script .. ' notify with name "Test Notification" title "Voice chat" description "'..clientName..' just said something." application name "Growl AppleScript Sample" icon of file "/Applications/TeamSpeak 3 Client.app"\n'
    			script = script .. 'end tell'
    			os.execute("/usr/bin/osascript -e '" .. script .. "'")
    		else
    			ts3.printMessageToCurrentTab("Error getting client name")
    		end
    	end
    end
    hi
    realy nice thing but i dont knew how to use pls explain in simple englich i'm from germany
    Thank you
    Fleyd

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •