New CS4 features

At Dave's suggestion, I'm starting a thread for discussing new scripting
features is CS4. I'd divide new features into three categories: 1)
improvements/additions to the InDesign DOM, 2) improvements to the ESTK,
and 3) improvements/additions to ScriptUI.
I'll start off this thread with one improvement on each of these fronts.
(There are lots...)
Category 1:
There's a new isValid property for all InDesign objects. This is
something that's been in the SDK for ever, but only made its way into
the scripting DOM of CS4. This means that instead of try/catch every
time you're trying to figure out if an object is valid, you can just write:
if(myObject.isValid){DoMyStuff()}
or,
if(! myObject.isValid){return}
This is a small thing but in my book it's huge!
Category 2:
There's a new function panel in the ESTK which shows all the functions
in the current script and makes navigating to the functions very easy.
Category 3:
There are now keyboard and mouse events, so you can now create widgets
which do everything the built in dialog scripting widgets do (and a
whole lot more!!!)
Harbs
http://www.in-tools.com

Noel, nothing wrong with Roy's posts for me (using the default web interface). It may just be you :-)
Talking about interfaces, please don't comment on this one. It does the job, innit? (I'm sure someone else could do better with ScriptUI. Go ahead.)
var myStyleList = new Array;
for(c = 1; c < app.activeDocument.paragraphStyles.length; c++)
if (app.activeDocument.paragraphStyles.item(c).otfStylisticAlternate == true)
  name = "[+] ";
else
  name = "[-] ";
name += app.activeDocument.paragraphStyles.item(c).name;
myStyleList.push(name);
var myCharsList = new Array;
for(c = 1; c < app.activeDocument.characterStyles.length; c++)
if (app.activeDocument.characterStyles.item(c).otfStylisticAlternate == true)
  name = "[+] ";
else
  name = "[-] ";
name += app.activeDocument.characterStyles.item(c).name;
myCharsList.push (name);
var parDialog = app.dialogs.add({name:"Salt your Styles",canCancel:true});
with(parDialog)
with(dialogColumns.add())
  with(dialogRows.add())
   parCheck = checkboxControls.add({staticLabel:"Paragraph style"});
   parDropdown = dropdowns.add({stringList:myStyleList, selectedIndex:0});
  with(dialogRows.add())
   charCheck = checkboxControls.add({staticLabel:"Character style"});
   charDropdown = dropdowns.add({stringList:myCharsList, selectedIndex:0});
var result = parDialog.show();
if (result)
  if (parCheck.checkedState)
   app.activeDocument.paragraphStyles.item(parDropdown.selectedIndex+1).otfStylisticAlternate =
    !app.activeDocument.paragraphStyles.item(parDropdown.selectedIndex+1).otfStylisticAlternate;
  if (charCheck.checkedState)
   app.activeDocument.characterStyles.item(charDropdown.selectedIndex+1).otfStylisticAlternate =
    !app.activeDocument.characterStyles.item(charDropdown.selectedIndex+1).otfStylisticAlternate;
parDialog.destroy();

