Disable "Choose Folder" Dialog?

I'm pretty new to scripting in illustrator and am having immense difficulties trying to disable the "Choose Folder" dialog. The script cycles through saving the image, then its layers out in different formats.  To set the image up properly, I have to run sections of the script through an action set.  Even though I've specified a path for each "save" and "export," Illustrator will prompt the "Choose Folder" dialog each time it comes to a script.  Can I specify the directory in such a way to remove user interaction (files will always export to fixed folder)?

Mark said AppleScript Studio, but I suspect he means AppleScriptObjC -- Studio was deprecated in OS X 10.6. What you're after is known as a save panel with an accessory view.
Actually, as long as you don't expect the checkbox to change anything while the dialog is showing you can get what you want without too much pain using ASObjC Runner:
script openPlus
  -- make a checkbox
          set theCheckbox to current application's NSButton's alloc()'s initWithFrame_({{0, 8}, {200, 16}})
  theCheckbox's setButtonType_(current application's NSSwitchButton)
          theCheckbox's setTitle_("Include sub folders")
  -- make a view and add the checkbox to it
          set theView to current application's NSView's alloc()'s initWithFrame_({{0, 0}, {200, 32}})
  theView's |addSubview_|(theCheckbox)
  -- make an open panel
          set thePanel to current application's NSOpenPanel's makeOpenAt_types_(path to home folder, {""})
          thePanel's setMessage_("Folder to process")
  thePanel's setCanChooseDirectories_(true)
  thePanel's setCanChooseFiles_(false)
  -- add the view to the panel
  thePanel's setAccessoryView_(theView)
  -- show and return results
          tell thePanel to set theResult to showModal()
          return {theResult, theCheckbox's state()}
end script
tell application id "au.com.myriad-com.ASObjC-Runner" -- ASObjC Runner.app
          set {thePath, checkBoxState} to run the script {openPlus} with response
end tell
if thePath is not missing value then -- missing value means Cancel
  -- do your stuff
end if
Message was edited by: Shane Stanley (added solution)

Similar Messages

  • Applescript to open the Choose Folder dialog box and close the message after moving it

    I've been trying to figure out how to get the same functionality as the Windows version of Outlook has so that the open message gets closed when it's moved to another folder.
    It seems pretty simple to move a message to a pre-defined folder, but I can't find a way to open the Choose Folder dialog so I could choose the destination folder. I've looked through the dictionary, but couldn't find any direct way to activate the Choose Folder dialog. So I decided to use keystrokes for the job. Here's what I came up with:
    on run {}
        tell application "Microsoft Outlook"
            try
                set theMessage to first item of (get current messages)
                set folderID to the folder of theMessage
            on error errMsg number errNum
                set dialogReply to display dialog "Please select one or more messages to file away before running this script." buttons {"Abort"} default button 1
                return
            end try
            -- open the Choose Folder dialog
            tell application "System Events" to keystroke "m" using {command down, shift down}
            repeat
                delay 2
                set currentID to the folder of theMessage
                if currentID is not folderID then exit repeat
            end repeat
            -- Close the active message
            tell application "System Events" to keystroke "w" using command down
        end tell
    end run
    This is my first attempt to do anything with AppleScript..
    Now in addition to using keystrokes instead of Outlook built-in commands to open the Choose Folder dialog and to close the message, I also have another problem. Everytime I run the script from AppleScript Editor, everything runs fine, the message gets moved to the folder I choose and the message also gets closed. When I move the script to "~/Library/Application Support/Microsoft/Office/Outlook Script Menu Items" and start it from inside Outlook, Outlook  gets stuck after opening the Choose Folder dialog and I have to force quit Outlook. I added some debuggin to the script and found out that the script keeps running, but I'm unable to select the folder from Outlook and cannot continue.
    Anybody have an idea why this is happening?
    Regard,
    Kris

    (For the record)
    Unchecking "Submit crash reports" in the Firefox [[Options window - Advanced panel]] General tab simply toggles the default of the "Tell Mozilla about this crash so they can fix it" check box in the Mozilla Crash Reporter dialog (upon crash). It does not turn off the Crash Reporter itself.
    Related bug report:
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=577221 Bug 577221 - Firefox doesn't remember "submit crash report" check box]
    The above information has been added to
    http://kb.mozillazine.org/Breakpad#Can_I_disable_Crash_Reporter.3F

  • Kudos: Choose Folder dialog on export improved (Windows)

    Simple improvement, but this bugged me majorly as I used it often -- thanks for the more advanced Choose Folder dialog in Export. I can now hit "Recent Places" and more easily navigate my file system. Cool!

    Solution is, explain to them that what you can do in Access is NOT always what you can do in other products. Ask them to show you how when they visit Amazon.com, if they can click on an item and it is "magically" saved to a folder on their local workstation without an intervention..
    Sorry, just sometimes we let the business users decide what is best, even though 1/2 the time it will end up biting them in the a$$..
    Thank you,
    Tony Miller
    Webster, TX

  • Applescript create choose folder dialog with checkbox

    Hi,
    can anybody tell me if it's possible to create an applescript choose folder dialog with a checkbox similar to the dialog window you get when you Place? I know how to choose a folder using:
    tell application "Adobe InDesign CS5"
              set myFolder to choose folder
    end tell
    and I know I can use a checkbox like this:
    tell application "Adobe InDesign CS5"
              set myDialog to make dialog with properties {name:"Folder to process"}
              tell myDialog
                        tell (make dialog column)
                                  set myRectanglesCheckbox to make checkbox control with properties {static label:"Include Sub folders", checked state:true}
                        end tell
              end tell
              set myResult to show myDialog
    end tell
    But is it possible to both of theses options together in one dialog window.
    Any help would be greatfully appreciated.
    Thanks,
    Nik

    Mark said AppleScript Studio, but I suspect he means AppleScriptObjC -- Studio was deprecated in OS X 10.6. What you're after is known as a save panel with an accessory view.
    Actually, as long as you don't expect the checkbox to change anything while the dialog is showing you can get what you want without too much pain using ASObjC Runner:
    script openPlus
      -- make a checkbox
              set theCheckbox to current application's NSButton's alloc()'s initWithFrame_({{0, 8}, {200, 16}})
      theCheckbox's setButtonType_(current application's NSSwitchButton)
              theCheckbox's setTitle_("Include sub folders")
      -- make a view and add the checkbox to it
              set theView to current application's NSView's alloc()'s initWithFrame_({{0, 0}, {200, 32}})
      theView's |addSubview_|(theCheckbox)
      -- make an open panel
              set thePanel to current application's NSOpenPanel's makeOpenAt_types_(path to home folder, {""})
              thePanel's setMessage_("Folder to process")
      thePanel's setCanChooseDirectories_(true)
      thePanel's setCanChooseFiles_(false)
      -- add the view to the panel
      thePanel's setAccessoryView_(theView)
      -- show and return results
              tell thePanel to set theResult to showModal()
              return {theResult, theCheckbox's state()}
    end script
    tell application id "au.com.myriad-com.ASObjC-Runner" -- ASObjC Runner.app
              set {thePath, checkBoxState} to run the script {openPlus} with response
    end tell
    if thePath is not missing value then -- missing value means Cancel
      -- do your stuff
    end if
    Message was edited by: Shane Stanley (added solution)

  • How to show folders in Choose Folder dialog windows

    Hi
    Is there a way to show folders in Choose Folder - Webpage Dialog window and have the NEW folder option disabled ?
    It seems that they are dependent.

     
    Hi,
    Do you have any folders in that document library? When you click choose folder, it will only show you the folders in current library.
    Thanks
    Pengyu Zhao
    TechNet Community Support

  • Document Library Upload 'Choose Folder' programming Issues

    Hello,
    I have a document library with folders and subfolders and all folders have unique security inheritance applied. Administrator is able to upload to any folder using below dialog. I want everyone who does not have permission to the folders and subfolders to
    upload file. So I decided to programmatically incorporate the ‘Choose Folder’ functionalities via SPSecurity.RunwithElivatedPrivillages(Delegate(){ “…” });
    I incorporated fetching document library and populate hierarchies inside the security code so code run as system account. However when I call
    LaunchPickerTreeDialog
    it populates based on user permission and hence if user does not have permission to folder, it does not populate at
    all.
    How can I make sure to give this Upload file functionality to all users via dialog box with full permission so it generates all folders and subfolder of the document library when user select ‘Choose Folder’ option?
    Please note that if I type the correct doc library folder url, it successfully uploads to any folders as my code is inside the elevated permission. It is not good approach to give textbox to end user to type as they might make a mistake, so I need to provide
    a ‘Choose folder’ dialog functions but I want to run as elevated privileges as everyone who do not have permission also can upload the file.
    I also tried using
    http://howtosharepoint.blogspot.com/2010/02/sharepoint-2010-folder-selector-and.html but the following code can’t be resolved
    if
    (_hiddenSelectionField != null
    && !string.IsNullOrEmpty(_hiddenSelectionField.Value))
      _listUrl.Text = GetObjectUrl(_hiddenSelectionField.Value);
      _hiddenSelectionField.Value = string.Empty; }
    How can I declare and make use of  hiddenselectionField and
    ListURL in my webpart?
    Thanks

    There's always a few challenges when trying to get around SharePoint's security model. Your options would be to try to extend the LaunchPickerTreeDialog if it's not sealed or to write a custom folder picker control. If you go the custom route, you could
    even include it directly on that upload page to avoid the additional clicks.
    Dimitri Ayrapetov (MCSE: SharePoint)

  • Browse For Folder Dialog

    I am trying to display a "Browse For Folder" dialog
    Note that this is not the JFileChooser with the DIRECTORIES_ONLY flag
    It is this one
    http://i.msdn.microsoft.com/Bb964683.ed6b0efa-d190-4995-861d-abc3571b06ac(en-us,office.12).gif
    There have been several posts over the years on these forums asking similar questions without answers.
    I can't believe that noone has ever made one since so many people want this functionality.
    There doesn't appear to be one in the Swing Package.
    Does anyone know of a free jar that contains this?

    JDirectoryChooser
    And while we are with choosers, we might also want to try the folowing choosers for colors and dates:
    [Quick Color Chooser|https://colorchooser.dev.java.net/]
    [MultiDateChooser |http://www.javafr.com/codes/SELECTEUR-DATES-MULTIPLES_48407.aspx] (to download the zip you must be connected with your CodeS-SourceS account wich is totally free)
    Edited by: Andre_Uhres on Feb 23, 2009 6:02 AM

  • Disable iCloud open dialog

    I have added some applications to iCloud Drive since I want to share documents at home and work. The annoying is that after that these applications starts with a, in my opinion, completely undesirable open dialog instead of an empty document.
    I'm sorry if this has been asked before, but is there a way to disable this open dialog and still have the applications in iCloud Drive?
    Fred

    I have added some applications to iCloud Drive
    I am not sure what you mean:  Did you move the applications from the "Applications" folder to iCloud Drive, or did you store the documents for applications in iCloud drive? Which applications are you asking about?

  • Size of choose folder/file opendialog window

    I find that the size of the opendialog for choose folder in AppleScript is rather small, even cramped.
    Especially compared to the size of the window you get in Automator in an Ask for Finder Items action.
    How can the size be changed, if at all possible?
    Thanks
    Berend

    I think there's some other subtle element at work here.
    The OS appears to recall how you set the open and save dialogs in each application - that is, if you choose File -> Open File... in Safari and expand the dialog to be very wide but short, it will reopen that way next time you Open File... in Safari.
    You can choose the corresponding menu option in another application and the OS will remember that application's setting, which may be different from Safari's.
    However, when you use AppleScript to invoke the dialog it always seems to open at the default, regardless of individual application settings, and it does not seem to record any changes you make. This is true even if the AppleScript is saved as a standalone application (I tried this just in case it's something saved back in the application settings)
    Is this a bug? maybe. Hard to tell. It would seem logical that any changes to the dialog size should be remembered whether that was invoked directly by the user or via an AppleScript event. http://bugreporter.apple.com/ might be the nex step.

  • Set Choose to choose folder or file as is perm. in App. Script Studio Panel

    Surely this has to be a basic question. At some point within an Applescript Studio application the user needs to enter a desired output filename, the path for this output filename, or both. A one button interface is the intent of course. The Applescript Studio choose panel works fine for this task except that the choose panel seems to lack the ability to also create a folder.
    Creating a new folder is a likely task at this point in the application. One can create a folder with the standard Applescript choose function, but how does one setup the Applescript choose to allow picking a folder or a file? Furthermore, how does one preset the folder in which the choose opens?
    Thanks, AKS

    There should be several options to use with an NSOpenPanel, but if all you are wanting is a simple choose dialog, then the standard AppleScript one would probably be OK (especially since I am not that familiar with AS). The format is in the StandardAdditions dictionary, and is something like::
    choose folder with prompt "Some Prompt" default location (path to desktop)
    As for selecting either a file or a folder dialog, you can use some kind of switch to use seperate 'choose file' or 'choose folder' statements, or change the text of a script to run:
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">property SingleFile : false -- false for folder, true for file
    if SingleFile then
    set TheType to "file"
    else
    set TheType to "folder"
    end if
    set ScriptText to "choose " & TheType & " with prompt \"Some Prompt\" default location (path to desktop) without invisibles"
    set TheChoice to run script ScriptText
    </pre>

  • Choose folder sometimes keyboard only

    Hi all, long time no read.
    I have noticede recently that some of my scripts (and this is not a systematic bug, so I could be hard to reproduce) that include a choose folder command sometimes don't allow the use of the mouse to select a folder in the dialog and that the only way is to use the keyboard shortcuts to navigate around. The "choose" button is not focused and therefore it is the only part I cannot activate with a keyboard "return" key and luckily that responds to the mouse.
    Has anyone noticed this behaviour ? It's been used across our small network of machines, so this bug appears on a variety of systems from 10.4 to 10.6.
    Thanks in advance.
    j.

    which machine model are we talking about here?
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • Export presets now direct me to the "Browse For Folder" dialog box

    Suddenly Lightroom will not remember the name of the "export to" folder when I use my export presets in certain ways, even though the name of the "export to" folder appears in the "Export" dialog box. The prolem exists in Library and Develop modules. This is what's happening…
    IF I CLICK ON "FILE":
    1. And choose the "Export" option, LR displays the Export dialog box, from which I can select an user preset and export a JPG file to the proper folder, as intended. (OK) 
    2. And choose the "Export with Previous" option, LR exports the JPG file immediately to the proper folder. (OK) 
    3. And I choose the "Export with Preset option, LR displays the menu of Lightroom presets and user presets, but clicking on a user preset displays the "Browse for folder" dialog box from which I must manually browse to the export folder before a file can be exported. (NOT OK) 
    IF I RIGHT-CLICK ON THE IMAGE:
    LR displays a menu containing these options: Export, Export with Previous, the Lightroom presets, and my user presets. 
    4. If I then choose "Export," LR works properly---same as example 1 above. (OK) 
    5. If I then choose "Export with Previous," LR exports the JPG file immediately. (OK) 
    6. If I then choose one of my presets, LR does not work properly: it acts as it does in example 3 above. (NOT OK) 
    BACKGROUND:
    I have been using these presets for almost a year without fail---they're great! Two days ago I moved my Lightroom catalog to a new external drive. I also renamed the "export to" folder (that new name is stored in the "Export" dialog box). 
    I sure would appreciate hearing from anyone on this because it's driving me crazy. Thanks.

    SOLUTION FOUND:
    I created yet another folder for storing exported JPGs. Then for each export preset I used the "Browse For Folder" dialog to point that preset to that new folder. All presets now work as before. This fix was tolerable for the seven presets I have, but a large number of presets would have made it a real chore.

  • How can I disable "download error" dialog box when saving a complete web page?

    Sometimes, when I try to save a web page as type: "Web Page, complete", firefox displays download error dialog box stating a file "could not be saved, because the source file could not be read."
    I don't have a problem with firefox couldn't save that file, but I have a problem with firefox displaying that dialog box, because I have to click OK everytime.
    Is there a way to disable that annoying dialog box?

    I modified the host file mainly to block ads. But that's not the problem. It's OK for me for firefox to not saving some parts of a page (ads usually within a frame). It's my intention to NOT saving those files. I just want to save the main content of a webpage.
    But I'm having a problem with firefox displaying the dialog boxes.

  • How to disable the reminding dialog when close the webi report viewer

    Dear all
    How to disable the reminding dialog when close the webi report viewer
    Background
    When user close the webi report viewer in inforview by click the button in the right-top of the webi report viewer frame. It always prompt a dialog to remind user that the modification will be lost without saving.
    But customer need to disable this dialog, and can clost the report viewer directly.
    So is there any ways to modify this?
    I think it shoule modify some .js file under tomcat, but can not find the solution.
    Thanks a lot, any information woulde be appreciated.
    David Zhang

    I've had the same issue bugging me since installing Snow, er, lion, er, cat, er, cougar, er, Mountain Lion. Incredibly ANNOYING.
    It's stupid stuff like this and reverse scrolling that really turn long-timer users off. I'm personally glad Forstall got fired for blunders such as these.
    I'm serious peeved that turning off iCloud Documents & Data actually deletes documents and data locally. That's just incredibly stupid.
    MANY thanks mende1 for the answer on how to fix it.

  • How to open the choose application dialog on Mac?

    Hi all,
    I want to know how can we open the "choose application" dialog from InDesign. I want to give this functionality through right click context menu.
    At present CS4 has this feature - steps are as follows:
    1.Create a document.
    2.Place an item on the document.
    3.Now select the placed item and right click on it.
    4.Go to "Edit With->Other..." option.
    5.Choose application dialog opens up and user can select the application in which he/she wants to open the selected item.
    I want the same behavior but not able to understand how to open the choose application dialog on Mac. I have already achieved this on windows.
    I think that there might be some system API's for Mac to get this working.
    Please let me know about this, any help will be appreciable.

    Is this not sufficient? Looks like  you get some defaults then an "other" at the bottom as well. Control click or right click, when using the white arrow on the image.

Maybe you are looking for

  • OVD Database Adapter w/ JDBC Thin Driver to 10G RAC DB Resource

    I'm looking for feedback as to whether anyone has successfully consumed a RAC database resource through an OVD database adapter? If so, I am interested in what your host value in the adapter ui looked like. I am successful with this connection only i

  • Scrambling Rule

    Hello, I'm facing one particular challenge trying to scramble HCM data. In this client the unique ID of a person is the PERSONID_EXT Infotype 709. This means that a person has a single PERSONID_EXT, but can have several PERNR's that correspond to a d

  • Flash Catalist can't be started

    After installing the Flash Catalist (Beta 1-235712) I could start it only once. After that it showed me only the first small window which disappeared after 10-15 seconds without any message showed an error. I was able to start Flash Catalist only whe

  • MAJOR BUG WebLogic 4.5.1 and wl-proxy for Netscape server

    Hi there. We are having a major problem with our WebLogic cluster that           cannot be explained, but is bad enough where we can't deploy our           application and miss our schedule. Here's the setup:           We have 8 WebLogic servers (4.5

  • Valuable comments required

    Hi All, I am calling a procedure from Crystal Report. One of the parameter needs to handle multiple values. I am passing it as semicolon seperated values to my procedure. I am parsing, populating the same in the collection and using it in my SQL. The