Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


sharath
2009-12-30T16:31:29Z
I am trying to set up some InstantMessaging tasks that dynamically sets the recipients and messages, and sends the message using Yahoo protocol. Thus far, I have the following code snippet:


JobClass job = new JobClass();
job.Name = "Instant Messaging Jobs";
var message = job.AddTask(TaskClass.TaskT.InstantMessaging);

//set the message details
message.Name = "Test Instant messaging Task";
message.InstantMessaging.Connection = "????"; //no idea what to set connection to
message.InstantMessaging.MessengerProtocolType = TaskInstantMessagingClass.MessengerProtocolT.Yahoo; //set the protocol
message.InstantMessaging.Message = "Test message";
message.InstantMessaging.RecipientId = "recipientUsername"; 


_server.Jobs.Add(job); //add job to server to be run 


I cannot seem to understand how the InstantMessagingClass.Connection is supposed to be set. It is a string that must contain the details of the messaging server, username, and password. Also, I'm assuming InstantMessaging.RecipientId is supposed to be the recipient username, which in my case would be a Yahoo! Username.

Thanks for the help,
Sharath

PS: The API Docs are incredibly poorly documented with little or no descriptions for each Class/Method. I urge you to move this up on your ToDo list.

Sponsor
Forum information
sharath
2009-12-30T17:02:08Z
I've found the connection string by manually adding an Instant Messaging Task to the VisualCron Client Tray, and looking up the task information on the server in debug mode. I'm still curious as to how the Instant Messaging Connection can be added programmatically, since the one I'm using now was manually added on the Client Tray. I simply cut and pasted the connection string I found in debug mode that I created while toying around with Instant Message tasks on the Client Tray.
Support
2009-12-30T18:00:31Z
Hi Sharath,

yes, it is on our list to document this better.

The Connection property is a String (guid) reference to a Connection object. So, first add a Connection (serverObj.Connections.Add()). You will then retrieve an Id which you use in the Connection property.

I am not sure, but either in username or recipient the full email must be used. For example, in one of the places it should be "visualcron@gmail.com" and another "visualcron" - I am just not sure which one but please try it out.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Users browsing this topic
Scroll to Top