Similar Messages

  • I am using Firefox 3.6 on my PC , and now, when I select File New Tab (Ctrl+T), no new Tab shows up. Nor does it show up when I click the new Tab symbol next to my other tabs. How can I get the New Tab feature to work again?

    In the past 48 hrs, all of a sudden, the New Tab feature on my PC< using Firefox 3.56, simply stopped working. I did not change settings, or download a new version of Firefox. it just stopped working. There are other scenarios where it does still work (for example, if I want to open a link on a web page, I can right click and open the link in a new tab), but if I simply want to have multiple websites open at once on my PC, I am forced to have multiple versions of Firefox open, as my New Tab option seems to be disabled or something. Can you help?

    Leliforever, cheek you list of installed add-ons, the Ask toolbar can be installed without the users knowledge.
    For checking other extensions that may cause this, follow the procedure in this link - https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Can I use iWork '09 on Lion without using new Lion features?

    I do not wish to use the new features in Lion, primarily autosave, with iWork, at least initially.  In other words have iWork act as it would in S.L.   However, I need to purchase iWork in order to continue using a bunch of Appleworks spreadsheets.  I am using a new MBP with OS 10.7.1.  My plan is to purchase the hard copy iWork '09 from the Apple Store (the AppStore download versions have already been updated).  This CD should be some version of 9.0 as they have not put 9.1 on the CD.  My idea is to just not let the modules (Numbers, Pages, etc.) get updated until I am ready.  My question is -- will Numbers and Pages work properly on Lion without using the final update to the new Lion Features, and which updates to Numbers and Pages should I avoid?
    Any help is appreciated. 

    Sjazbec wrote:
    Resume can be disabled systemwide in Systemsettings, general section.
    Alas, it's reactivated when we shutdown if we don't take care to uncheck the dedicated box.
    More, if we ask to restart on an other device, we have no checkbox available to disable Resume.
    Happily, it seems that pressing option during the shutdown process disable the beast.
    Yvan KOENIG (VALLAURIS, France) vendredi 16 septembre 2011 18:49:31
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • New Movies feature in Garageband 11- how to export?

    I work at a school and would like to be able to import editable videos from Discovery Education United Streaming into the new Movies feature in Garageband. The thought is to have them remove the audio and then create their own on top of the video.  Some students have pre-made songs that they have done previously that we want to add video to. This seems like it would be much easier for students to do in Garageband than importing into iMovie and splitting the audio and then finding their Garageband recordings to insert.
    The problem I ran into is that I can import the videos, but Garageband will not allow me to export them.  I have tried on multiple machines, and with multiple videos.  I called Apple support and they suggested that it is a codec issue with the .mov file from Discovery Ed.  They could not tell me what codecs are supported by Garageband.
    I was able to get around this problem by importing the downloaded video into iMovie, then exporting it right back out as a .mov file.  When I imported that one into Garageband I was able to export the movie with the new audio file from students without any issues.  If I do this, I might as well just have students use iMovie instead. 
    Does anyone have any suggestions of what I can do in Garageband to make this work as easily as it should.  Thank you.

    Do you have a link to one of the movies?

  • New calling feature in OS X 10.10 needs a keypad

    The new calling feature works great in OS X 10.10, until you come across an automated phone system... No keypad.
    Hopefully that will get updated. I can't imagine Apple didn't think about this.

    Neat, thanks. Should still be a setting elsewhere but solves my problem - thank you

  • I cannot get my iTunes to display new Radio feature...only Internet Radio option still.  I'm on 10.6.8.  Is that an issue?

    My iTunes still only shows Internet Radio (not allowing me to use the new Radio feature). 
    I have the latest version of iTunes and 10.6.8 which is the latest version for my MacBook.
    Any thoughts?  Is there a way to update this?

    yup, thats an issue. apple states that it requires lion os x v10.7 and above.
    http://support.apple.com/kb/HT5848

  • I can't open the new "Purchased" feature in the store.  I've downloaded the latest Safari, but I keep getting the error message that the latest Safari has to be downloaded.  Anyone have any solutions or have ran into this problem?

    I can't open the new "Purchased" feature.  I've downloaded the new Safari, but Itunes doesn't recognize that I have.  Any help?

    You downloaded Safari on your iPhone? And you are getting this error message on your iPhone?

  • Adobe recommends: New CSS features in Dreamweaver CS5

    Over  the next week, we are going to be publicizing some high-value content from adobe.com and other community sites. We have been tracking what's    been most important to our users, and feel that getting this content out to the larger community will go a long way toward helping people tackle some of their most pressing challenges.
    Continuing our trip along the CSS highway, our next recommendation is a video by Dremeaver superstar Brian Wood:
    New CSS features in Dreamweaver CS5
    The video demonstrates some of the most exciting new CSS features in Dreamweaver: new CSS layouts, CSS inspect, and CSS enable/disable.
    Give it a spin and let us know what you think!
    Previous recommendation threads:
    Use Dreamweaver CS 5.5 to package your web application for iOS and Android devices
    Customizing a Spry Menu Bar widget
    Spry Menu Bar resources
    Layout 101
    CSS page layout basics

    Thanks for the answer this is very useful however I still find that Dreamwever defaults back to writing in CSS, I have to go to the manel every time and switch from CSS style to Inline style which is very irritating. Is there any way to disable writing in CSS all together like their used to be in CS3..in the preferences.
    Much appreciated

  • EBay does not recognize new security feature requiring security number in Firefox but works with IE

    eBay has a new security feature when attempting to e-mail a seller; it requires that you enter a numerical code in a box. When on Firefox eBay does not recognize that I've entered the number and keeps telling me to enter the number but when on IE it recognizes the number. What add-on, etc do I need to make Firefox compatible with eBay? Thanks
    == URL of affected sites ==
    http://ebay.com

    The problem seems to be caused by the Java Console add-ons. Disabling mine (6.0.20 and 6.0.21) fixed the problem.

  • Creating New Project Feature

    Creating New Project Feature is not working at all. I clicked on the button, icon, shortcut, but nothing is happening.

    Hi,
    Could you please tell us if you are getting any error messages? Also are you able to open existing projects? Also could you please check your Creator log file and see if there are any messages related to this issue. Also please provide us with the following details:
    Platform you are working on
    Build number (update number)
    Thank you and
    Cheers :-)
    Creator Team

  • Trying to use the new file features in Flash 10

    Hi there, I'm now trying to use the new file features in Flash 10 but I'm getting this error when I try something like
    fileRef.load();
    ReferenceError: Error #1069: Property load not found on flash.net.FileReference and there is no default value.

    It's tough to tell without seeing more of your code, but it might be that you're missing these lines of code at the top of your actions window:
        import flash.net.FileFilter;
        import flash.net.FileReference;

  • New Zones features in Solaris 10 Beta 5

    Solaris 10 Beta 5 (otherwise known as Software Express 7/04) should be
    available shortly via the download link
    http://wwws.sun.com/software/solaris/solaris-express/get.html
    For more information on what's available in the release, please see the
    already posted documentation
    http://docs.sun.com/db/doc/817-0547
    There are some new Zones features in this release that folks might be
    interested in
    * Command line editing and history for zonecfg(1M)
    With support from the the libtecla(3LIB) library, zonecfg(1M) now has
    command line editing and history support which should help in creating
    and/or modifying a zone's configuration.
    * Configuring UFS, UDFS, HSFS and PCFS file systems through zonecfg(1M)
    Starting with this release, users can specify ufs, udfs(7FS), hsfs(7FS)
    and pcfs(7D) file systems as part of the zone's configuration. For
    example, if /dev/dsk/c0t0d0s7 is a block device that you want to
    dedicate to a zone under the name /mydata, it can be added as follows:
    # zonecfg -z myzone
    zonecfg:myzone> add fs
    zonecfg:myzone:fs> set dir=/mydata
    zonecfg:myzone:fs> set special=/dev/dsk/c0t0d0s7
    zonecfg:myzone:fs> set raw=/dev/rdsk/c0t0d0s7
    zonecfg:myzone:fs> set type=ufs
    zonecfg:myzone:fs> end
    zonecfg:myzone> commit
    zonecfg:myzone> ^D
    This file system will automatically get mounted under the name /mydata
    inside the zone when it is booted or made "ready".
    * NFSv4 client support for Zones
    Zones can now be NFSv4 clients although in this release the default is
    to begin negotiating as NFSv3 clients. To configure a zone to
    negotiate NFSv4, the NFS_CLIENT_VERSMAX parameter in /etc/default/nfs
    should be uncommented and set to "4".
    * The new -z and -Z options to ps(1)
    The new -z option can be used to select only processes in the given
    list of zones. For example, the command "ps -z twilight,16,myzone"
    will print those processes from the zones with the names "twilight",
    "myzone" and the zoneid 16.
    The -Z option automatically adds a ZONE field to the existing reports
    as the first column.
    The Zones team would appreciate hearing feedback from our customers on
    these new features and any other Zones issues or questions that you
    might have.

    In the README file for the 07/04 release it says that there's a problem with some 64bit runtime libraries missing from the SUNWlibC package. I'm a bit unsure about where to download this package from. Do you have the link to the page it is refering too???

  • X Series is here – New Counter Features!

    Hey All,
    The new X Series Multifunction DAQ devices have been announced – check them out here.
    I’m posting here because I think X Series has several new counter features that many on this forum have been looking for. The user manual
    will have all of these details and more with timing diagrams but I
    thought I’d summarize a few of the sexier features and open it up for
    comments/feedback.
    First off – what stayed the same between
    M Series/TIO counters and X series counters? The pinouts between M and
    X series are the same so the PFI lines and default counter pinouts are
    the same. The DAQmx programming is the same (you’ll need DAQmx 9.0, it
    should be up this afternoon) and all the functionality that was
    supported by M Series is supported by X Series, though a few behaviors
    may have changed. Counters are still 32 bit.
    Now on to
    the fun stuff – the big one that I tend to overlook: X Series has 4
    counters per board! They all have the same features and Freq Out is
    still there too (with an additional 20MHz timebase).
    Timebases:
    X Series devices have 100MHz, 20MHz and 100kHz timebases. Note the
    difference between 80MHz on M series and 100MHz on X series. DAQmx will
    take care of the difference for you, unless you were programming in
    terms of ticks and hardcoded in numbers based off of a 80MHz clock. 
    Counter
    FIFOs: X Series has a 127 sample FIFO per counter. When combined with
    PCIe/PXIe, our benchmarked buffered counter rates went from ~350k on M series
    (with a 2 sample FIFO) with a single counter to 10MHz on all four
    counters (160MB/s streaming rate). The FIFO also allows us to implement…
    Buffered Counter Output: Probably my favorite new feature. You can
    now use a multi point write on counters and write out a buffer of pulse
    values. There are two timing modes for this: implicit and sample
    clocked. With implicit timing, every idle/active pair you write is
    generated as a pulse. You can vary the idle/active time for every pulse
    in your pulse train. Check out the "Gen Dig Pulse
    Train-Buff-Implicit-Cont.vi" shipping example. With sample clock
    timing, the idle/active time are updated every time a sample clock is
    received. Check out the "Gen Dig Pulse Train-Buff-Ext Clk-Cont.vi"
    shipping example. These modes give you much more control over your
    waveform – now everything about it can be hardware timed. Also, I’ve
    benchmarked the output rates at 10MHz on all four counters at the same
    time.
    Finite pulse train with one counter: Each X Series
    counter has an Embedded counter paired with it. The embedded counter
    isn’t directly programmable, but it does allow you to do counter
    operations on one counter that used to take two.  A finite pulse train
    used to take two counters – one to generate the pulse train and one to
    gate it. Now a counter generates the pulse train, and its embedded
    counter counts the TCs and disables the counter when it reaches the
    number of pulses to generate.
    More sample clocked
    measurement modes: Edge counting and encoder measurements always
    supported sample clocks, all other counter measurements were implicitly
    (timed by the measurement waveform) timed. With the addition of the
    sample clock terminal to the counters now all counter measurements
    (except for semi-period) support sample clock timing. You can now get
    the pulse width of the pulse just before the sample clock rather than
    getting all the pulse widths and figuring out where they happened in
    time. Why not semi period? We added a new “pulse” measurement instead
    that returns a sample that contains the high and low time (or high and
    low ticks, or frequency and duty cycle) so for each sample clock edge
    you get a full pulse spec. Semi period still supports the same
    measurements it used to, just not sample clocked. Speaking of sample
    clocked…
    Sample clocked frequency/period measurement
    with averaging: X Series still supports the three frequency modes: Low
    frequency 1 counter, 2 counter High Frequency and 2 counter Large
    Range. In addition it supports sample clocked averaging. This is
    essentially a method that is high accuracy method based on the sample
    clock rate. With the same measurement time it has the same accuracy as
    the Large range mode but it doesn’t take two counters.  Note, counters
    do not have their own internal sample clock so you have to provide them
    with an external signal.
    Hope this helps,
    Andrew S
    National Instruments
    Multifunction DAQ Product Support Engineer
    Getting Started with NI-DAQmx
    Measurement Fundamentals

    Hi guys,
    I drew up a schematic of one of the applications I need to get running in our lab. To recap:
    1)      We have several piezo controllers for nanopositioning of samples under a microscope, some of them driven by a digital circuit that handles coordinate programming and trigger line programming (for syncing detectors to the piezo motion), other controllers are analog and need to be driven by voltages.
    2)      We would like to emulate the behavior of the digital controller using the analog HW (we have much more analog controllers than digital ones).
    3)      The basic implementation is like this (see also slide one in the attached pdf file) and runs perfectly:
    a.       A global pulsetrain ticks with a certain frequency
    b.      At each tick a voltage is written on an AO line and this tick is also sent to an RTSI line to sync multiple detectors
    4)      To fully emulate the digital controller we also need to implement 4 trigger lines that exist on the digital controller. These trigger lines allow for fully programmable pulsetrain output that is in sync with the movement of the piezo. Slide two in the attached pdf illustrates what is needed. These trigger lines allow for much more intricate syncing of our detectors (only measure during certain parts of the motion instead of all the time).
    After a lot of thinking and experimenting with the existing M series boards back here I came to the conclusion that the desired behavior is not possible with an M series board since they only allow for the output of “simple” pulsetrains with a given frequency.
    Looking at this webpage (http://zone.ni.com/devzone/cda/tut/p/id/9384#toc3) however, I think that the X series board would offer exactly what we need since it allows for buffered counter output that enables definition of very complex pulstrain “shapes”.
    Looking at the schemes I provided, could someone confirm that the X-series covers our needs? If this is the case, we would be interested in purchasing these kinds of boards.
    Cheers,
    Kris Janssen
    Attachments:
    Raman Imaging Timing Implementation.pdf ‏76 KB

  • NSS326 Problems Using New SFTP Features

    Is anyone else having issues using the new SFTP feature that was released in the 1.2 firmware?  We are running firmware 1.3.  When we try to connect to the NSS326 via SFTP, the only user that can login is "admin" and they get placed directly into the root of the device.  We want to use the SFTP feature to backup Communications Manager (which requires SFTP) but being dumped into the "root" does not appear to give us access to the vast disk space on the unit, so the backup fails.  Is there a way to configure the SFTP options, because the administration GUI only specifies FTPS (Explicit)?  Thanks.

    On my NSS326, I have a single RAID-6 volume and it's mounted under /share/MD0_DATA.  Each shared folder is containted in that directory (i.e. Web), but is also symlinked to /share, so my Web content is available under /share/Web.   If you create a new "backups" shared folder, for example, it should be available under /share/backups.  You could try specifying that destination directory for your SFTP backups.

  • New search feature in iOS 4.2 not working

    The new search feature is not working because my search box says "Google" and defaults to a Google search. How do I get the "search" box to replace the "Google" box?

    type in a search in Safari. Scroll to bottom of found list,
    you should have a grey bar titled "on this page"

Maybe you are looking for