Intranet Journal

Go Back   IT Management Forum > Intranet Journal

Intranet Journal The new discussion forum for Intranet Journal readers. Leave comments and questions for IJ authors. Suggest story ideas and provide feedback.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-29-2005, 03:31 AM
tyxaver tyxaver is offline
Registered User
 
Join Date: Jun 2005
Posts: 3
VBScript: Import of Files

Hi,

i want to make an Import of Source Files like it is in Java or other Languages.
For Example two files with source

programm1.src (Here is sub print)


programm2.src(here is sub add)

And i want that in sub print a call (like 'call add') is possible.

How does this work?
How can i import programm2.src in programm1.src?

Any ideas ? Thanks for help !!!
tyxaver
Reply With Quote
  #2 (permalink)  
Old 06-29-2005, 08:10 AM
JPnyc JPnyc is offline
Administrator
 
Join Date: Jan 2005
Posts: 414
You want to import the actual code instead of just calling the procedure? Can I ask why?
__________________
Datamation Online Community Manager

.
Reply With Quote
  #3 (permalink)  
Old 07-01-2005, 02:16 AM
tyxaver tyxaver is offline
Registered User
 
Join Date: Jun 2005
Posts: 3
You have to

Hi,

for sure i'll explain it to you.

I have about 150 Scripts that all do something different.
But all these scripts use for example the same print routine. So i have to copy the code of the print routine into all files.

If i have to change the print routine i have to edit 150 files.
If it could be in a single file and can be imported by VB Script it would make my day much easier!!

Any idea ?

thank you
Reply With Quote
  #4 (permalink)  
Old 07-01-2005, 09:10 AM
JPnyc JPnyc is offline
Administrator
 
Join Date: Jan 2005
Posts: 414
Can't VBscript call to the print script file like VB would call another module/routine? I'm not sure myself since I've worked more with VB than VBscript. I'll see if I can find out for you.
__________________
Datamation Online Community Manager

.
Reply With Quote
  #5 (permalink)  
Old 07-01-2005, 02:11 PM
JPnyc JPnyc is offline
Administrator
 
Join Date: Jan 2005
Posts: 414
Here ya go, check this out:
Includer.wsf
<job id="Includer">
<script language="VBScript" src="SnazzyInclude.vbs"/>
<script language="VBScript">
Option Explicit
Dim lngStory

Announcement
lngStory = 13245768
MsgBox CStr(Magic(lngStory)), vbOKOnly, cstrHead
</script>
</job>

You can call procedures from the included file.
__________________
Datamation Online Community Manager

.
Reply With Quote
  #6 (permalink)  
Old 07-04-2005, 12:30 AM
tyxaver tyxaver is offline
Registered User
 
Join Date: Jun 2005
Posts: 3
I do not use HTML

Hi there,

thank you for your help but i think i cannot use this.
My Scripts are not in HTML. I use VBScript pure to manage thze functions in a programm called RUMBA.
This means that i cannot use VBScript with HTML like you did. In my case the same Code would just be like this (without all HTML Tags):

Code:
Option Explicit
Dim lngStory

Announcement
lngStory = 13245768
MsgBox CStr(Magic(lngStory)), vbOKOnly, cstrHead
So the Magicroutine is not known here.

Or do i understand everythging in a wrong way?

Thank you !!!
Reply With Quote
  #7 (permalink)  
Old 07-04-2005, 06:59 AM
JPnyc JPnyc is offline
Administrator
 
Join Date: Jan 2005
Posts: 414
Honestly I'm not sure. I never heard of that program.
__________________
Datamation Online Community Manager

.
Reply With Quote
  #8 (permalink)  
Old 11-20-2008, 06:58 PM
someguy someguy is offline
Registered User
 
Join Date: Nov 2008
Posts: 1
Your Answer

Here's your answer

Importing VBS Files In Your VBScript Project
http://gazeek.com/coding/importing-v...cript-project/
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 04:57 PM.





Acceptable Use Policy

WebMediaBrands

internet.comMediabistrojusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Shopping | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0