MMSComp : How to trigger it from external application ie. with Cold...

MMSComp : How to trigger it from external application ie. with Cold... SearchSearch
Author Message
Jason Wong
New member
Username: Jasonwcm

Post Number: 1
Registered: 02-2009
Posted on Wednesday, March 11, 2009 - 09:44 am:   

First off, thank you very much for creating such a wonderful product. Been using nowsms for a while now. Sending and receiving SMS and MMS have been working great.

Now, here comes my question : ^_^

I understand that this is how we trigger MMSComp from the command prompt:

>mmscomp sample.hdr sample.smil

I'm currently using ColdFusion to trigger the sending of SMS and MMS and also to process the incoming SMS and MMS.

With sending of MMS, I'm using the following

<cfexecute name='C:\Program Files\NowSMS\cscript' arguments='"C:\Program Files\NowSMS\sendmms.vbs" 0123456789 "C:\Program Files\NowSMS\sample.mms"' timeout='300' variable='strResponse' />

which basically means

>sendmms.vbs 0123456789 sample.mms

which is working fine.

Now I somehow couldn't trigger mmscomp the same way ie.

>mmscomp sample.hdr sample.smil

into this

<cfexecute name='C:\Program Files\NowSMS\cscript' arguments='"C:\Program Files\NowSMS\mmscomp.exe" "C:\Program Files\NowSMS\ibiza.hdr" "C:\Program Files\NowSMS\ibiza.smil"' timeout='300' variable='strResponse' />

It return this

Input Error: There is no script engine for file extension ".exe".

Any idea?? Hope you can help or at least shed some light ^_^

Cheers
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 569
Registered: 08-2008
Posted on Wednesday, March 11, 2009 - 12:18 pm:   

Hi,

It's not necessary to use MMSCOMP in this scenario.

You can pass all of the separate files in the command line to sendmms.vbs, and NowSMS will take care of packaging it up into an MMS message.

(In this case, you wouldn't pass the .hdr file, but any parameters that you could put into the .hdr file could be passed as variables to the script. And, you need more content than just the SMIL file.)

Regarding the error spawning the EXE, remove the reference to cscript and specify mmscomp where cscript is specified.

--
Des
NowSMS Support
Jason Wong
New member
Username: Jasonwcm

Post Number: 2
Registered: 02-2009
Posted on Wednesday, March 11, 2009 - 12:49 pm:   

Thanks for the quick reply Des.

Would it also be possible to configure NowSMS to store the resulting MMS file in a different drive and/or directory?

Currently we're storing the individual files in a different drive and directory.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 572
Registered: 08-2008
Posted on Wednesday, March 11, 2009 - 03:29 pm:   

Hi Jason,

No if you do it how I suggested, the file will be created in a NowSMS queue directory, queued for delivery. Depending on the outbound route, the message might end up in a different format from MMSCOMP's MM1 format. That's why I'm thinking you might not need that file that MMSCOMP creates...but you may have some other use in mind.

In any event you should be able to fix the script error by removing the cscript reference in the line that runs mmscomp.exe, as you want to run the EXE directly...not through cscript.exe. Use cscript only for running sendmms.vbs.

--
DES
NowSMS Support
Jason Wong
New member
Username: Jasonwcm

Post Number: 3
Registered: 02-2009
Posted on Thursday, March 12, 2009 - 01:06 am:   

What I had in mind earlier is to be able to create the MMS first and store it in a different directory. When the need arises then only I will trigger it to send via NowSMS. Is this possible?

I want to be able to store and view the binary MMS on my phone before sending it out on NowSMS. Let me know if this is possible or otherwise.

Thanks Des.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 575
Registered: 08-2008
Posted on Thursday, March 12, 2009 - 12:48 pm:   

Hi Jason,

That's fine, you can do that if you want.

Use MMSCOMP to build the message, then submit it in another step.

I just wanted to point out that it is not necessary for typical usage.

But if you have a reason to want to do it this way, that is no problem.

--
Des
NowSMS Support
Jason Wong
New member
Username: Jasonwcm

Post Number: 4
Registered: 02-2009
Posted on Thursday, March 12, 2009 - 10:47 pm:   

Sorry Des, how do I mmscomp header and smil files on a different drive? Is it possible? I keep getting error "ERROR: Unable to open referenced file"

mmscomp "d:\dirA\subdir1\sample.hdr" "d:\dirA\subdir2\sample.smil"

I've tried both with the quotes and without but both return the same error. I'm positive the paths are correct.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 587
Registered: 08-2008
Posted on Friday, March 13, 2009 - 12:06 pm:   

Hi Jason,

What is the file name referenced in that example?

Is it one of the files referenced in your command line, or is it something different?

I ask because I believe MMSCOMP parses any "src=" references, and tries to locate those files.

I believe it should be looking in the same directory as the ".hdr" file.

--
Des
NowSMS Support
Jason Wong
New member
Username: Jasonwcm

Post Number: 5
Registered: 02-2009
Posted on Friday, March 13, 2009 - 01:16 pm:   

There's

d:\dirA\subdir3\sample.3gp
d:\dirA\subdir4\sample.txt

Referenced in the smil file is the absolute path of both files above.

Does that means I can't separate the files then?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 596
Registered: 08-2008
Posted on Monday, March 16, 2009 - 10:52 pm:   

Hi Jason,

To be honest, I'd probably have to see it to understand.

MMSCOMP is not a very sophisticated program (and most people do not have a reason to use it), so there could be issues with full path references. In fact, I'd have a concern that I think MMSCOMP includes the SMIL "as is", and full path references could be confusing to the receiving client.

Running some tests now ... and yes, MMSCOMP is sending out the SMIL "as is", so because a receiving client would not understand directory paths for the content, MMSCOMP does not expect or understand them either.

It expects no path, and it expects to find the content files in the same directory as the SMIL file.

--
Des
NowSMS Support
Jason Wong
New member
Username: Jasonwcm

Post Number: 6
Registered: 02-2009
Posted on Tuesday, March 17, 2009 - 07:23 am:   

Thanks Des. You've been very helpful. I'll put it all the files in one folder for time being.

Cheers.