How to expand the folder via applescript?

Dear apple experts,
How to expand the folder via applescript?
Manually we are using command + option + right arrow, but how we handle this in applescript?
Thanks in advance,
Velladurai.G

Hello
Finder's container's "expanded" and "completely expanded" properties have long been marked "NOT AVAILABLE YET" under OSX:
Finder.sdef > Containers and Folders suite
container n [inh. item] : An item that contains other items
    elements
        contains items, containers, folders, files, alias files, application files, document files, internet location files, clippings, packages.
    properties
        entire contents (specifier, r/o) : the entire contents of the container, including the contents of its children
        expandable (boolean, r/o) : (NOT AVAILABLE YET) Is the container capable of being expanded as an outline?
        expanded (boolean) : (NOT AVAILABLE YET) Is the container opened as an outline? (can only be set for containers viewed as lists)
        completely expanded (boolean) : (NOT AVAILABLE YET) Are the container and all of its children opened as outlines? (can only be set for containers viewed as lists)
        container window (specifier, r/o) : the container window for this folder
A way to expand a given folder is to use keystroke command of System Events to invoke the keyboard shortcut in Finder. Something like the following script.
  kLeftArrowCharCode            = 28,
  kRightArrowCharCode           = 29,
  kUpArrowCharCode              = 30,
  kDownArrowCharCode            = 31,
--set f to (path to downloads folder from user domain) -- target folder e.g.
set f to (choose folder)
tell application "Finder"
    reveal f
    tell Finder window 1
        set cv to current view
        if cv = column view then return -- do nothing
        if cv = icon view then set current view to list view
    end tell
    my _keystroke(it, character id 29, {option down, command down}, 0.2)
