Forum Replies Created
-
AuthorPosts
-
Michel Allio for FRIdNGE
ParticipantWhy do you think “it’s best”? Have you tried it to write that?
(^/)
Michel Allio for FRIdNGE
ParticipantSorry, no more time to elaborate! … try Google or wait for someone else! ;-)
(^/)
Michel Allio for FRIdNGE
ParticipantHi,
“Span” feature for this!
(^/)
Michel Allio for FRIdNGE
ParticipantHi David,
Really good idea about the 2 rules! ;-)
… but not simply doable with 2 lines if I want strokes on the first line!(^/)
Michel Allio for FRIdNGE
ParticipantAs you used . as separator (!):
So:
Find: ~F\.\K
or (I prefer): (?-s)^~F\.\K
Replace by: ~m(^/)
Michel Allio for FRIdNGE
ParticipantThis night I thought about a cool way to play this game!
I suppose your layout is a puzzle of text frames! for each, there is (are) product(s) and a “%” +/- change.
So, 2 types of scripts:
1/ For defining what kind of % you apply: with the “black-arrow” tool, you select a text frame and play this script:
=> its fill-color (actually “none”) becomes Red30% (or Red50% or Red70% …). That means you’ll apply a -30% (or -50% or -70% …) to all the prices into it.
=> its fill-color (actually “none”) becomes Green5%. That means you’ll apply a +5% to all the prices into it …
a one-code-line script per color (duplications).
So, you can do this very quickly as a cool game: click-click-click…! Nothing to type!2/ When all is done, just launch the “big” script:
It will loop on the text frames: if a fill-color == “Red30%”, it will change the color to “none”, insert “”SAVE 30%. ” text (in red) in the first line, barres the prices and adds new prices with +/– %.That’s all!
When time, I’ write it! Just for fun!
(^/)
Michel Allio for FRIdNGE
ParticipantOK!
If I had to do it simply, I would use a simple Excel file based on the product reference.
My script is based on Grep, So from the product reference and accessory details:
1/ the % would be automatically inserted (line 1)
2/ the new prices too (with the +/- %) (last lines)
3. the old prices automatically barred (anchored stroke) or not (last lines)So, one Excel file, one click in ID (to launch the script that does all in one time).
(^/) ;-)
PS: Just one code line to add to insert a char style feature in my script!
Michel Allio for FRIdNGE
ParticipantJust to finish:
Have you a “database” or excel file with all the product references (apparently in blue in the screenshot, the current price (barred in red) and the % defined (in the first line (==> of course, the final prix (in red in the screenshot)?
(^/)
Michel Allio for FRIdNGE
ParticipantDo you mean that the “%” is written on the first line for each text frame?
Michel Allio for FRIdNGE
ParticipantScott, Something I don’t truly understand: How you do play your changes?
Does the char style applied define the percentage you want to add/substract?
Have you systematically single text boxes as here, placed on the pages?
Have you systematically on the first line [in Red] the added/substracted %?(^/)
Michel Allio for FRIdNGE
ParticipantHi Scott,
Could you show us a “real” page? [mode preview with invisible chars]
(^/)
Michel Allio for FRIdNGE
ParticipantHi Scott, David and Peter,
Maybe something like this [ for free! ]:
Just select something (text or text frame), launch the script and enter the %!
The script will adjust the price on the previous second decimal
Of course, possible Undo!At your own risk!
… Well, sometimes, I can be cool! ;-)
(^/)
Michel Allio for FRIdNGE
ParticipantHi all!
After 2 videos I know you liked a lot, you can now download my ID test file [CC 2015] and the script no 0173_TableShading-Batch or “how to apply a shading to tables when you can’t!”.
(^/)
PS: The bad news is that it’s a jsxbin file (no access to the [JS] code), locked on the test file and limited to 1 month.
But it’s totally playable for fun! ;-)
So…ENJOY! =D
Michel Allio for FRIdNGE
ParticipantAha! However, it’s a beginning! ;-)
I’ve written a more powerful version!
It’s based on the Shading Bottom Offset calculation relatively to the table height!
The user can play with all kinds of selection (one table: cursor into it, selected cells/lines/columns ; single text frame ; active document ; all open docs).
It have an “Undo”!
After running the script once, if a table is modified and have a new (width/height) dimension, the user simply launches the script again: the script loops on all the tables and only plays with the modified one and refreshes the view!
Always especially for my fans! ;-)
(^/)
Michel Allio for FRIdNGE
ParticipantDwayne Harris said:
“… It may be cheaper to buy Obi’s script. …”
What a positive attitude and a good concession at last! =D
(^/)
-
AuthorPosts
