Set Illustrator scratch disk via scripting?

I'm using jsx scripts and ScriptUI with Illustrator CS5, and would like to give my user a way to specify the scratch disk to use.  I can't find any information about accessing this preference item via scripting.  Anybody know if this can be done?

Is there a way to enumerate all the available items it supports?
no, you have to open the AIPref file and have a look to see if there's something in there.
Also, it is usually not recomended, but sometimes it gets the work done, it depends on the rest of your code. You could use "SendKeys" in VBS or similar in AS, it simulates keystrokes. So in Windows I would use
- Alt+E
- N
- P
to bring up the Preference Dialog, then
- R or
- S
to get to the scratch disk options
I have a working sample here
http://forums.adobe.com/thread/942075?tstart=0

Similar Messages

  • More than 1 set of scratch disks ?

    i want to have more than 1 set of scratch disks in FCP.
    is this possible ?
    i want to have one project on one and then one on another,if so how would i save to each one ?
    thanks
    adam

    I do this regularly as I have 2 additional hard drives in my machine. I set scratch disks on each one (for example name FCP doc on HD-1, FCP doc on HD-2). I have the corresponding FCP project on each HD. When they are long weddings, that helps me keep everything organized.
    The downside is when you start up each project you have to go into FCP System Settings EACH time to make sure the scratch disks are set to the HD you want. A pain if you are switching back and forth between projects quite a bit.
    Actually, each project saves in the scratch disks under its own name, so it is kind of 'what's the point' of putting on different scratch disks? I say that, then I do it Old habits die hard.
    Sharon

  • I have 2 hardisk,so i want to set two scratch disk  but i doesnt work

    i have  500g and  another 160g hardisk.
    such as i set up scratch disk in d: drive in 500g hardisk and f: driver in 160g hardisk
    but i have found photoshop just use  d: driver as scratch disk ,and never use f: driver.
    why?

    Okay! So you want to RAID your Scratch Disks! I've not tried that, and I don't know how Photoshop would handle a RAID Scratch Disk; I'm afraid someone smarter than me will have to visit the thread.
    But even it were possible, both disks would have to be the the same size/capacity, speed, and cache; you can't RAID different sized disks like the ones you have, so you'd either have to have 2x 500GB, or 2x 160GB drives to start with, plus a dedicated RAID card to do the processing for you, you wouldn't want your CPU to be handling that load as well as everything else, the drives would also need to be internal as well, not an external RAID enclosure, where the I/O port becomes a bottleneck.
    If you can, change the name of your question, "I have 2 hardisk, so I want to set two scratch disk but it doesn't work," to something like, "Need to RAID Photoshop Scratch Disks!" and hopefully someone who knows a LOT more about Photoshop and RAID than me will be able to give you an answer.
    Also, please give as much information about your system as possible, what Operating System are you running, is it 32 or 64 Bit, Processor type and speed, installed RAM, Motherboard (some support RAID natively) etc.
    Good luck!
    Paul

  • Set New Scratch Disk for rendering...

    I finished a short film on a HD with no space left at the moment. To render the video, I'll need to set a new disk to render to, but everytime I set the scratch disks to my main drive (plenty of space left, I'm desperate) and checked the render video and audio boxes, and unchecked them on my old HD. It's a pretty messy project with files everywhere, truly unorganized. But I need to set the render folder on my main one and it is still referring to my other drive when I try to render anything, which does not have enough space left to render anything. Any solutions?
    So far I've tried restarting FCP and that's it.

    When you go back to your System Preferences settings, you can see your main disk as scratch disk or you see your old setting to the external one?
    Try trashing your FCP preferences and setting everything again.

  • Where do I set the scratch disk in FCP X?

    I'm new to FCP X. How do I set the location of my scratch disk?

    Thanks, Tom! Found both options there (see Screen Shot).
    Weirdly, though, if I now try and select any of the Events now located in my other hard drive, they do show up in the Film Strip area (to the right of the Event Library), but none of these Events show up in the Time Line window (lower section). The only one that continues to show up in the Time Line window are the Events still located in the startup drive.
    Is there a way to get those Events now in the other HD to show up in the Time Line window?

  • How to set layer color property via script?

    I'm looking for a way to set a layer's UI color property via script (see attached). Any help would be greatly appreciated!

    jrapczak2 wrote:
    Uhm.. wow. That's crazy complicated
    It is even more complicated to work with multi-selected layers.
    if( app.documents.length > 0 && versionCheck()  ){
         app.activeDocument.suspendHistory("Set Layer's Color", 'changeLayersColor()');
    function versionCheck()  { return app.version.match(/1[1|2]./) >= 11; };
    function changeLayersColor(){
         function setActiveLayerColor( color ) {
              var desc = new ActionDescriptor();
                   var ref = new ActionReference();
                   ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
              desc.putReference( charIDToTypeID('null'), ref );
                   var colorEnumDesc = new ActionDescriptor();
                   colorEnumDesc.putEnumerated( charIDToTypeID('Clr '), charIDToTypeID('Clr '), color );
              desc.putObject( charIDToTypeID('T   '), charIDToTypeID('Lyr '), colorEnumDesc );
              executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
         function getSelectedLayersIdx(){
                   var selectedLayers = new Array;
                   var ref = new ActionReference();
                   ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
                   var desc = executeActionGet(ref);
                   if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
                        desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
                         var c = desc.count
                         var selectedLayers = new Array();
                         for(var i=0;i<c;i++){
                             try{
                                  activeDocument.backgroundLayer;
                                  selectedLayers.push(  desc.getReference( i ).getIndex() );
                             }catch(e){
                                  selectedLayers.push(  desc.getReference( i ).getIndex()+1 );
                    }else{
                        var ref = new ActionReference();
                        ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "ItmI" ));
                        ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
                        try{
                             activeDocument.backgroundLayer;
                             selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" ))-1);
                        }catch(e){
                             selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" )));
                   return selectedLayers;
         function makeActiveByIndex( idx, visible ){
              if( idx.constructor != Array ) idx = [ idx ];
              for( var i = 0; i < idx.length; i++ ){
                   var desc = new ActionDescriptor();
                   var ref = new ActionReference();
                   ref.putIndex(charIDToTypeID( "Lyr " ), idx[i] );
                   desc.putReference( charIDToTypeID( "null" ), ref );
                   if( i > 0 ) {
                        var idselectionModifier = stringIDToTypeID( "selectionModifier" );
                        var idselectionModifierType = stringIDToTypeID( "selectionModifierType" );
                        var idaddToSelection = stringIDToTypeID( "addToSelection" );
                        desc.putEnumerated( idselectionModifier, idselectionModifierType, idaddToSelection );
                   desc.putBoolean( charIDToTypeID( "MkVs" ), visible );
                   executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
         var colors = ['None','Red','Orange','Yellow','Green','Blue','Violet','Grey'];
         var colorIDs = [charIDToTypeID('None'),
                                  charIDToTypeID( "Rd  " ),
                                  charIDToTypeID( "Orng" ),
                                  charIDToTypeID( "Ylw " ),
                                  charIDToTypeID( "Grn " ),
                                  charIDToTypeID( "Bl  " ),
                                  charIDToTypeID( "Vlt " ),
                                  charIDToTypeID( "Gry " )];
         var dlg = new Window( 'dialog', 'Change Layer Color' );
         dlg.ddColors= dlg.add("dropdownlist", undefined,  colors);
         dlg.ddColors.preferredSize.width = 100;
         dlg.ddColors.items[0].selected = true;
         dlg.ok = dlg.add('button',undefined,'Ok');
         dlg.cancel = dlg.add('button',undefined,'Cancel');
         var results = dlg.show();
         if( results == 1 ){
              var selectedLayers =  getSelectedLayersIdx();
              for( var l=0;l<selectedLayers.length;l++ ){
                   makeActiveByIndex( selectedLayers[l], false );
                   setActiveLayerColor( colorIDs[dlg.ddColors.selection.index] );
              makeActiveByIndex( selectedLayers,false );

  • How can I set Firefox update preferences via script so I can configure our 200 Macs to disable checking for updates?

    Most of our Mac users do not have admin privileges. So when they get alerted about Firefox updates, they don't have the ability to install them. We would like to disable Firefox for checking for updates, then push out updates from our software server as needed. We have about 200 machines to configure. Is there a way to disable checking for updates via script (bash or Applescript)? And if so, is there a guide or web site to explain the process?

    Use a mozilla.cfg file in the Firefox program folder to lock prefs or specify default values.
    Place a file local-settings.js in the defaults\pref folder where you also find the file channel-prefs.js to specify using mozilla.cfg.
    pref("general.config.filename", "mozilla.cfg");
    pref("general.config.obscure_value", 0); // use this to disable the byte-shift
    See:
    * http://kb.mozillazine.org/Locking_preferences
    You can use these functions in mozilla.cfg:
    defaultPref(); // set new default value
    pref(); // set pref, but allow changes in current session
    lockPref(); // lock pref, disallow changes

  • Why do people set their scratch disk to a RAM drive?

    From what I've read, the scratch disk in Photoshop is there so that if you become low on RAM, it will move data from the RAM to the allocated scratch disk...so why bother making that scratch disk the RAM when it'll just be going from the RAM...to the RAM? Am I missing something here?

    Siderz95 wrote:
    From what I've read, the scratch disk in Photoshop is there so that if you become low on RAM, it will move data from the RAM to the allocated scratch disk...so why bother making that scratch disk the RAM when it'll just be going from the RAM...to the RAM? Am I missing something here?
    They're the ones missing something.  It doesn't help to swap RAM to RAM.  Now, it's possible people are talking about pointing their TEMP area to a RAM drive.  There could be merit in that, but...
    You want a real leg up?  Get a good SSD for scratch, or take it even further and run your entire system off an array of SSDs. 
    -Noel

  • How to add scratch disks to adobe illustrator CS5?

    I am trying to set up scratch disk on illustrator but my only options are startup for the primary and macintosh hd for the secondary. I have a time machine set up for wireless backups and even tried connecting to it via USB and I still cannot assign it as a scratch disk.I keep getting the warning "cannot complete because not enough memory(RAM). I installed more RAM and now I am trying to set up scratch disks.  Anyone know whats up?

    Will the Airtight template let you put in a separate caption for EACH photo, or just one caption that goes on every single slide?
    What third party software would let me add captions...I need something fairly easy to use.
    Thanks!

  • Setting pref file so FCP prompts Scratch Disk Reset

    I was told by a fellow poster that "you can lock the pref file (or set permisions) so that FCP can't save the selected Scratch Disk location ... this will force FCP to ask you to set the Scratch Disk location everytime it launches."
    Does anyone know how to do this?
    Please take me through step-by-step.

    if a fellow poster told you then why don't you do a search mate?
    basically, you can either just lock the file just by locking it in the finder (use Get Info) or you can set the privilledges so that the file is read only.
    step by step is here:
    http://discussions.apple.com/thread.jspa?messageID=5167687&#5167687

  • How can i make my external hard drive be the scratch disk with 1 FW input?!

    Hello! I use firewire with my external HD AND my camera...however i only have one firewire input...i set my scratch disk for final cut to work with my external HD but when i am importing footage to my computer with my camcorder, i can not have my external HD plugged in, thus the scratch disk has to be set to something else to continue working. So how can i work around this problem?! Should i just change the settings back after i import the footage and it all goes to place?

    I don't understand the need to daisy chain. I have one Firewire port on my MacBook Pro, and I use a Firewire hub. I've been connecting two 1TB Western Digital My Book Studio Edition hard drives (one for FCE and iMovie projects; one for the media files I create via export), and a Canon NTSC ZR200 miniDV tape camcorder, or a Sony Digital8 tape camcorder, or sometimes a Canopus ADVC 110, without issues. Why not use a Firewire hub? . . . except to save the small expense.

  • Scratch disks and RAM usage

    i would like to understand the relationship between scratch disks and RAM usage in Photoshop.
    While i was working on a fairly big psb file (2gb), photoshop kept prompting that I was out of memory, but in fact the utilization was only 75% (i had 16gbs total, photoshop was only using 7gb, and i allowed PS to use up to 14gb in total). when it says out of memory, it was actually my scratch disk at fault ( i only set 1 scratch disk, which was my 120gb SSD running out of space).
    any idea how I can optimize PS to use up all my RAM first before even touching my scratch disk? (short of using a RAMdisk, please).
    thanks!

    I am curious about this also. I just reinstalled W-7--have 11 G of physical memory--a ton of hard drive empty space also, and I have been wondering why PS_CC is so slow--since basically I have only put my Security and Browser in addition to Adobe back on the Dell XPS computer..... At least now it does show the downloading percentage (like .psd file) , but that must be what is happening.  I do think that some of these "frozen" screens I have been experiencing, was because the program was using scratch disk, instead of the Ram... I came up from CS-5, and can't describe it in detail, but just realize how slow PS-CC is in most everything.  Going back and see if reallocating will help...

  • Need advice on my new Scratch disk

    I just received my new Seagate 750 gig external drive.
    What should I know before hooking it up to my MacBook and use it with FCE?
    Do I need to format it?

    It did take a few seconds. Thanks!
    And I set the scratch disk to the new drive.
    On my macbook pro there is only one FW400 Firewire plug receptacle. On the Seagate there are 2. Can I use one for the camera and the other, obviously to connect it to the mac?
    Thanks again
    Gary

  • Photoshop CS2 scratch disk error

    Those of you who have Photoshop CS2 (9.01) installed and have a 2nd internal SATA drive, can you sucessfully set the scatch disk to the 2nd drive (or just a non-startup internal HDD?). This is NOT a RAID configuration.
    When I set the scratch disk to the 2nd drive and restart PS, it gives an error on launch that PS can't initialize the disk because it doesn't exist. Well golly, it's right on the destkop, passes the Apple hardware test and disk utility tests and works fine for my 30 gigs of iTunes and all that good stuff. It's been formatted with Apple's disk utility and has one standard Mac OS Extended journaled partition.
    My boot drive is partitioned with Bootcamp and has an NTFS partition. Of course I am not selecting that partition with PS but just wondering if that's an additional monkey wrench.

    Somewhere in the foggy last couple months, I know that I have read that before.
    either the ignore ownership flag needs to be off, you also want to disable spotlight for that drive, though that isn't the reason...
    something really simple but not obvious.

  • How do I change the scratch disk?

    How do I edit disk ? - I'm getting the "disk is full" warning.
    How do I edit scratch disk ?

    I like that you used a big, easy to read font, but you didn't use quite enough words...
    Please list the OS and Photoshop version you're using.
    Are any of your disks actually full?
    If you can open Photoshop, you can configure the scratch disk preferences in Edit - Preferences - Performance (in recent versions of Photoshop that is).
    If you can't even open Photoshop, you can set your scratch disk preferences by pressing and holding the Control and Alt keys (or their Mac equivalents) immediately upon cold-starting Photoshop.  You have to be very quick, and if you're quick enough it will prompt you as follows:
    -Noel

Maybe you are looking for