Skip navigation
Currently Being Moderated

Introducing: Scale Strokes

May 7, 2012 2:54 AM

Tags: #script #ui #scale_strokes

Hi guys...the title says it all, based on the discussion on this thread

http://forums.adobe.com/message/4382760#4382760

 

scaleStrokes.png

 

get the script from here:

http://pastebin.com/6MKzZg4r

 

questions/comments? let me know

CarlosCanto

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    May 7, 2012 3:38 AM   in reply to CarlosCanto

    Carlos,

     

    The script looks very nice and relevant.

     

    Do you download it (and if so, how), or copy the text and recreate it (also if so, how), and how far back does it work (there seems to be an abyss for other scripts between 10 and CS)?

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

    WOWWWWWWW!!!!

    Works like charm. Thanks God there are people like you here The best post I've seen on these forums!

     

    Saved the script with the name CarlosCanto_ScaleStrokesOnly

     

     

    Great job It is perfect already but If I'm allowed to make one suggestion it would be to make the Preview checked by default. I know it is following the Illustrator convention but you can make it better

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

    Thank you, Carlos.

     

    ... just replace the txt extension with jsx ...

     

    That is the answer, unfortunately: the x is the killer.

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

    Carlos,

     

    Long ago I downloaded the JET scripts (jsx files) and installed them, and Illy was completely paralyzed until I uninstalled them again.

     

    My investigation back then showed that I have to stick with scripts that are js (only) files.

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 9:16 AM   in reply to Jacob Bugge

    Jacob,

    .jsx just associates it with ExtendScript Toolkit. It doesn't really have anything to do with the script itself.

     

    To try a script to see if it will run in AI10, try changing the extension to .js.

     

    It's still quite possible that a script may use functionality of the AI Javascript object model that didn't exist when AI10 shipped, or that has changed since. But the extension on the file does not necessarily mean there's anything in the script that AI 10 can't do. Note that when you download Carlos's script, its extension is .txt. That's all a Javascript is; a text file.

     

    JET

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 2:58 PM   in reply to JETalmage

    James,

     

    try changing the extension to .js.

     

    Please forgive my lack of basic knowledge, but I have no clue how to do that in Windows XP. I have done something like it in the past, but that must be too long ago.

     
    |
    Mark as:
  • Mathias17
    451 posts
    Feb 20, 2012
    Currently Being Moderated
    May 7, 2012 3:08 PM   in reply to Jacob Bugge

    Please forgive my lack of basic knowledge, but I have no clue how to do that in Windows XP

     

     

    Wait, you don't work for our Sales Dept, do you? K, no, I'm just kidding.

     

    Right Click > Rename   -OR-   F2 with the file selected. When you do it, you'll be warned that the file may become "unusable". Just ignore that.

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

     

    Changing .JSX to .JS is just like changing a text file from .TXT to .HTML so that it's file association is changed. That's all the extension does - associate the file with a certain program(s). It has no effect on the file's contents.

     

    For fun, try changing an Illustrtaor .AI file's extension to .PDF, then open it up.

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

    Mathias,

     

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 3:38 PM   in reply to Jacob Bugge

    Jacob, you must be a trusting soul, not to have "Always Show File Extensions" on!

     
    |
    Mark as:
  • 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,043 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:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)