[Mac 4.0.2] Show/Hide Hidden Characters

Hello,
Is it possible for my plugin to get notified when the end-user is switching Show/Hide Hidden Characters from InDesign's Type menu? And if the answer was YES then how could we do that would be the next question . . .
Any pointer or direction to have this event watcher implemented smoothly would be very much appreciated indeed.
Best regards
Patrick Perroud

Hi John,
I modified my script and now I am getting error when I run it first time and when I run it again then it run fine.
set the date_stamp to ((the current date) as string)
tell application "Finder" to quit
set OnOff to do shell script "defaults read com.apple.finder AppleShowAllFiles" 
if OnOff = "NO" or OnOff = "OFF" then
  set OnOff to "ON"
  tell application "Finder"
  display dialog "Show all hidden files in this Mac ?" & return & return & date_stamp buttons {"Show Hidden Files", "Cancel"} default button 2 with title "/MSN/" with icon 1
  end tell
else
  set OnOff to "OFF"
  tell application "Finder"
  display dialog "Hide all hidden files in this Mac ?" & return & return & date_stamp buttons {"Hide Hidden Files", "Cancel"} default button 2 with title "/MSN/" with icon 1
  end tell
end if
do shell script "defaults write com.apple.finder AppleShowAllFiles " & OnOff
delay 1 
tell application "Finder" to launch

