Jump to content

NoahScheitler

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by NoahScheitler

  1. Hello, I was just wondering if it is possible to set bleeds to always output as a certain number. For example having 9pt bleeds be the standard upon outputting rather than 0pt. I thought perhaps you could set a global variable of some sort?
  2. That works! Thanks for the suggestions DSweet and Dan. I appreciate it.
  3. Good morning everyone, I was just wondering if it would be possible to output the total processing time for a job in the .msg log. I tried adding code to OnJobStart and OnJobEnd to get the current time and then subtract those two values but i just keep getting 0:0:0 every time. Would this be possible even? My javascript knowledge is very limited. I am using fusion pro 7.2P1k btw (yes very old i know but its all i have to work with)
  4. For this all you need to do is create a new blank javascript rule. For the programming of the rule enter: return CurrentRecordNumber() + " of 10" Then insert that rule in your text box and you should be good to go.
  5. Dan, After looking at it i think i was just misunderstanding how the syntax works here. It was just saying "Function does not return a value" when i validated it. I see what you are saying now though. I used your much simpler code and it worked just the same. I'm pretty new to javascript so i'm still trying to figure things out. Appreciate the help, Thanks!
  6. Hello, I have a situation where i have the same 3 text boxes on multiple pages. They are labeled as "Barcode", "Non Barcode", and "Indicia". I was just wondering if it is possible to write a switch function with a single variable that suppresses multiple same named pages. For example: if the IMBarcode field is present suppress "Non Barcode". If it is not present suppress "Barcode" and "Indicia" function handleBarcodeAndIndiciaFrames(imb) { var Barcode = FindTextFrame("Barcode"); var NoBarcode = FindTextFrame("NoBarcode"); var Indicia = FindTextFrame("Indicia"); try { var test = imb.toLowerCase(); NoBarcode.suppress = true; } catch (e) { Barcode.suppress = true; Indicia.suppress = true; } } If i have 15 pages with these text boxes is there a way to have 15 "Barcode" frames suppress with that single variable? Or am i forced to name the variables uniquely as in "Barcode1", "Barcode2", etc?
  7. After messing around with this for a while i realized the function that makes MakeDataMatrixBarcode work is located in Builtins.js. So i copied the code for that and replaced the variables with my values and it works now. Here is the code for reference: function DataMatrixBarcode(ProcessTilde, EncodingMode, PreferredFormat, PointSize, NoFontTag, Font) { this.processTilde = true; this.encodingMode = "TEXT"; this.preferredFormat = 2; this.pointSize = 3; this.noFontTag = false; this.font = "IDAutomationDMatrix"; } //__________________________________________________________________ DataMatrixBarcode.prototype.Encode = function(DataToEncode) { return EncodeDataMatrixBarcode(Field("Match"), this.processTilde, this.encodingMode, this.preferredFormat); } DataMatrixBarcode.prototype.Make = function(DataToEncode) { var encoded = this.Encode(Field("Match"), this.processTilde, this.encodingMode, this.preferredFormat); var ReplacedBR = ReplaceSubstring(encoded, "\r\n", "<br>"); var ReplacedSpaces = ReplaceSubstring(ReplacedBR, " ", ""); if (!Int(this.pointSize)) return ReplacedSpaces; var WithPointSize = "<z newsize=\"" + Int(this.pointSize) + "\">" + "<leading newsize=\"" + Int(this.pointSize) * 10 + "\">" + ReplacedSpaces; if (this.noFontTag) return WithPointSize; var WithFontTag = "<f name=\"" + this.font + "\">" + WithPointSize; return WithFontTag; } function datamatrix(DataToEncode, ProcessTilde, EncodingMode, PreferredFormat, PointSize, NoFontTag, Font) { return new DataMatrixBarcode(ProcessTilde, EncodingMode, PreferredFormat, PointSize, NoFontTag, Font).Make(DataToEncode); }
  8. Im trying to make a .js text file to store a function within fusion pro. I want to then be able to simply call these functions out rather than copying files from older versions. I made one for a MatchCode that works currently it takes a 7 char string and returns the 5 rightmost chars. The second one im working on wont seem to work however. It should be returning the info for a datamatrix code, im wondering if its the MakeDataMatrixBarcode function within causing the issue. The first function that works is: function MatchCode(str) { str = Right(Field("Match"), 5); return str; } The function that doesnt work is: function datamatrix(str) { str = MakeDataMatrixBarcode(Field("Match"), true, "TEXT", 2, 3, false, "IDAutomationDMatrix"); return str; }
  9. I have a client that we do an output for with several hundred records. They want all of the output files to be individual PDFs rather than one file with multiple pages. Ive been messing around with the JavaScript to see if i could come up with something. Unfortunately having bad luck, does anyone else have any thoughts or recommendations on this?
×
×
  • Create New...