cancel
Showing results for 
Search instead for 
Did you mean: 

Split Parameter at Runtime with VBScript?

SOLVED
MGN
New Contributor

Split Parameter at Runtime with VBScript?

I don't think what I'm about to ask for is possible, but wanted to see if anyone has done this, or has potential ideas.  Current language we are utilizing is VBScript as noted in the subject.  

 

We're currently making a function that will be used to manage email notifications utilizing the built in Test Complete SendMail function.  This is so we can set default values around running SendMail usage, and report to the log if a parameter was not properly set before actually running the built in function.

 

However, this currently limits us to only specifying one attachment since we now have a default call when using this function of BuiltIn.SendMail(ToAddressFromHostFromNameFromAddressSubjectBodyFileName1).

 

What we would like to be able to do in the listed call above is pass an array as FileName1 that can then be split at run time and processed as multiple parameters so that while the call looks like above, it actually processes as BuiltIn.SendMail(ToAddressFromHostFromNameFromAddressSubjectBodyFileName1, FileName2, etc.).

 

The correct answer very well may be "no, this is impossible", but figured it can't hurt to ask.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Split Parameter at Runtime with VBScript?


@MGN wrote:

The correct answer very well may be "no, this is impossible", but figured it can't hurt to ask.


You're right on the answer, but another way is there.

 

Utilizing the CDO method to send mail. refer here: This can dynamically add attachments by using array. https://support.smartbear.com/testcomplete/docs/scripting/sending-email-from-scripts.html#by-using-c...

 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

1 REPLY 1
Community Hero

Re: Split Parameter at Runtime with VBScript?


@MGN wrote:

The correct answer very well may be "no, this is impossible", but figured it can't hurt to ask.


You're right on the answer, but another way is there.

 

Utilizing the CDO method to send mail. refer here: This can dynamically add attachments by using array. https://support.smartbear.com/testcomplete/docs/scripting/sending-email-from-scripts.html#by-using-c...

 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors