Yes, you can run 300 lines in-line script if the total size of the script does not exceed 32K. It might be easier from a coding prospective to place that script into a separate job which can be triggered from your VBS. If you need to pass some parameters in VBS you can save them in INI files, Registry, database or some place else then read them from JAL job. Now, here is a more elegant solution. Create a new function in the Script Library. The function may have parameters if needed. In your VBS job use JALScript.Execute("MyFunction(Parm1, Parm2)") which is just one line of code. The actual command is just a piece of text which can be "built" dynamically as "MyFunction(" & Parm1 & "," & Parm2 & ")" Hope this will help. : Step 1: I am using VBS to look for the letters 'BOL' : in the subject line of Outlook, then reading the : following six numbers and deleting the inbox message. : These numbers are then written to an Excel file for : process mgmt. : Step 2a: The VBS, in a loop, then goes down the Excel list : looking at the status of a the BOL numbers for : 'Ready'. Once found, it grabs the BOL number and : proceeds to Step 3. : Step 2b: Takes the new status from Step 3 and updates the Excel : spreadsheet then proceeds down the list for the next : 'Ready' Bol number. If found calls Step 3 again, if : not Exits script. : Step 3: Executes a very involved JAL script using the BOL : number and will returns one of the four status : values back to the Excel spreadsheet. Goto Step 2b. : EXCEL SPREADSHEET: (sample) : BOL Status(Ready,AutoPocessed,Manual,Error) : 000123 Auto : 000124 Ready : 000125 Auto : 000126 Manual : 000128 Error : 000127 Ready : 000129 Ready : Can I run the JAL script from within a loop of a VBS? : Note: The JAL script is approx. 300 lines. : Thanks, : Jim
|