Skip navigation

Introducing: Scale Strokes

May 7, 2012 2:54 AM

Tags: #script #ui #scale_strokes
  Latest reply: Mathias17, Jan 17, 2014 10:01 AM
Replies 1 2 Previous Next
  • Mathias17
    451 posts
    Feb 20, 2012
    Currently Being Moderated
    May 7, 2012 3:45 PM   in reply to Jacob Bugge

    Neither way gives access to the extension: all that happens either way is that I get a file ending in .js.txt, and it still appears as a text file.

     

     

    It's entirely possible to name a file:

     

    Aunt Illy.pdf.txt

     

    In the above case, it's still a text file. ".PDF" is simply in the name (not extension) and is ignored. Only after the last period in the file's total name is the actual extension designated.

     

    You must verify you have 'Show File Extensions' turned on.

     

    Again, per the above case - without it, you don't see ".txt". So a file called: "Aunt Illy.pdf.txt" will look like "Aunt Illy.pdf" to you.

     

     

    Jongware, makes a great point. I recommend always keep file extensions showing. It's worth it.

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 5:21 PM   in reply to CarlosCanto

    Well the script works great and I see no reason why Adobe should not pick this one up and incorporate it into the stroke panel.

     

    Thank you and well done.

     

    Cheers!

     
    |
    Mark as:
  • Mathias17
    451 posts
    Feb 20, 2012
    Currently Being Moderated
    May 7, 2012 5:58 PM   in reply to CarlosCanto

    For the record, you can paste the textual contents of Carlos's [AKA Cronos of Tartarus] script into notepad and just save it as *.js  -OR-  *.jsx. It is just a text file afterall.

    (use the "Raw Paste Data" section at the bottom of the OP's linked page)

     

     

     

    But anyway, what this really adds is the real-time slider, and an easy percentage input, right? You just click in the Weight field and add *1.5 to scale to 150% if wanted. So "2pt*1.5" becomes 3pt.

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 8:16 PM   in reply to Mathias17

    Very nice, Carlos.

     

    By the way, you are exceeding the limit:

    Carlos.png

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 10:07 PM   in reply to tromboniator

    BTW it works in CS 6 and even takes on the CS interface.

     
    |
    Mark as:
  • Pierre Courtejoie
    7,038 posts
    Jan 11, 2006
    Currently Being Moderated
    May 8, 2012 1:41 AM   in reply to Jacob Bugge

    Jacob. On windows, do browse to a folder. On Vista and 7, you might need to click on ALT to show the menus.

    There, click on Tools>Folder Options>View and uncheck "Hide extensions for known file types" I do it as a security measure also, otherwise, I don't know what I'm clicking on.

     
    |
    Mark as:
  • Currently Being Moderated
    May 8, 2012 3:19 AM   in reply to Pierre Courtejoie

    With tooltip....

    Snap_002.jpg

     

     

    Without...

    Snap_003.jpg

     

    CS6 / Mac

     
    |
    Mark as:
  • Currently Being Moderated
    May 8, 2012 3:46 AM   in reply to Mathias17

    Thank you very much, Mathias, and Pierre.

     

    (You may have to first unhide file extensions for known filetypes in your Windows Exporer folder options.)

     

    Indeed. I finally found it in the Control Panel, after overlooking the option in the Tools dropdown.

     

    Unfortunately, Carlos:

     

     

     

     

    And Theunis,

     

    Jacob, you must be a trusting soul,

     

    Indeed.

     
    |
    Mark as:
  • Mathias17
    451 posts
    Feb 20, 2012
    Currently Being Moderated
    May 8, 2012 7:36 AM   in reply to CarlosCanto

    Hi Mathias, not really...well, for a Selection of 1, yes, or for multiple selections that will end with a uniform line weight. But the script works best with multiple selections with multiple line weights, all strokes will scale proportionally.

     

     

    Oh! Ok, yeah great!

     

    I've failed to say thanks for this, so far. So, thanks for makin' it!

     
    |
    Mark as:
  • Currently Being Moderated
    May 8, 2012 6:56 AM   in reply to CarlosCanto

    CS6 Screenshot

     

     

    I see Scott already did post a screenshot he's a traditionlist and made his lighter.

    Screen Shot 2012-05-08 at 9.52.00 AM.png

     
    |
    Mark as:
  • Currently Being Moderated
    May 8, 2012 9:15 AM   in reply to CarlosCanto

    Carlos – Firefox 13 (beta)

     

    edit: It's the same in Safari. Mac 10.6.8

     
    |
    Mark as:
  • Currently Being Moderated
    May 8, 2012 9:24 AM   in reply to CarlosCanto

    This is just to say GREAT job Carlos!

    works fine on Windows 7

     
    |
    Mark as:
  • Currently Being Moderated
    May 8, 2012 2:21 PM   in reply to Jacob Bugge

    Jacob,

     

    talking about using dialogs in conjunction with Javascripts in AI 10 you are clearly lost.

     

    CS 1 was the first version that introduced that capability.

     

    You're lost.

     
    |
    Mark as:
  • Currently Being Moderated
    May 8, 2012 2:30 PM   in reply to Kurt Gold

    You're lost.

     

    I know, Kurt.

     
    |
    Mark as:
  • Currently Being Moderated
    May 9, 2012 11:18 AM   in reply to CarlosCanto

    Carlos,

     

    Thank you for the offer, but I have no specific need for it.

     
    |
    Mark as:
  • Currently Being Moderated
    May 12, 2012 9:11 PM   in reply to CarlosCanto

    Hi Carlos, I have tried to modify your script to use a "palette" UI. It now looks like below:

     

    未命名.jpg

     

    I don't know it's useful or not. Anyway, here is the link: http://pastebin.com/3jZ0PjKk

     
    |
    Mark as:
  • Currently Being Moderated
    May 13, 2012 6:02 AM   in reply to moluapple

    I don't know it's useful or not.

    Moluapple,

     

    Very useful indeed! As I mentioned in the thread that gave rise to this, a palette version would be much more elegant; and it is. With your palette version, the flickering from the redraw is gone, so the slider works like a slider should. You can change the selection without dismissing the window.

     

    Moreover, though, I now (at long last) have an example of a functioning AI javascript palette--something I've been looking for ever since first dinking around with AI javascript dialogs.

     

    (I've run this in CS3, by the way, so it works at least that far back.)

     

    Thanks.

     

    JET

     
    |
    Mark as:
  • Currently Being Moderated
    May 13, 2012 7:00 AM   in reply to JETalmage

    You are welcome JETalmage, it's me the one need to say thanks, I learn a lot from you in this forum.

     
    |
    Mark as:
  • Mathias17
    451 posts
    Feb 20, 2012
    Currently Being Moderated
    May 13, 2012 7:39 AM   in reply to moluapple

    Excellent, moluapple. Thanks for doing that.

     
    |
    Mark as:
  • Currently Being Moderated
    May 13, 2012 6:40 PM   in reply to CarlosCanto

    Carlos,

     

    I think I learned this from the Adobe Illustrator CS3 FlashPanel Sample, and I have using this method for quite a long time.


     
    |
    Mark as:
  • Currently Being Moderated
    May 14, 2012 2:43 AM   in reply to CarlosCanto

    Hi all,

     

    That's interesting, the doc is using a bridgeTalk but you should be able to call the function directly. Or this is either related to Illustrator or CS3- versions. I did use a few ScriptUI/SWF projects with ExternalInterface but never needed to use a bridgeTalk. Anyway I am very fond of theses technologies

     

    Best,

     

    Loic

     

    hht://www.loicaigon.com

    hht://www.loicaigon.com/blog

     
    |
    Mark as:
  • Currently Being Moderated
    May 14, 2012 5:18 AM   in reply to Loic_aigon

    Hi Loic,

     

    With Indesign that's true, but sadly not Illustrator, even with CS6.

     
    |
    Mark as:
  • Currently Being Moderated
    May 14, 2012 5:21 AM   in reply to moluapple

    Hi Mark,

     

    Ok I ignored it thx for the info !

     

    Loic

     
    |
    Mark as:
  • Mathias17
    451 posts
    Feb 20, 2012
    Currently Being Moderated
    May 15, 2012 8:05 AM   in reply to moluapple

    Can I recommend a slight revision to this?

     

    Enable Up and Down arrow keys when caret is in the Scale text field, which would increase or decrease the Scale value by 1. Also, Shift+Up and Shift+Down as well (which would bump the percent by 10% of course).

     
    |
    Mark as:
  • Currently Being Moderated
    May 15, 2012 9:15 AM   in reply to Mathias17

    Yes, if its possible to implement Mathias suggestion, this will be great. Meanwhile the closest alternative is to press and hold with the mouse the left or right buttons of the scroll bar. However I noticed that doing so with the panel will change the value but not give a real time feedback of the change and will update the screen redraw after releasing the mouse while ith the original non-modal window it does update in real time feedback but it flickers.

     

    Nevertheless, great job guys, you rock!   I find this script as a better alternative to a assign a precise stroke weight even when using a single path. The predefined increments available in the Illustrator's Stroke panel are not very practical for me. I often need fine tuning of strokes in the range of 0.25 to 3 points and I end up spending a lot of time typing trial and error values in that range to get precisely the desired weight. Your script makes this much easier and interactively.

     
    |
    Mark as:
  • Currently Being Moderated
    May 15, 2012 10:15 AM   in reply to CarlosCanto

    That will be great Carlos, very much appreciated.

     
    |
    Mark as:
  • Mathias17
    451 posts
    Feb 20, 2012
    Currently Being Moderated
    May 15, 2012 10:17 AM   in reply to CarlosCanto

    Very cool, Carlos. You're softening some of the CS6 dismay with this one.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 17, 2014 7:34 AM   in reply to CarlosCanto

    Carlos,

    I have saved as you indicated, but still don't see it on my illustrator. Where exactly would I find it? I checked on the stroke panel, and also on the object/transform/scale and don't see it.

    Have I done something wrong?

    This is the location where I saved it....

     

    ScriptPic.JPG

    Thanks

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 17, 2014 7:56 AM   in reply to CarlosCanto

    Thank you so much for replying so fast!

    Yes, I restarted illustrator, and since it didn’t work I restarted my computer. But again… where should I see this feature now? On the stroke panel, or the transform, or somewhere else?

     
    |
    Mark as:
  • Mathias17
    451 posts
    Feb 20, 2012
    Currently Being Moderated
    Jan 17, 2014 8:11 AM   in reply to Danitica

    File > Scripts

     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)