vbScript include question
-
Hi everyone! I have a question. I have a vbScript (.vbs) file that sends emails using outlook. I now want to have that file as include file in other vbScript files like ASP allows you to do: But I can not find the way to do it. Is it possible to have a include in .vbs script file? Does not make sense to have the same code in 2 files if you can make it an include, does it?:confused: But I can't find a way... if any of you know how please let me know. Thank you in advance! iluha:)
-
Hi everyone! I have a question. I have a vbScript (.vbs) file that sends emails using outlook. I now want to have that file as include file in other vbScript files like ASP allows you to do: But I can not find the way to do it. Is it possible to have a include in .vbs script file? Does not make sense to have the same code in 2 files if you can make it an include, does it?:confused: But I can't find a way... if any of you know how please let me know. Thank you in advance! iluha:)
iluha wrote: This is ASP, not jscript, html, or anything else. It won't work in ASP.NET. Instead, put your script into a control, and use the control, or if it's all script code ( no HTML ), make it a constant string and use RegisterClientScriptBlock to insert it into the page, in your codebehind. Christian Graus - Microsoft MVP - C++
-
Hi everyone! I have a question. I have a vbScript (.vbs) file that sends emails using outlook. I now want to have that file as include file in other vbScript files like ASP allows you to do: But I can not find the way to do it. Is it possible to have a include in .vbs script file? Does not make sense to have the same code in 2 files if you can make it an include, does it?:confused: But I can't find a way... if any of you know how please let me know. Thank you in advance! iluha:)
It is possible to include vbs scripts in other vbs scripts using the 'wsf' extension. rename your main script to ScriptName.wsf And the content of the file should be like this: <script language="vbscript"> ' Put your script here </script> Good luck, Yaron Ozana Freelance web developer yaron@supertech.co.il