ShopMonkey
Technical User
As a warning, I have little to no VBScript knowledge whatsoever.
Here's the snippet of code first, then I'll provide some background with my objective.
---
'Get the input file from PPWatch and open it.
Set fsObject = CreateObject("Scripting.FileSystemObject")
Set inFile = fsObject.OpenTextFile(PW_GetJobFilename,1)
Dim line
Do While inFile.AtEndofStream <> true
line = infile.readline
if instr(line,"JDE=") then
Watch.SetJobInfo 4,mid(line,pos=instr("JDE=",line)+4,4)
end if
Loop
---
My office just picked up some new software that appears to be very friendly for large scale print management. It will allow us to use VBScript and Javascript snippets to enhance function even.
Here's the pickle: An ASCII text data file is being parsed by the program for printing on pre-designed forms (overlay images, DJDE Channel Skip print data from a mainframe)
I need the loop program to read the text of the data file as it's being processed and look for a specific key phrase "JDE=" When that phrase is found, The next four characters following should be written to 'Watch.SetJobInfo 4' EX: JDE=1234 is found. Watch.SetJobInfo 4 should be set to 1234.
There may be any number of instances of JDE= depending on how many different forms are used for a given report, and they may not be the same each time.
What this is supposed to do is read through the print data
and when it finds the phrase JDE=, the next 4 characters determine which form for the software to use. the software switches the output processing to the new form until JDE= is found again, at which time it switches again.
I figured it would have to be a loop of some kind, and a variation of what I posted above is what I originally had. Channel Skip data is processed by lines, so I figured it would have to be a readline type process, and the program is not "page aware."
It worked 1 time. My dummy form has 4 different JDE= assignments in it, and the output showed the switch, but it only did it for the first change. I tried to fix it and somehow broke the code in the process.
The first 3 lines have never changed, so I dont -think- it has anything to do with those.
The debug logs show that the program DOES read the current code, but for some reason nothing is being assigned to 'Watch.SetJobInfo 4' and so no output is generated as a result.
The software I'm working with is called PlanetPress Suite 6 from Objectif Lune. this is my last hurdle to getting the software into production use.
Any Assistance at all will be greatly appreciated.
Ian Adams
Idaho Transportation Department
Print Shop - IT Systems Operator
Here's the snippet of code first, then I'll provide some background with my objective.
---
'Get the input file from PPWatch and open it.
Set fsObject = CreateObject("Scripting.FileSystemObject")
Set inFile = fsObject.OpenTextFile(PW_GetJobFilename,1)
Dim line
Do While inFile.AtEndofStream <> true
line = infile.readline
if instr(line,"JDE=") then
Watch.SetJobInfo 4,mid(line,pos=instr("JDE=",line)+4,4)
end if
Loop
---
My office just picked up some new software that appears to be very friendly for large scale print management. It will allow us to use VBScript and Javascript snippets to enhance function even.
Here's the pickle: An ASCII text data file is being parsed by the program for printing on pre-designed forms (overlay images, DJDE Channel Skip print data from a mainframe)
I need the loop program to read the text of the data file as it's being processed and look for a specific key phrase "JDE=" When that phrase is found, The next four characters following should be written to 'Watch.SetJobInfo 4' EX: JDE=1234 is found. Watch.SetJobInfo 4 should be set to 1234.
There may be any number of instances of JDE= depending on how many different forms are used for a given report, and they may not be the same each time.
What this is supposed to do is read through the print data
and when it finds the phrase JDE=, the next 4 characters determine which form for the software to use. the software switches the output processing to the new form until JDE= is found again, at which time it switches again.
I figured it would have to be a loop of some kind, and a variation of what I posted above is what I originally had. Channel Skip data is processed by lines, so I figured it would have to be a readline type process, and the program is not "page aware."
It worked 1 time. My dummy form has 4 different JDE= assignments in it, and the output showed the switch, but it only did it for the first change. I tried to fix it and somehow broke the code in the process.
The first 3 lines have never changed, so I dont -think- it has anything to do with those.
The debug logs show that the program DOES read the current code, but for some reason nothing is being assigned to 'Watch.SetJobInfo 4' and so no output is generated as a result.
The software I'm working with is called PlanetPress Suite 6 from Objectif Lune. this is my last hurdle to getting the software into production use.
Any Assistance at all will be greatly appreciated.
Ian Adams
Idaho Transportation Department
Print Shop - IT Systems Operator