How to send Automatic Messages in Spark

Hi ,

In my company i have been given a task to send a message in spark conference room every 15mins. I would like to know if there is way to do this automatically by setting the message which needs to be sent?

Please help.

you’re going to need an XMPP bot

there are many… i don’t think Openfire can do this by itself, nor spark. but a bot should be able too…

Thank you for the reply. Can you please let me know how to install XMPP bot?

Is it an application for Spark ?

If you take time and send me step by step procedure then it ll be very helpful…

no, spark is not an XMPP bot. XMPP is the standard/protocol most instant messaging/chat programs use to talk to each other…

i can’t walk you through setting up a bot. i don’t use one myself. there are many out there, but most are going to require at least a small amount of programming knowledge (or the time to figure them out) in order to make it send the messages you want.

A quick google search found some links:

http://sleekxmpp.com/getting_started/echobot.html

http://sleekxmpp.com/getting_started/muc.html

Sorry, I just want to know if I can use the feature of sending automated messages only using Spark.

or to make this happen i need to program spark with XMPP?

I think you misunderstood.

XMPP is a protocol/standard. Most instant message client and server programs use XMPP so they are all standardized and can communicate with each other.

Spark is an XMPP client. Openfire is an XMPP server.

You need an XMPP Bot.

Spark is not a XMPP bot.Spark will not send messages by itself. It needs a human to send the message.

Ok, this is NOT an elegant solution, but if you have operations people breathing down your neck you can use this as a temporary rig to get something going while you work out a better solution.

As noted, you really want to find an XMPP bot to do this. Google XMPP bot and you’ll find lots of solutions.

However, if you have a client machine (or VM) sitting around doing nothing and you want to mash out something quickly while you figure out the XMPP bot and how it works…and, I assume this is a windows client, you can use Sendkeys and a vb script to do it.

Note, once you set focus to the conference window, focus cannot be lost from that window. I didn’t take the time to have focus set in the code (though, it is something you could modify the script to do if you wished). Rather, it would require that computer sit there…with the conference room in spark with the window in focus (selected).

Instructions to use:

Open a new notepad document and name it what you want.

Change the 3 letter extension to .vbs

Open it with Notepad and paste the following code into it. Be sure to read my notations. All notations start with an apostrophe ’ . I mention commenting and uncommenting lines of code. To uncomment, delete the apostrophe. To comment, add an apostrophe to the front of that line.

Code below —>>>

Set WshShell = WScript.CreateObject(“WScript.Shell”)

dim infiniteloop, Message, LoadPause, AfterMessagePause, PostPause

infiniteloop = 0

'You’ll want to modify LoadPause to give you time after you double click on the vbs file to start the script to click on the appropriate conference window. Once focus is set on this window, it cannot be removed, or the script breaks

LoadPause = 5000

'Put your message below

Message = “Put your Message Here”

'In my limited testing tossing this together for you, 1000 worked well for this, but you may need to up it when you do your tests. If you don’t leave this pause in, then the script will send the message multiple times to the conference window, as the script is moving faster then Spark.

AfterMessagePause = 1000

'This is set to 30 seconds (30000 milliseconds) for testing. For 15 minutes, you’ll want to modify this value to 900000.

PostPause = 30000

Wscript.Sleep LoadPause

'Loop message

'Comment out the line below when done testing to turn on an infinite loop.

Do while infiniteloop<5

'Uncomment the line below when done testing to turn on an infinite loop. If you ever want to stop the loop, you’ll need to open task manager and kill the Windows Scripting Host process.

'Do while infiniteloop=0

WshShell.SendKeys Message

Wscript.Sleep AfterMessagePause

WshShell.SendKeys “{ENTER}”

Wscript.Sleep PostPause

'Comment out the line below when you are done testing. When you do this, the script will run indefinately.

infiniteloop = infiniteloop + 1

Loop