end tell
on _keystroke(_app, _key, _modifiers, _delay)
        reference _app : application reference
        string _key : character(s) to be keystroked [1]
        list _modifiers : list of modifier key to be pressed; enumerations are
                command down
                option down
                shift down
                control down
        number _delay : post-delay amount [sec]
        [1] Character must be present on the current keyboard layout. Otherwise, it is replaced by 'a'.
    tell _app to activate
    tell application "System Events"
        tell (process 1 whose bundle identifier = (_app's id))
            keystroke _key using _modifiers
        end tell
    end tell
    if _delay > 0 then delay _delay
end _keystroke
Regards,
H

Similar Messages

  • How to create the folder in presentation server through pop-up(

    Hi Experts,
    Can u give me the solution , how to create the folder in presentation server through pop-up(means dynamically, after executing the program , pop-up has to come to create the folderand path)
    regards
    ram.

    Use the methods -> DIRECTORY_BROWSE & DIRECTORY_CREATE of the class CL_GUI_FRONTEND_SERVICES
    DATA: path TYPE string,
          rc TYPE i,
    dir_name TYPE string value 'HI'.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
        CHANGING
          SELECTED_FOLDER      = path
      IF SY-SUBRC <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    concatenate path '\' dir_name into path.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
        EXPORTING
          DIRECTORY                = path
        CHANGING
          RC                       = rc
      IF SY-SUBRC <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Edited by: Kartik Tarla on Sep 23, 2009 5:54 PM

  • How to zip the folder in application server?

    how to zip the folder in application server?

    You can use
    open dataset with filter
    link:[http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET_OS_ADDITION.htm#!ABAP_ADDITION_2@2@]

  • How to delete the folder from easy DMS

    Hi..
    How to delete the Folder once it is created in easy DMS? As i have all the access
    Also how to restrict user from deleting the document from DMS? (Delete document option restriction)
    I want all folder to be gets created with internal number range only.i have define the same for Doc type FOL.
    But when i first log-in into easy dms system ask me do i need to create the folder i clicked on yes and while saving it shows an error that only internal number range is possible.But actually number EDIPUBLICROOTFOLDER  is selected by default and unedited format

    Hi,
    How to delete the Folder once it is created in easy DMS? As i have all the access
    First delete all the DIR's inside the folder using delete button. Later you can delete the Folder.
    Also how to restrict user from deleting the document from DMS? (Delete document option restriction)
    You can control this using authorization objects in DMS.
    Hope this helps.
    Regards,
    Deepak Kori

  • How to change the folder name in the web report.

    hi experts,
    can anybody give me the solution, how to change the folder name in the web report. any help is appreciated.
    waiting for ur favourable response.
    thanks
    suri

    Hi Tony,
    Yes, the business requires, only to change in the webreport only not in bex and roles. any suggestions will be helpful to me.
    thanks
    surendra

  • How to write the folder path in standard webi report - Most Accessed Documents

    How to write the folder path in standard webi report - Most Accessed Documents
    All
       -> Public Folders
                      -> Auditor
                      -> ABCD
    I want to give path of folder 'ABCD' and all the reports/ subfolders under it?
    Prompt - 'Enter the Folder Path(Add % at the end to include Sub Folders)' ?
    Give me exact path syntax

    Hi Daniel,
    But when I give my URL as
    http://serverA:80/irj/portal??NavigationTarget=ROLES://portal_content/crm-practice/14-Feb/Test_Page
    I am able to access the iview but the thing is I am getting TLN,Toolarea,Masthead,etc.
    I will tell my requirement,
    ServerA (EP 7.0) has some iviews,pages...
    I need to access these iviews from serverB(EP 6.0)....
    In ServerB only the iviews has to be displayed in the content area but not TLN,Toolarea,etc.
    Kindly help me in this regard.
    Thanks and regards,
    Purushothaman.
    Message was edited by: Purushothaman Vyasarao

  • The updated iPhoto program is cumbersome.  I am trying to create a Christmas card and can't figure out how to get the fold of the card on the left and not on the top of the card.  I had no trouble with this for the past two years.  Can someone help?

    The updated iPhoto program is cumbersome.  I am trying to create a Christmas card and can't figure out how to get the fold of the card on the left and not on the top of the card.  I had no trouble with this for the past two years.  Can someone help?

    Click on the Layout button lower right and choose a Vertical lyout from the dropdown

  • How to expand the hierarchy column automatically when delivery reports by a

    Hi Experts,
    In OBIEE 11.1.1.6.0,how to expand the hierarchy column automatically when delivery reports by agent?
    For example:
    In SampleLite RPD, when we drag "Time Hierarchy" and Sales column into the report , and sent it by agent ,it will only display "Total" sales, not show all level value,such as Year,Month,Day.So how to expand the hierarchy column automatically when delivery reports by agent?
    If we expand all levels and save them, it will be ok, however, when we add new data, it will be collpased automatically and not show the lowest level data, requiring Users or Developer to modify this report for expanding the hierarchy. We think it is very trouble, is there any good suggestion or method for achieving our requirement?

    958054 wrote:
    Hi Dpka,
    Is it any difference? I look at the result is same.
    Firstly, you said it is 'Add member of ',
    Now, you said it is 'Keep member of'
    Could you please tell me which options I must select ? Thanks very much.Here is some notes from the documentation to make a better sense of how those two options would work:
    •Selection steps — When you create selection steps, you can add a group or a calculated item in a step. Subsequent Keep Only or Remove steps might reference members that were included in the group or calculated item.
    ◦A group list is affected by members that are kept or removed in subsequent steps, but the group outline value remains the same. For example, suppose the MyNewYork group contains Albany and Buffalo and its value is 100. Suppose Albany is removed in a later step. The value of the MyNewYork group remains at 100, but Albany is no longer listed with the group.
    ◦A calculated item is not affected by members that are kept or removed in subsequent steps, because removals can affect the components of the formula.
    •Groups and calculated items — A step can include a group or calculated item. Groups and calculated items can be used only with Add steps; they cannot be used in Keep Only or Remove steps.

  • How to get the folder ID of SAP Inox folder

    Hi
    I want to access the document(mail) which is there in one of the shared folders of SAP inbox through program.
    Can anyone suggest me, how to get the folder ID?

    Hi,
    Try the FM SO_FOLDER_ROOT_ID_GET for your requirement.
    Hope it will help you in hetting the folder ID.
    Best Regards,
    Deepa Kulkarni

  • How to Expand the Screen of Windows Server 2003 on VMware Server 2 ?

    Folks,
    Hello. Because Windows 7 is not compatible to be installed PeopleSoft PIA, I have to install VMware Server 2 and then install Windows Server 2003, that is compatible with PIA, on the virtual machine.
    But when I open Windows Server 2003 on the virtual machine, the screen of Win2K3 is very small, and its size is about 1/4 of the screen of my computer screen. This is not comfortable to work for a long time.
    Does any folks know how to expand the screen of Windows Server 2003 on VMware Server 2 virtual machine so that its size covers the entire screen of my computer ?
    Thanks in advance !
    Lucy

    Did you already installed the VMWare tools onto your VMWare guest OS ? Generally, it helps a lot to be able to redefine a larger screen definition.
    Nicolas.

  • I need to know how to "compress" the Folder Tree.  The File folders are moving to the right and out of sight in Lightroom 5.

    I need to know how to "compress" the Folder Tree.  The File folders are moving to the right and out of sight in Lightroom 5.

    A couple of suggestions that may help:
    - Make sure you've made the left-hand column as wide as possible by grabbing the divider between the column and the Library grid view.
    - You can hide a parent folder from the display by right-clicking it and selecting Hide This Parent. This will shift all the child folders to the left.

  • I need to know how to expand the browser window so it fills my laptop screen

    i need to know how to expand the browser window so it fills my laptop screen this isnt  about the + or - tabs

    have a look at the top left of your browser window that looks like two arrows pointing up and down in a slant, click it and it will put your browser in full screen mode...

  • How to delete the folder VOLUMES on the main drive?

    Leopard creates a folder called Volumes on the root with aliases to external hard disks. I can delete the folder but as soon as I connect to the local network server, the folder Volumes appears again with an alias to the hard disk in the server. How do I permanently delete this folder? My Dock grid list is totally ruined by this folder. I was used to 5 folders on the root. Now it's six and I don't want that. I never had this annoying folder and I didnt do anything except for the 10.5.4 update. I also have no file or folder sharing active. The Volume folder also (re)appears when I connect an external USB disk. pls help

    A problem I have with this folder is that although it is an alias, sometimes when I do file transfers (such as receiving large amounts of photographs via pando etc.), as well as downloading the file to the external drive, as I have instructed it, is stashes the same file in the "Volumes" folder, and over time it can really start to eat away at the disc space. (I only recently discovered this recently and was this able to free up about 12 GB of disk space). I am pretty sure this is abnormal behavior for this folder, but I don't have any idea where to look to find what the problem is. Any idea what might be causing this, and how I can stop it doing it? It isn't catastrophic, now that I know, because I can periodically go and clear it out, but the eroding disk space caused me lots of problems until I discovered that this is what was causing it.

  • How to auto log in via applescript?

    I have no idea how to do it? do I need to curl, change html and post? but how do i post then? or how can i fill in password and log in on the safari page via applescript GUI scripting and press enter? I am just so confused right now:(

    I have no idea how to do it? do I need to curl, change html and post? but how do i post then? or how can i fill in password and log in on the safari page via applescript GUI scripting and press enter? I am just so confused right now:(

  • How to rename the folder in KM

    Hi Experts,
    How to change the name of the folder in KM server.
    For ex : I have a Folder called <b>Trail</b> Now i wnat to change the folder name in Training ....I have tried with right click and all......
    Can anyone pls throw some light on this issue........
    Thanks in Advance,
    Dharani

    Hello Dharani,
    Changing the name of a folder at the root level of KM (the name of a repository) is very different than changing the name of a folder within a repository.  To change the name of a repository, Ravinder's previous post explains the steps to take.  However, a repository is typically something that a normal end user wouldn't be able to create, so I'm assuming this won't come up much.
    To change the name of a folder within a repository, you can simply select 'Rename' from the context menu of the folder.  Do you see this option when clicking on the context menu?  If the user created the folder, they should have the permissions needed to see this option.
    Please let me know if I've misunderstood your question.  Hope this helps.
    Best regards,
    Fallon

Maybe you are looking for