Jump to content

rkury14

Registered Users - Approved
  • Posts

    56
  • Joined

Everything posted by rkury14

  1. Dan, Your rule worked!! Much appreciated. :-) Default Re: multiple names rule Try this: Code: var names = [Field("Name1"), Field("Name2"), Field("Name3"), Field("Name4")]; return names.filter(Boolean).join(", ").replace(/^(.*)(, )(.*?)$/, "$1, and $3"); If you don't want the serial comma before the word "and", remove it after the "$1" above.
  2. Tou, sorry, it's not working for me. I am still a beginner. I tried putting my linked fields in the "something" area, but it is not linking to my list.
  3. Thanks Tou, but the separators "," & "and" still show up when I need them to disappear.
  4. Support, I need help with this rule. if (Field("Video_Level") == "" && Field("Data_Level") == "" && Field("Phone_Level") == "") { return ""; } else return Field("Video_Level") + ", " + Field("Data_Level") + " and " + Field("Phone_Level"); I need to add to it so the Comma "," and the "and" disappear when the other items are not there. For example, This is what it looks like with all three: Video Level, Data Level and Phone Level. But if there are only Video and Data levels I need the comma to not show and the "and" placed in between. And if only Video level is there for the comma & " and" to not show and so on. Thanks Rayed
  5. Dan, FYI - I was able to get the desired results using the "Mrs Eaves Small Caps" font. So I think the lesson here is to try and find another font from the same font family that is All Caps or Small Caps. It would be the best scenario.
  6. Thanks Dan, It looks like you been through this question before. I read through the other posts and tried some of the suggested rules, but it just substitutes another font that is not oldstyle. Oh well, I will try to see if there is a font in the same family that is not oldstyle. thanks
  7. Hello, I have a particular font "Mrs Eaves OT" that my customer is using on their letter and the numbers show as upper/lower, for example 1899, the two 9's would hang lower than the 18. Itis undesirable to the customer so they apply all CAPS in InDesign and it places the number even at the baseline. But I can't do that in FusinoPro. I tried applying all caps rule and it changes the type characters but the not the numbers. The customer is not willing to substitute the font I really need help with this asap. Can anyone help? Thanks, Rayed
  8. Ste, Thank you so much. I will get this going and test it out. Much appreciated!
  9. Hello, I am wondering if someone could take a look at this javascript rule and help me figure out to be able to generate a mock ticket of 12 slots with prizes. Here are the prizes 3 Gold Pot (graphic image) 6 $20 1 $25 1 $50 1 $75 Those prizes have to be random and the mailer is a 3 panel brochure where the ticket is one of the panels. So I will have to possibly have two lists in it. You can only scratch-off one slot to win however. Here is the Rule: var twentycount : int = 0;// keeps track of how many times you add $20 to one of the slots var potcount : int = 0; // keeps track of how many times you add a gold pot to one of the slots var twentyfivecount : int = 0; // keeps track of how many times you add $25 to one of the slots var fiftycount : int = 0; // keeps track of how many times you add $50 to one of the slots var seventyfivecount : int = 0; // keeps track of how many times you add $75 to one of the slots // keep adding counts to keep track of how many times you want to add a prize var size : int = 0; // this is the number of slots you need to fill. Once it hits zero, we stop the loop var roll : int; // this is the variable that holds the random value var slots = [] // this will be your list of the 12 slots where you put the prizes // this is a loop that executes 12 times (putting 12 prizes in each of the slots) while(size < 12){ // while size does not equal 12. We will add 1 to size whenever we put a prize in the slot list roll = Math.floor(Math.random()*4) // picks a number between 0 and 4 // Math is the class for which the function random() is located in // multiply random() in order to increase the range. In this case, 0 to 5 // Math.floor means that it truncates the decimal off. So 4.75 becomes 4 // If we roll a 0, then we put $20 into one of the slots if(roll == 0 && twentyCount < 6){ // if random picks 0 and we didn't exceed the amount of $20 we can put // this is where you add your image of $20 for example slots = "$20" // or whatever image you want to put (I don't know how to do the images) twentyCount = twentyCount + 1; size = size + 1;} // If we roll a 1, then we put gold pot into one of the slots if(roll == 1 && potCount < 3){ // if random picks 1 and we didn't exceed the amount of gold pots we can put slots = "Gold Pot" // or whatever image you want to put (I don't know how to do the images) potCount = potCount + 1; size = size + 1;} if(roll == 2 && twentyFiveCount < 1){ // if random picks 2 and we didn't exceed the amount of $25 we can put // this is where you add your image of $25 for example slots = "$25" // or whatever image you want to put (I don't know how to do the images) twentyCount = twentyCount + 1; size = size + 1;} if(roll == 3 && fiftyCountCount < 1){ // if random picks 3 and we didn't exceed the amount of $50 we can put // this is where you add your image of $50 for example slots = "$50" // or whatever image you want to put (I don't know how to do the images) twentyCount = twentyCount + 1; size = size + 1;} if(roll == 4 && seventyFiveCount < 1){ // if random picks 4 and we didn't exceed the amount of $75 we can put // this is where you add your image of $75 for example slots = "$75" // or whatever image you want to put (I don't know how to do the images) twentyCount = twentyCount + 1; size = size + 1;} } for(int i = 0; i < 12; i++){ if(slots == "$20") // add graphics for $20 to whatever position the i-th box is else if(slots == "Pot of Gold.tif") // add graphics for the gold pot to whatever position the i-th box is else if(slots == "$25") // add graphics for $25 to whatever position the i-th box is else if(slots == "$50") // add graphics for $50 to whatever position the i-th box is else if(slots == "$75") // add graphics for $75 to whatever position the i-th box is } // To refresh, Math.random() picks a number between 0 and 1, including decimals. Since you don't want decimals, // makes sure you apply the floor function to random() by doing this Math.floor(Math.random()), that way it // just cuts off the decimal part. // I made sure that the loop doesn't stop until you fill up all 12 slots. The only way we can fill it all up // is if it reaches one of the rolls. Therefore, the size increases by 1 and we roll again. It stops once // size reaches the value of 12. Because you have EXCEL files and lists, I don't know how to integrate that // stuff. // You can apply those if-statement blocks to other prizes. Just make sure there's a cap by adding a counter // variable at the top.
  10. Okay, Here is another question, How do I apply The prizes are: 3 spots are the “Lucky Symbol” 6 spots are $20 1 spot is $25 1 spot is $50 1 spot is $75 To the Number Shuffle Rule below? //The printed numbers on the card correspond to the following arrangement: // 1 to 15 in the B column //16 to 30 in the I column //31 to 45 in the N column //46 to 60 in the G column //61 to 75 in the O column //A variable to enable the free space in the center of the card //is set here. Setting this to false will make the center space //have a number instead of being free. enableFreeSpace = true; //A randomizerSetting variable is set. The higher this number, the more //shuffled the numbers will be in the card. Higher values will lead to //longer composition times, though. Setting of at least 1000 is recommended randomizerSetting = 5000; //Create an array object that will hold all of the numbers finalNumberArray = new Array(); //The array will have all 25 numbers for the Bingo card //Even though the first element in any array is the "0 element", //we will use numbers 1 through 25 to signify our numbers. //Technically, then, there are 26 elements in this array but we //will ignore the "0 element". //Create a shuffler array that will hold the numbers 1 through 15 shufflerArray = new Array(); //This shufflerArray will be randomly sorted for each column. //After it is randomly sorted, we will pick the first 5 elements //in this array and multiply by a factor to get the correct number //range for each column. For example, a "6" for the "B" column or a //"63" for the O column. The multiplier factor will be as follows: //((columnNumber - 1) * 15) + arrayNumber //Let's fill the shufflerArray with the numbers 1 through 15 for (x=0; x<15; x++) { shufflerArray[x] = x+1; } //Variable that will be used to point to the appropriate location //in the finalNumberArray is set. cellCounter = 1; for (columnCounter = 1; columnCounter<=5; columnCounter++) { //shuffle the array for(shufflerCounter = 0; shufflerCounter < randomizerSetting; shufflerCounter++) { position1 = Round((Math.random() * 14),0); position2 = Round((Math.random() * 14),0); tempNumHolder = shufflerArray[position1]; shufflerArray[position1] = shufflerArray[position2]; shufflerArray[position2] = tempNumHolder; } //assign each spot in the finalNumberArray with a number from the array //note that each number will also be multiplied by a factor to //yield an appropriate number for each column for (count = 0; count < 5; count++) { finalNumberArray[cellCounter] = ((columnCounter - 1) * 15) + shufflerArray[count]; cellCounter += 1; } } //Enter the "FREE SPACE" text if the enableFreeSpace flag is set if (enableFreeSpace == false) { finalNumberArray[13] = "<span><z newsize=12><br>FREE<BR>SPACE</span>"; } return 0;
  11. I realized that I would need two lists for this because this job is actually a MAILER trifold 10.5 x 17.75 that also has a panel that is a scratch-off.
  12. Here is an example of a BINGO card generating random numbers, could I use this and modify it for the ticket numbers? //This rule will typeset the bingo card as a FusionPro table //onto the card. //Call the number shuffler rule to shuffle our numbers temp = Rule("Number Shuffler"); //At this point, our numbers for this record are all shuffled. //It's BINGO time! //Here's some global settings on the table. columnWidth = 4050; columnHeight = 45; numberHeight = 23; //We define the basic table layout. Note the first column. We will use //that column to control the height of each row tableMarkup = '<table columns=6 margins="top:0;bottom:0;left:0;right:0" alignment="center">'; tableMarkup += '<column width=1>'; tableMarkup += '<column width=' + columnWidth + '>'; tableMarkup += '<column width=' + columnWidth + '>'; tableMarkup += '<column width=' + columnWidth + '>'; tableMarkup += '<column width=' + columnWidth + '>'; tableMarkup += '<column width=' + columnWidth + '>'; //The following "outer loop" will count through the rows in the table for (rowCounter = 1; rowCounter <=5; rowCounter++) { //We define the table markup for the row here plus that first column. //Note how we use the character at a given pointsize to set //the height of the row tableMarkup += '<row><cell><z newsize=' + columnHeight + '><setwidth newsize=".01"> '; tableMarkup += '<z newsize=' + numberHeight + '><setwidth newsize="' + numberHeight + '">'; //The following "inner loop" will count through the remaining cells on this row. for (columnCounter = 1; columnCounter <= 5; columnCounter++) { tableMarkup += '<cell rulings="left:medium,asu black;right:medium,asu black">'; //We use some math below to figure out which array element to include //for this cell. This is required because we typeset tables 1 row at //a time but our array is configured in a "vertical" manner with the //appropriate numbers in it. arrayPosition = ((columnCounter-1) * 5) + rowCounter; tableMarkup += finalNumberArray[arrayPosition]; } } //Close off this table with the end table tag. tableMarkup += '</table>'; return tableMarkup;
  13. Help! I need some kind of Rule that will help me create a ticket scratch off with 12 random slots with one image included. The prizes are: 3 spots are the “Lucky Symbol” 6 spots are $20 1 spot is $25 1 spot is $50 1 spot is $75 I can't upload an image of the ticket to show, but basically it says to "Reveal 3" of a kind to win. There are 12 four leaf clovers where the prizes are under and they get scratched off. How can I create a rule to generate these prizes including an image randomly in 12 places? Please respond asap. Thanks for your help. Rayed
  14. Great, it works! Now I just have to adjust the size. Thank you!
  15. I'm having trouble with the Rule. Do you think you could write me a better rule that works? My image name is "R_Hayward_sig.tif" Sorry about the trouble. Thanks, Rayed
  16. Hello, I was wondering is there a rule I can use to apply to a letter with a signature image that moves up or down depending on the random letter content? I need it to be in the actual text box as a link because the content is from a list that has random content and I can't predict how it will move. I don't want to have to create another column field in the list for it either. Thanks
  17. Got it! You're the man. Thanks Dan. :-)
  18. I have a silly question, I just recently updated to 9.3 and I also installed CC 2014 cloud. My question is how do I get FusionPro plug-in to show in my CC Indesign? I currently have the FusionPro plugin in my Indesign 5.5. Thanks, Rayed
  19. Dan, I did change the impo stack to 400 but still didn't work. Your Rule however did the trick! Still, I think it should work without having to put a Rule. Thanks a Bunch! Rayed
  20. Hello all, I was wondering if there is bug with the latest FusionPro 9.3.9 I just updated. My imposed pdf is not outputting to multiple files. For example, I have an imposed job 4up on 13x19 with 7,600 records. I type in to output to multiple files every 1600. But it always comes out as one big pdf. It does seem to work using single pages without imposition, but not using my imposition. In my imposition, I have the the Stack count set at 1600 also in the layout. Can anyone help? Thanks, Rayed
  21. Ha! I knew it was something that simple. Thanks for your help!
  22. I know FusionPro has a Text Wrap option, but I just can't find. Can anyone help with applying a box with a Text wrap? Thank you, Rayed
  23. Step, Awesome, It works. Your the Best! Thanks, Rayed
  24. I gave an example of the data in Bullet 1 in my first question. Here it is again. I will include the other bullets as well. The SM is suppose to look superscript, but it doesn't translate in this forum. So going off this RULE, how can I take out the SM from the "HBO On Demand" in the middle of bullet 1? var s = Field("BULLET_1"); FusionPro.Composition.AddVariable s = s.replace(/ON DEMAND/ig, "<span>" + " ON DEMAND" + "<superscript>TM</superscript>"); return s; • Includes HBO®, HBO ON DEMANDSM® and HBO GO® with over 1,700 of your favorite HBO original shows, movies, sports and more. • Ask about how you can record 6 shows at once and store up to 1,000 with the Record 6 DVR. • Upgrade to Sports and Information Pak for all the latest sports and news action on channels like NFL Network, NBA TV, NHL Network, ESPN News, ESPN U, Bloomberg and Fox Business. Watch live or ON DEMAND SM. • Surf, stream and share on the fastest in-home WiFi. Thanks
×
×
  • Create New...