Get name of startup disk JS

I've got an applescript that get's the name of the startup disk using
set macname to get name of startup disk
I'm wondering if the same can be done in a javascript that runs in InDesign CS3....
I need to make the scripts work across platforms and am new to Java Scripting.
Thanks in advance for any feedback.....

Hi Kasyan!
This is a very old thread, but I came accross it while searching for a solution to put the name of my startup disk in front of a file path in the "ancient" notation where the folder hierarchy is represented with a ":" devider istead of the "/".
For all lurkers here:
When exporting to fixed layout EPUB using the epubFixedLayoutExportPreferences in InDesign CC 2014, you sometimes need this "ancient" notation when working on a Mac. In the epubFixedLayoutExportPreferences you can assign an array of file paths to external CSS and JS files. And these file paths are in the notation:
"NameOfTheDisk:NameOfFolder:NameOfOtherFolder:external.css"
Instead of:
"/NameOfFolder/NameOfOtherFolder/external.css"
If you do the folder devider with "/" and the root is simply written as a "/" at start of the file path, the export will fail to include the external CSS and JS files.
See this thread in the Adobe InDesign EPUB Forum for example:
Script EPUB export not including JS/CSS with epubFixedLayoutExportPreferences
So let me thank you for this AppleScript snippet to get the name of the startup disk!!!
I have added some lines of code to get the name of the InDesign app more accurately equal of its version number.
I've tested this on my MacBook with OSX 10.7.5. Hope, that the AppleScript part will not break on later instances of Mac OSX.
Here your code with my small addition:
//Kasyan Servetsky
//https://forums.adobe.com/message/2336686#2336686
//Some small addition by Uwe Laubender
var myDisk = GetStartUpDisk();
$.writeln("The name of my start up disk is: \"" + myDisk + "\"");
function GetStartUpDisk() {
    //Get the name of the application for Mac users:
    var myAppName = decodeURI(File(app.fullName).name).replace(/\.app$/,"");
    if (File.fs == "Macintosh") {
        var myScript = 'tell application \"Finder\"\r'
        myScript += 'set myStartUpDisk to get name of startup disk\r';
        myScript += 'end tell\r';
        /* CHANGED LINE: I replaced the original line (now commented out) with a more general approach */
        /* myScript += 'tell application \"Adobe InDesign CS' + ((parseInt(app.version.substr(0, 1)) - 2) + "") + '\"\r'; */   
        myScript += 'tell application \"'+myAppName+'\"\r';
        myScript += 'tell script args\r';
        myScript += 'set value name \"myScriptArgument\" value myStartUpDisk\r';
        myScript += 'end tell\r';
        myScript += 'end tell\r';
        app.doScript(myScript, ScriptLanguage.applescriptLanguage);
        var myStartUpDisk = app.scriptArgs.getValue("myScriptArgument");
    else if (File.fs == "Windows")  {
        var myStartUpDisk = String(Folder.system).charAt(1);
    return myStartUpDisk;
Hm, now the question is: How can I get the name of a disk, that is not the startup disk?
Could one of the AppleScripters here in the forum comment on that?
All the best to you, Kasyan!
Uwe

Similar Messages

  • Why do I keep getting the message "startup-disk is full"?

    Why do I keep getting the message "startup-disk is full"?
    I checked my memory and it says...
    FREE- 2.64GB
    WIRED-885.5MB
    ACTIVE-237.0MB
    INACTIVE-262.9MB
    USED-1.35GB
    Sorry I know nothing about computers.

    Ideally an external HD, but at a pinch you may be able to get enough on to USB thumb drives to free up enough space to carry out an orderly backup.
    Just remember that you need to move the files, not just copy them; in other words, once the file is on the thumb drive, the original needs to be deleted and the trash emptied to free up the space on your internal. So for any really important stuff you may wish to copy it to more than one drive for safety.
    also see;
    Freeing space on your Mac OS X startup disk
    http://www.thexlab.com/faqs/freeingspace.html
    How to free up my disk space
    http://www.macmaps.com/diskfull.html

  • I have repaired startup disk in disk utility but still get message saying startup disk needs repair, help.

    I am on a macbook pro running the latest version of yosemite. I was going to use Onyx to clean it, but I got a message stating that my startup disk needs repair. I command R went to disk utility to verify and repair and the disk was fine. However, I still get the same message when using Onyx. What should I do? Should I command R and reinstall? Will the fact that my startup disk needs repair cause a problem?

    Thank you @EricRoot, I think you may be correct. I don't get that message with other programs. However, I did locate files on my computer taking up way too much space...

  • HT1338 i cant get to the startup disk

    i cant go to the startup disk so i can reclean my labtop

    Since nobody seems to know or if this is just like every other question I have ever asked to a Apple community and people just don't want to answer. I will answer it so someone knows. Call me a windows geek or heck, even a linux junkie, but I do like to help.
    To get the disk to show up on XP (I assume that Vista is the same way or even easier) you go into control panel and open the Airport Utility Disk. This option is not located in the start menu and I can't seem to find it in the Manual. Once you have the Airport Utility Disk open, just select both options and type in the passwords you set for it when you were setting the Time Capsule up.
    Would be nice if a few others were helpful as well.

  • How to get early warning startup disk is full?

    By the time OS X displays the startup disk full message, you computer is already useless.  Is there a way to get this warning at 5GB free space?

    Monitor it if you are using that sort of space. In answer to your question, no.
    Barry

  • HT3680 My 3 year old iMac is freezing and I get a message "startup disk almost full for running applications. delete files..." Where do I find the startup disk and what should I delete?

    My 3 year old Mac is having trouble and freezes up from time to time lately. I get a message saying "startup disk almost full, delete files ..." something about having enough room for applications to function.  I know my startup disk is the Macintosh HD, but what kind of files do I need to delete and how much space do I need to free up?  In my "about this mac" area, it says I have 4.89gb free out of 319.21  So I am confused why I need to do this.

    You're less than 2% free and should always have at least 15% (my SWAG). Best is to get an ext FWHD and move stuff from the startup disk to it and delete it from that. Best things to move are movies, music, and photos, using the apps that manage those things.

  • Keep getting startup disk full messages but I have plenty of HD space

    Hi all,
    I've been experiencing a odd problem on my 18 month old 13" MacBook Pro. As of last week, I keep getting the dreaded "Your startup disk is almost full" and "Your startup disk is full" messages, yet I have over 7GB of hard drive space available (in addition to 8GB of installed ram) seemingly at random times. I noticed this message come up immediately after a restart this morning, as well as when I woke from display sleep earlier today, but most of the day the messages pop up (sometimes it's "almost full", sometimes it's "full") every 30-60 mins or so. I then immediately check my available space and it reads a solid 7GBs.
    Any idea what's going on, or how I can fix this? I'd like to fully understand why this is happening so I can prevent it from coming up in the future.
    Thanks!
    Addendum: Ok, did a few restarts and it's confirmed: I get the "Your startup disk is full" message when my login screen appers, every time. Help!

    Mike Amin wrote:
    1. Since when have Mac users needed to adhere to the "10% rule"?
    Since hard disk's where built into computers regardless of Mac or others.
    10% is just a arbitrary value in a configuration file: Warn at x% - for at least three reasons:
    If a disk run full the system is not longer able to extend logfiles, configuration files, the Mac's equivalent for /proc or the swap space.
    This will cause the system to freeze and/or prevent the next boot.
    On shutdown the system could not write out the data buffered in memory to the disk.
    Thereby data may be lost or the filesystem corrupted as a result.
    Imagine your 7GB free and the system tríes on shutdown to write back 9GB RAM buffer ...**Do'h**
    For user safety. Imagine you have only 5GB free and you load a 7.5GB RAW image file into a application. **Do'h**
    Mike Amin wrote:
    4. Lupunus, you mention that "available space" is different than "true space". Can you elaborate?
    The displayed "Available Space" did not include the cached/buffered files, as to display that value the "sync" command get not invoked.
    The kernel keeps data in memory to avoid doing (relatively slow) diskreads and writes.
    sync writes any data buffered in memory out to disk.
    Lupunus

  • Why is my "Startup Disk" filling up so fast?

    I've already asked the question, "How do I create more space, or is there a way to 'clean-up' my Mac"?  The answer I recieved was quite obvious, "get an external drive or delete things."
    I don't think this is really the solution to my problem.
    Every couple weeks is seams, I get a message, "Startup Disk is almost full".  The problem is, I go in and delete GBs worth of info (usually in the form of movies) and I'm not really adding anything to my computer, other than perhaps a few photos here and there and I'm not talking hundreds of photos either.  I also get many emails everyday, however I delete the ones I don't need.
    So my question/problem is: Why is my computer filling up all the time? AND, How can I get rid of unnecessary stuff/info that may be stored on the computer without me knowing it?  Does that make sense?
    Couple things.  It seams as though once I signed up for ITunes Music Match this past summer this problem has gotten increasingly worse.  Is there anything in Music Match that may cause increased memory usage?
    Also, I watch a lot of Hulu+, HBO Go, and use ITunes Radio.  Is it possible that these apps/sites are storing large chunks of info on my computer?
    And...about 3 weeks ago or so, I deleted around 8-10 movies I had on my Macbook freeing up at least 10GB of space and I can't imagine how in the past several weeks I've added 10GB of info back on the computer.  So again, why is my space being taken up so quickly?
    I appreciate you taking the time to read this and provide any ideas you think may help!
    Thanks,
    Ehren

    Here are links regarding the start up disk, maybe something will lead you to the issue:
    Keeping your trashes empty, trash can and iPhoto trash, cleaning cahes, like Safari preferences, empty cache, and in privacy clearing website data. Movies take up a lot of space.
    http://pondini.org/OSX/DiskSpace.html
    http://thexlab.com/faqs/freeingspace.html
    http://pondini.org/OSX/LionStorage.html
    http://www.macworld.com/article/1052495/slimharddrive.html
    http://www.macworld.com/article/1165698/seven_ways_to_free_up_drive_space.html
    Maybe you'll find something here.
    All the Best

  • Startup Disk Full Error - Please help

    Dear ALL,
    I have started to notice recently that when I run Photoshop CS on my Mac OSX Tiger, I am getting the Startup Disk Full error message.
    I have no clue as to how to correctly fix this issue. I looked at my HD and I seem to have 32GB available, which I would have thought would have been ample space. I have started to remove unwanted files and backup to CD large image files. So this should free up some more space. The question is will this be enough to get rid of this issue and is it associated with the amount of HD space on my drive? or would I need to run some script etc? or download/buy some other product to fix this?
    Your help is greatly appreciated.
    Max

    OK I tried Macaroni...and when I tried to work with a TIFF file I get the same Startup Disk is FULL message. The I get an adobe message saying Scratch Disk is FULL.
    Any further suggestions would be appreciated.

  • Error box says startup disk is full?

    Keep getting message that startup disk is full? What does that mean?

    Hi Yvonne! Hi Tracy!
    Which OS you are on? (Go on Apple-Menu top left and "about this mac"). There has been an issue with with 10.7.1
    Please update to 10.7.2
    To watch the space of your HD I recommend GrandPerspektive
    http://grandperspectiv.sourceforge.net/
    There is an other tool, which I don't know, but others recommend: "WhatSize"
    marek

  • I have a IMac 10.7.4 with  startup disk is full problems

    I have a IMac 10.7.4 with 1TB of space I'm getting that my startup disk is full when i only using about 60 gigs any ideas for me

    First step would be to empty the caches on the computer. To do this:
    1. Click on the Finder
    2. Click on 'Go' in menu bar across the top of the screen.
    3. Click on 'Go to Folder'
    4. In the box that appears type '~/Library' (without the ' apostrophes)
    5. A list with a lot of folders should appear. Locate the 'Caches' folder and open it.
    6. Drag everything in this 'Cache' folder to the Trash.
    7. Empty the Trash.
    8. Restart the computer.
    Still getting the same message?
    Keep us posted!

  • Trouble switching Startup Disk

    I have a Wallstreet 233 MHZ with OS 9.2 and OS X 10.1 installed. If I boot into OS X, I can load classic, but no applications will work. They appear in the dock for only a moment, then vanish without explanation. Repeat till fingers get tired of double clicking.
    So, I reboot into OS 9, great, they work! Have fun, play games, want to restart into OS X again. I go to Startup Disk in my Control Panels and I get the following message:
    The Application "Startup Disk" could not be opened because ">>OTUtilityLib<<" could not start up.
    I cannot find >>OTUtilityLib<< and have no clue what it is anyway.
    The only other way I am aware of to get back into OSX is to load the 10.1 install disk, install just the absolute minimum and restart, then select OS X as my startup system folder.
    Anyone know a better way to handle this?

    Ok... I was actually able to get them off my 9.2 disk... Got them both in there showing up correctly but it still won't let me get to the startup disk control panel.
    But on the bright side, while I was doing it, I found a few other extensions that hadn't copied correctly and replaced them. Other stuff works better now, just not the really important thing! LOL
    Wallstreet G3 233 MHZ   Mac OS X (10.1.x)   80 GB HDD, 288 MB RAM

  • Need Startup Disk for OS X

    Where can I get a replacement Startup Disk for OS X? I have an ancient iMac running OS X version 10.6.8. When I try to verify disk using the disk utility i get a message that my disk is corrupt and needs to be repaired by booting from the startup disks. Unfortunately the OS was already installed on my computer and I do not have any startup disks. Can I find them anywhere? I appreciate your time and suggestions.

    You already did the Verify. Now you need to repair.
    Hold down the C key while booting from your install disc.
    Insert your install disk and Restart, holding down the "C" key until grey Apple appears.
    Go to Installer menu and launch Disk Utility.
    (In Mac OS X 10.4 or later, you must select your language first from the installer menu)
    Select your HDD (manufacturer ID) in the left panel.
    Select First Aid in the Main panel.
    (Check S.M.A.R.T Status of HDD at the bottom of right panel. It should say: Verified)
    Click Repair Disk on the bottom right.
    If DU reports disk does not need repairs quit DU and restart.
    If DU reports errors Repair again and again until DU reports disk is repaired.
    When you are finished with DU, from the Menu Bar, select Utilities/Startup Manager.
    Select your startup disk and click Restart

  • "startup disk almost full" message - NOT TRUE!  I have about 900 GB of free space.  What can I do about this?

    I have been getting repeated messages "startup disk almost full".  I am on a very new iMac running Lion with the most up to date OS.  This is a 1 TB iMac.  When I first got the message, I cleaned almost everything but the applications off the disk.  I now have more than 900 GB of space but again I am getting the message.  I found someone reporting the same problem and he said Apple Care reported a but in the mail system.  He found a Fix but it is not working for me.  (He clicked the option key and opened finder, then went to Library/mail/mailbox/recovered messages and deleted the recovered messages.  But I do not have any folder called "recovered messages" so can't pursue that fix.  Any ideas?

    I'm don't know about the new systems, but I remember that I set the % full to warn me. Your % might be set to 20% or something rather than 10% which is a preferable safety margin for many uses. I solved this start up disk problem by installing a 2 Tb internal drive and keeping my data files on external, raided, drives. A real show-stopper is when your 45 Tb external drive warns you that you're too close to OUT for comfort. And, Yes, I do keep it trash free.

  • Tried to open my old MacBook.  Couldn't remember password.  Followed suggestion to reinstall hardware.  Now startup disk is stuck in computer and it won't turn on.  I keep getting a message saying I need to restart the computer.  Any ideas?

    Tried to open my old MacBook.  Couldn't remember password.  Followed suggestion to reinstall hardware.  Now startup disk is stuck in computer and it won't turn on.  I keep getting a message saying I need to restart the computer.  When I hold down power button, I get the same message over and over.  Any ideas?

    Hello m.goo, and a warm welcome to the forums!
    To eject the Disc, hold the Mouse button down, (or what passes for it on a Laptop), while powering up, if you also hold the Option key down at the same time it should eject & give you a chance to insert your install disc & wait for it to shw as a Boot option.
    "Try Disk Utility
    1. Insert the Tiger Mac OS X Install disc , then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, *you must select your language first.)*
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk."
    Then Safe Boot , (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it finishes.
    If it appears to be time for An Archive & Install, which gives you a new OS, but can preserve all your files, APPs, pics, music, settings, etc., as long as you have plenty of free disk space...
    http://docs.info.apple.com/article.html?artnum=107120
    Be sure to use Preserve Users & Settings.
    To check if AppleCare applies, AppleCare Products Overview...
    http://www.apple.com/support/applecare/overview/

Maybe you are looking for

  • Why can't i put a movie on my iPod Classic?

    All of a sudden, I can't put a movie on my iPod Classic!  We've been transferring .mp4 and .mv4 movies to it and then playing them on our home TV setup for years . . . and now I keep getting the message "This movie was not copied to the iPod because

  • Podcast episodes only available for download when subscribed to podcast

    I have a newly created podcast that I created for a client and you can locate the podcast in itunes, however none of the podcast show up.  Once you subscribe to the podcast you can download episodes.  What could be wrong? Podcast Link:  https://itune

  • Upgrade to JRE 1.5.0.06 SDK AppletViewer Not Working & Missing

    HELP!! I recently updated my JRE to 1.5.0.06 and since installation, I cannot execute any JAVA Applets - I cannot even verify the installation. In the /bin directory I notice that the appletviewer.exe is missing. When the applet loads, all i see is t

  • Xml schema in adobe

    Hello gurus, I am new to adobe forms. In the data view of the adobe layout, i am not able to see the fields. i am able to see only interface name. If i click on data info, its saying XML schema. Kindly let me know why i am not able to see the fields

  • "You are not connected to the Internet."

    I've been using my iBook G4 and AirPort Extreme for a while now, and this exact problem has come up only once before. Seemingly, my iBook decides at a random point during the year to simply not connect, even when I'm showing a full wireless signal. I