Similar Messages

  • How to show/hide invisible characters in Mac Keynote 6?

    How can I show/hide the invisible characters in Mac Keynote 6?

    we call them non printing characters
    this cant be displayed in Keynote, Keynote is a video based presentation application and does not have many typographic tools.
    The sister application to Keynote is Pages which can show non printing characters so you should use that;
    View > show > invisibles

  • Show/Hide Hidden Files

    When I am on my home network and logged into my other machines (one oc and one other mac) I get to see all the hidden files and it becomes quite confusing. I know its a simple toggle in Windows to show or hide hidden files. Is there a way to do this easily in Mac

    Hello:
    It's very easy.
    1. Open Automator.app
    2. It will open with a drop down menu.
    In the drop down menu select >custom > choose
    3. In the variables list choose "Run Shell Script", double click it,
    a command box will open.
    4. type in (the first line) defaults write com.apple.finder AppleShowAllFiles FALSE
    5. press return
    6. type in (the 2nd line) killall Finder
    should see this in the box:
    defaults write com.apple.finder AppleShowAllFiles FALSE
    killall Finder
    7. At the top left of your screen select > file > save as plugin
    8. A box will open > Save Plug-in as:
    9. Give it a name like "Show Hidden Files" (without the quotes).
    10. Make sure "Plug-in for: finder" (second line) is selected also. Click Save.
    You are almost done.
    Repeat the process substituting:
    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder
    In step 6 and
    "Hide Hidden Files"
    in step 9.
    Now both commands are placed on the finder context menu.
    You can Access them using Control + Click or setting up a secondary mouse button.
    Kj

  • Show invisibles/hidden characters?

    GL CS1 - is it possible to see the invisibles/hidden characters on the Golive page?

    Maybe you're in the wrong screen mode. Try View -> Screen Mode; invisibles like gridlines and hidden characters will appear in Normal, but IIRC not in Preview.

  • "show hidden characters" is not working

    InDesign CC. Neither the show/hide grid nor the show/hide hidden characters works.

    Maybe you're in the wrong screen mode. Try View -> Screen Mode; invisibles like gridlines and hidden characters will appear in Normal, but IIRC not in Preview.

  • Force show (not toggle) hidden characters and threads in script

    I have been working on a script to show all the extras (for the most part). I can turn on rulers and frame edges from the DOM, but can not Show Hidden Characters or Show Text Threads from the DOM. I've been working on using menuActions, but there two is a hitch. It seems that the menuActions are only available if the menu has been accessed during the current session? Not 100% on that. There is a good comment (#10) that touches on this a bit at Indiscripts :: How to Create your Own InDesign Menus.
    This method works, but again only if the menu has been previously accessed... so it's not reliable:
    // locale-independent (should work on non-english versions of InDesign)
    // Show Hidden Characters
    // FIX/TODO - Only seems to work if the Show/Hide Characters has been toggled within this session?!
    var showHiddenChars = app.menuActions.item("$ID/HideHiddenCharactersCmdStr"); //The 'hide' ID String only valid when characters are hidden
    var areCharsHidden = (showHiddenChars.isValid);
    if (areCharsHidden == true) {
        try {showHiddenChars.invoke()} catch (givenError){alert(givenError.toString())};
    else {
            //alert("Hidden characters are already shown!")
    I also have a less desirable version of Showing Hidden Characters, which relies on English name property of the Menu Action. It suffers from the same issue.
    //~     var acID = acID||
    //~             ((t=app.menuActions.item("$ID/ShowHiddenCharactersCmdStr")).isValid&&t.id)||
    //~             ((t=app.menuActions.item("$ID/HideHiddenCharactersCmdStr")).isValid&&t.id);
    //~     var showHiddenChars = app.menuActions.itemByID(acID);
    //~
    //~     //if the name property for the menuAction is currently "Hide Hidden Characters", the characters are hidden.
    //~     var areCharsHidden = (showHiddenChars.name == "Hide Hidden Characters");
    //~     if (areCharsHidden == true) {
    //~         try {showHiddenChars.invoke()} catch (givenError){};
    //~         }
    //~     else {
    //~         //alert("Hidden characters are already shown!")
    //~         }
    Any suggestion on how to force show characters (show threads works the same way) with out having to have had accessed a menu before hand?
    Thanks,
    Kevin

    When you have found a menu action you can remember its ID and use menuActions.itemByID() later on to retrieve it. Most action IDs are hard wired, bound to their implementing plugin. Of course there is an exception for dynamically allocated actions, e.g. script actions.
    My first attempt following you is to retrieve the action name - that should trigger the internal method to update the whole action state including checked, enabled (not applicable in this case). Of course it failed, would someone please file a bug? The translated versions of strings that you'd use for the comparison are available via app.translateKeyString().
    Btw you are using the wrong string - cmd strings are used for command history as seen in the undo menu. Menu strings usually have an ampersand character to indicate the underline / Alt+Key combo in Windows.
    $.writeln(app.menuActions.itemByID(0x1d301).name==app.translateKeyString("$ID/Show Hidden Characters"));
    $.writeln(app.menuActions.itemByID(0x1d301).name==app.translateKeyString("$ID/Hide Hidden Characters"));
    app.translateKeyString("$ID/Show Hidden Characters")
    Ergebnis: Verborgene Zeic&hen einblenden
    app.translateKeyString("$ID/Hide Hidden Characters")
    Ergebnis: &Verborgene Zeichen ausblenden
    // failed test
    $.writeln(app.menuActions.itemByID(0x1d301).name);
    app.menuActions.itemByID(0x1d301).invoke();
    $.writeln(app.menuActions.itemByID(0x1d301).name);
    // output should change after invoke
    Verborgene Zeichen ausblenden
    Verborgene Zeichen ausblenden
    As you found command strings, I also had a look at the undo history - it remained empty.
    $.writeln(app.activeDocument.undoHistory.length);
    Probably the setting is not persisted in the document any more, someone should have removed the command strings.
    Then I realized that the output of the previous lines around the invoke had changed as it was expected originally. And I had not touched the menu since restart … but I had activated the application.
    One can do that with scripting too - app.activate();
    A couple of restarts later this is definitely leading somewhere.
    Regarding the command, I also had a second look with a debug build of InDesign: the command is still executed, but there is a flag that binds its undo to the previous command - left as an exercise to verify.
    Hmm. It is stored in the persistent document preferences in a structure internally called kDocWorkspaceBoss / ITextOptions, thus should also be exposed for scripting. Back to scripting: set a breakpoint, browse thru tons of document sub-objects, and here we are:
    app.activeDocument.textPreferences.showInvisibles
    Happy programming,
    Dirk
    Edit: when comparing the strings, you also have to strip the extra ampersand.

  • Show or hide nonprinting characters

    This question was posted in response to the following article: http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-63e5a .html

    Looks like you might have a single large (?) carriage return in the text box.
    Open the Character panel to see the size of your type.
    To remove paragraph marks select Type > Hide hidden Characters.

  • My iTunes 11 Mac Install is Missing "View- Show/Hide Status Bar" Options

    All:
    Okay...this is weird.  I did an upgrade from iTunes 10 to 11 on my Snow Leopard MacBook Air.   Under the "View" menu, it has the "Show Sidebar" option.  However, it does NOT have the "Show Status Bar" or "Hide Status Bar" options at all (screen shot below).  What gives???
    - Billish

    Our two Macs also lack the "Show/Hide Status Bar" View menu item. This is a giant fail on Apple's part— I am being inundated with support calls about this. I have found a link to iTunes 10.7 and am advising all upset clients to dump iTunes 11 and download and re-install iTunes 10.7 until the issues are fixed.
    Among other issues: iTunes 11 no longer automatically imports mp3 optical disks into its library as it did in iTunes 10.7.
    Now, when we want to import mp3s from an optical disk, we have to do it manually:
    1) insert optical disk
    2) select File>Add to Library (or Command-O)
    3) click on the optical disk in in the Devices sidebar of the dialog box that opens
    4) select the tracks to install
    5) click "Okay" or hit the Return key
    5 steps to accomplish what once happened upon just inserting the disk!
    If my clients are any indication, this is a pretty big deal. Apple would be well-advised to fix this fast.
    Our Macs:
    2006 Core Duo Mini, 1.66 gHz, 2Gb RAM, 256 Gb Sandisk SSD, OS X 10.6.8
    2008 MBP OS X 10.6.8
    2002 iBook OS X 10.5.x

  • Hidden Characters Displaying Wrong

    So ever since I started using CS4 my InDesign will sometimes show my hidden characters improperly. There doesn't seem to be any consistency in when it happen. The only common thing I can think of is that it sometime happens after I open an Illustrator file, but not always. I have re-installed InDesign and I just reset my preference last week, but It still is happening. Anyone have any Ideas on what is going on and how to fix it?

    This is another example

  • Show hidden characters shortcut causes crash

    I'm running CS4 on Mac OS 10.5.8 (Indesign 6.0.4 which I believe is the latest).
    Lately, InDesign has started crashing when I use command+opt+I (the shortcut for show hidden characters), which I do A LOT for text design purposes. It doesn't crash every single time I use the key combo, but it's gotten to about 50% of the time, so that I'm afraid to use it. I'm very shortcut oriented rather than menu oriented, so please don't suggest I just stop using the shortcut (that's what my IT guy would suggest). It took me forever to even remember what the command was called that I was doing -- I ended up finding it by accident.
    Has anyone else run into this? Does anyone have any advice/suggestions?
    Thanks!

    I would start by Quitting Indesing, removing (putting on Desktop in case you have custom settings saved there) the Indesign Prefs;
    /Users/YOUR HOME FOLDER/Library/Preferences (Indesign Folder & .plist) and also removing the Indesign Cache folder;
    /Users/YOUR HOME FOLDER/Library/Caches.

  • Type Show Hidden Characters doesn't display hidden chars, what to do?

    When I select Type > Show Hidden characters, the display does not change and the hidden characters stay hidden. Is there something additional that I need to do to see the hidden characters?

    Under View, change your Screen Mode to Normal. In any other mode, guides and hidden characters won't show.

  • Show / Hide Elements - how to make hidden elements non-interactive

    Hi,
    Is there a way to make hidden obejcts (through 'Show / Hide') not only hidden but completely non-interactive? I.e. even if an image is hidden, it is still click-able, which will release its set commandos (such as 'Swap Image' or 'Set Text of Container').

    Thanks a bunch! I haven't started out with the code yet. Just made some sketches to see what I need to research etc.
    When I get around to it, I'll get back to you!
    /Orvar

  • PC to Mac hidden characters

    Having problems displaying hidden characters and guides when opening a document created on a PC (CS3) on a Mac. Any tricks, suggestions?

    It has nothing to do with Windows/Mac. The document is likely in a
    preview mode.
    Bob

  • Show/hide layer bug PS 12.01.x64?

    I know that you OPT-Cllick on the eyeball to show or hide multiple layers in PS on the Mac. I could hide all by OPT-clicking on one eyeball. But OPT-Clicking it again did not show all the hidden layers again. It did nothing. Even after several reboots.I had to manually turn on all the layers.
    But then I CONTROL-Clicked on the eyeball to bring up the context menu, which said "Show/Hide all layers" and somehow that woke up the show/hide function when OPT-Clicking on an eyeball. So now everything works normally. The FNCT-Click (or right mouse button) on the eyeball has become a switch to turn on the OPT-Click behavior.
    Anyone else notice this?
    Thanks
    Stan
    MacBookPro6,2 Intel Core i7o OS 10.6.4

    The second Option+Eyeball click is a not a "show hidden layers" command, it goes to the previous state of visible layers... so if you opt+eyeball+click to just see one layer, then for whatever reason make another layer visible, or hide that layer and make another visible, or if you manually hid all but one layer, then that second opt+eyeball+click will appear not to work (if your expectation is to have all the layers become visible)
    Kind of a convoluted answer there!  But try that out and see if that is what you are experiencing.
    I think at one point, quite a few versions ago, the opt+eyeball+click was a "show this layer/show all hidden layers" command. But Adobe changed the behavior because the second opt+click would make every layer visible, including the layers you had intentionally hidden.

  • I am having trouble removing songs from my iPhone.  i have unchecked songs in the library on my mac, but they still show up on phone after syncing.  how do I remove them?

    I am having trouble removing songs from my iPhone.  i have unchecked songs in the library on my mac, but they still show up on phone after syncing.  how do I remove them?

    Hi asims01,
    Welcome to the Support Communities!
    The information below may be able to answer your questions about how to delete songs from your iPhone:
    Deleting songs downloaded to your device
    Tap the Music app.
    Tap More > Songs at the bottom.
    Scroll or search for the song you would like to delete from your device.
    Swipe right to left on the song, and then tap Delete.
    Note: You must be in Artists, Songs, or Albums view to delete songs from your device. Deleting from a playlist won't remove a song from your iOS device.
    Also, this information can be found on page 64 of the iPhone User Guide for iOS 7
    http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf
    Remove a song from iPhone. Tap Songs, swipe the song, then tap Delete. The song is deleted from iPhone, but not from your iTunes library on your Mac or PC, or from iCloud.
    If you have iOS 7, this will delete the song from local storage, but the song will still appear with a cloud symbol in the Music app, as you've noticed. To hide the iTunes in the Cloud purchases, navigate to Settings > iTunes & App Store, and disable "Show All: Music”
    There may be a few orphaned songs on your iPhone that were partially downloaded or corrupted in some way. If that is the case, you can erase all of the music from your phone.  Follow the instructions below and select the Music app under Usage:
    iPhone, iPad, and iPod: Understanding capacity
    http://support.apple.com/kb/ht1867
    I hope this information helps ....
    - Judy

Maybe you are looking for