How do I finish this Create Smart Folder script?

I've gotten most of the way on a homemade file tagging system. My Automator Service gets files, asks what to tag them, applies the tags to the Spotlight Comments, and then asks if you want to make a Smart Folder that finds one of your new tags.
If you do, it runs a script. The script asks what tags you would like to populate the Smart Folder, initiates a new smart folder based by appending the tags to "comment:" in the Spotlight search. But that's where I'm stuck. I can't figure out how to automate clicking the darn "Save" button to create the Smart Folder.
And feel free to co-opt my tagging strategy, it is working famously for a team of 5 in shared Dropbox folders.
Here's my Applescript. See the solitary comment in my code below for where I think I need help.
====================
display dialog "Which tags should be queried to populate the Tag Folder?" default answer "separate tags by spaces" buttons {"Cancel", "Continue"} default button 2
if (button returned of result) is "Continue" then
set the clipboard to "comment:" & text returned of the result
tell application "Finder" to activate
tell application "System Events" to tell process "Finder"
keystroke "n" using {command down, option down}
keystroke "v" using command down
end tell
tell application "Finder"
display dialog "What shall we name the Tag Folder?" default answer "" buttons {"Cancel", "OK"} default button 2
if (button returned of result) is "OK" then
set the clipboard to text returned of the result
tell application "Finder" to activate
tell application "System Events" to tell process "Finder"
# How do I tell Finder to click that Save button?
delay 0.5
keystroke "v" using command down
delay 0.5
key code 36
end tell
end if
end tell
end if
=================
Message was edited by: kerryspyder

My pleasure. Thanks for the star.
And here's a bonus that might some day prove useful:
*            key code 36*
*            if sheet 1 of sheet 1 of window 1 exists then*
*               click button "Replace" of sheet 1 of sheet 1 of window 1*
*            end if*
*         end tell*
Message was edited by: Pierre L.

Similar Messages

  • I used Time Machine to recover my Pictures folder. This created a folder called Pictures (original) but I cannot open it.  There is a do not enter roadsign, red disk and white bar on it.  How can I see the contents?

    I used Time Machine to recover my Pictures folder. This created a folder called Pictures (original) but I cannot open it.  There is a do not enter roadsign, red disk and white bar on it.  How can I see the contents?

    Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the page that opens.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    chmod -R -N ~
    The command will take a noticeable amount of time to run. When a new line ending in a dollar sign ($) appears below what you entered, it’s done. You may see a few error messages about an “invalid argument” while the command is running. You can ignore those. If you get an error message with the words “Permission denied,” enter this:
    sudo !!
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.
    Next, boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.
    In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens. You’re not going to reset the password.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

  • How to create smart folder in Lion

    Hi,
    I was using Smart folders a lot in Snow Leopard. For example I have Movie folder and lot of movies in it. The movie I haven't seen yet are labeled as red and there is smart folder, which shows me just the red (unseen) folders.
    However the smart folder doesn't work in Lion. So I deleted them and wanted to create new one. However when I create new Smart folder it can search just "This Mac" or "jakudo" (my account) or "Shared", I cannot set the "Movie" folder. How should I do that? Or is there some new way how to do that in Lion?

    Smart Folders seem to be getting smarter Something like this maybe?
    Select 'Kind is Folder' first, then narrow it down to Movie in the Search box to add a smart tag. Next Hit the + sign and set further filters as required.
    I've only played with this briefly but it might be what you're looking for?
    Regards,
    Colin R.

  • How to create Smart Folder that limits search to a specific folder or drive

    I've been playing with Smart Folders in Leopard 10.5.5. I would like to create a smart folder that limit the search to only a specific folder where I keep all of my work related files. I cannot figure a way how to do this.
    Any suggestions?
    Thanks.
    Bud James

    1.) Performed Archive and Install. This did not correct the problem.
    2.) Performed clean install to new hard drive. This corrected the problem.
    3.) Performed a user migration (to the fresh new OS and new HD) using the migration utility and the problem returned.
    So it seems pretty clear that there is something related to my user identity that is causing the problem. I called Apple tech support but they were not able to resolve the problem.
    Sure, I can just create a new user and spend the next week or so reinstalling a bunch of software...but certainly based on the description of the problem (and the trouble shooting that I have already performed) someone at Apple should be able to pinpoint what files I need to delete or replace to correct this problem.

  • How to view and or delete smart folder in finder sidebar

    Sounds easy, but I am having a problem. I recently had my hard drive replaced at the genius bar. I have a smart File on the finder side bar that I can not open or delete. When I click on the file I get the message "the volume for (name of file) cannot be found. I tried using both "spotlight" & "the finder go to" locate this smart folder to no avail. I cannot remember when I created this file but I had labeled it appleworks 6 manual.. I don't ever remember using this smart file, I may have just created it without ever putting anything in it. So how do I open it or just plain delete it. I can remove it from the side board but it just comes back. I also went to /volumes which took me to the hard drive, but when I looked at all the files I couldn't find a smart file with this label. Any suggestion? Thanks Paula

    I made another smart folder. I wanted to see if I could get the options with the control key. My test folder worked fine and I was able to get the options. I could delete the test folder without any problems. If it is that I have an Appleworks manual stored in an image file, then how could I find the image file? And if I did find it, what would I do to it, so I could delete this smart folder that I set up? I did a spotlight search for image file, but I couldn't find anything. I also searched appleworks manual and I did find a "getting started with appleworks 6 document" with an path of '/application/appleworks (U.S. English) Applework 6 documentation ... when I click on it it opens in preview.. but that manual is stored in my appleworks in applications, so I don't think it is related to the smart folder in the finder sidebar. If I did manage to close or delete the image file that was related to this folder, does that mean I'm just stick with this smart folder that I can't delete on my finder sidebar?

  • Create Smart Folder with Applescript?

    Hi
    Is there a way to create a Smart Folder with Applescript?
    many thanks
    LJ

    thanks neil.
    one other question. once i've made this folder i'll want to use it.
    it occurs to me that i might not be able to use the same code to
    call the folder after it's been created since, while the date may
    be the same, the time won't be.
    how do i stored the new folder name as it's being created so that
    i can call it later in the script?
    thanks again,
    BabaG

  • How do you sort Pics in Smart Folder? Photos App

    How do you sort pics in a smart folder in the Photos App? Date, Name, etc.

    Yes, when I do that it sorts the albums in the folder by name.
    I may have misused terminology, I meant Smart Albums not smart folders, if this makes a difference.
    Thanks for your help!

  • How do I search within a smart folder?

    In OSX Snow Leopard, I was able to perform a search within a Smart Folder. Now when I try to do the same in OSX Lion, I get strange results that aren't accurate at all. I'm seeing files in the search results that aren't even part of the Smart Folder. It doesn't seem to be working. Is this another known bug in Lion?

    Let me walk you through the problem. If I navigate to a particular folder nd click in search it does not show the folder name:
    However if I start typing I get the option to search said folder. Than I just blank out what I typed so I can get everything in the folder and all of it's subfolders. Strangely, "Kind: Any" does not work. I had to set it to documents.

  • How do i finish this question?

    hello, I have an assignment due today, but after working for about 1 week, i could still not finish
    the question, since I am very new and lagging in class, as I am taking my time to understand the subject... Can anyone help me finish this assigment? reply me ASAP. Many thanks.
    Here is the question:
    4.1 The Student class
    Create a file called ' Student.java' and in it define a class called Student which has the following attributes:
    a String variable which can hold the student's name
    a double variable which can hold the student's examination mark
    Both of these variables should be declared 'private' so that their values can only be manipulated by methods inside the class.
    In the Student class, define public methods as follows:
    A constructor method which accepts no arguments. This method should initialise the student's name to 'unknown' and set the examination mark to zero
    A constructor method which accepts two arguments - the first being a String representing the student's name and the other being a double which represents their examination mark. These arguments should be used to initialise the state variables with one proviso - the exam mark must not be set to a number outside the range 0..100. If the double argument is outside this range, set the exam mark attribute to 0.
    A reader method which returns the student's name.
    A reader method which returns the student's exam mark.
    A writer method which sets the student's name.
    A writer method which sets the student's exam mark. If the exam mark argument is outside the 0..100 range, then the exam mark attribute should not be modified.
    A method which returns the student's grade. The grade is a String such as "HD" or "FL" which can be determined by the following table:
    Grade Exam mark
    HD 85..100
    DI 75..84
    CR 65..74
    PS 50..64
    FL 0..49
    4.2 Client code program.
    Write a Java program in a file called ' TestStudent.java'. Make sure you save this file in the same directory on your file system as the file ' Student.java'. In the main method of ' TestStudent.java', write code to do each of the following tasks:
    Create a Student object using the no-argument constructor.
    Print this student's name and their examination mark.
    Create another Student object using the other constructor - supply your own name as the String argument and whatever exam mark you like as the double argument.
    Print this student's name and their examination mark.
    Change the examination mark of this student to 50 and print their exam mark and grade.
    Change the examination mark of this student to 256 and print their exam mark and grade.
    4.3 Notes
    The program ' TestStudent.java' need not be complex as it is simply being used to test the operation of the Student objects. If you wish, you can make the program interactive (by using KeyboardReader), allowing the user to enter the name and exam marks, but this is optional.

    Actually I think that thread got rather confused at times and may not be the best use of your time.
    Post some of what you have done, point out the bits you are having trouble with and ask some specific questions. You'll get some helpful answers.
    If you really can't get started you need to go back to your tutor and ask for some extra tuition to get you sorted on the basics.

  • How do I disable automatically creating a folder when I drop a file in a folder?

    I've done this before, but I forgot what I did.
    When I drop a song in a folder, it automatically creates a subfolder with the other artist's songs.  I don't want that.  I want all of my songs in one folder without sub folders.
    It's really bugging me.  Please let me know if you need additional information.
    Please help.

    Hi there
    Personally, I'd do this by using an image as the zoom source. Then insert the highlight box object to dim the slide and insert the image again as just an image positioned where the zoom stopped and above the Highlight Box layer.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • FRM-92101 HOW I CAN FINISH THIS ERROR

    APPLICATION.LOG IS SHOWING BELOW MESSAGE WHAT I DO PLEASE HELP
    RGDS
    TAHIR
    06/08/06 13:20:49 formsweb: Forms session <19> aborted: unable to communicate with runtime process.
    06/08/06 13:20:49 formsweb: Forms session <19> exception stack trace:
    java.io.IOException: FRM-93000: Unexpected internal error.
    Details : No HTTP headers received from runform
         at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
         at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Thanks for all the problem is resolved
    Rgds
    TeeJay
    Message was edited by:
    TeeJay

    Hi TeeJay,
    On the other hand, you might first check whether there are any differences in you development and runtime environments.
    More specifically, I mean that if you have compiled your forms against a newer library set than the runtime environment uses, this could lead to the error message you mention.
    I have run into situations where pll files were actually used in the runtime environment, when running against a OC4J session on your PC. So, make sure you set the forms_path for both runtime and development exactly right.
    Also, make sure that your environment is 'clean': put all pll's and plx's into one directory on your PC, and set your forms_path to this directory only. Add object libraries or reference forms, if you use those, and place all your fmx-files into it, as well.
    Re-compile all you libraries and forms against this environment, and run your application.
    If the problem still persists, contact Oracle Support.
    Good Luck!
    Remco

  • Is there a way to open two color windows? I want to use both HSB and RGB sliders and have them side by side. If there isn't a way, how would I go about creating my own script for it?

    Here's an example of what I mean:
    http://i.imgur.com/Q5aiHvE.png
    I would have access to both RGB and HSB at the same time instead of constantly switching back and forth. Any input on this matter would greatly help thank you!

    Photoshop only has one Color Palette.  If you could script something  like a Color Palette with  two sets of active sliders the script would be in control till you dismissed its sliders dialog.  You would not be able to do anything but adjust the script's sliders in Photoshop while the script dialog window is being displayed.  Photoshop Scripting does not have real palette dialog type support.
    I do not know what is possible with Photoshop extensions using HTML 5 Panels.....

  • How do I resolve this error message - unresponsive script Script: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsProxyAutoConfig.js:123

    I receive this error message while viewing yahoo mail. It seems to slow the system. When i look in the error Console...the errors list is scrolling

    You can check the connection settings.
    *Tools > Options > Advanced : Network : Connection > Settings
    *https://support.mozilla.org/kb/Options+window+-+Advanced+panel
    If you do not need to use a proxy to connect to internet then select "No Proxy" if the default "Use the system proxy settings" setting doesn't work.
    See "Firefox connection settings":
    *https://support.mozilla.org/kb/Firefox+cannot+load+websites+but+other+programs+can

  • HT2500 How to create a folder in Inbox in Mail

    Can someone help me on how to set-up or create 'smart folder' ( not smart-mail box ) where I can move certain e-mails into specific folder. Tis helps to classify e-mails either by subject and refer accordingly.

    Under Mailbox there is a New Smart mailbox folder option. Don't know if this helps you.

  • Why is the folder strukture based on the import date, and not on the Creation date? How can i setting this?

    Why is the folder strukture based on the import date, and not on the Creation date? How can i setting this?

    What folder structure?
    If you're referring to how Aperture stores the originals in a managed library then the answer is you can't change it.
    If having the originals stored in a specific file structure is important to you you will need to switch to a referenced original setup.

Maybe you are looking for

  • I can change my apple ID for iPad, but my iPhone keeps an ancient one, and I can't change it.

    Several years ago I set up a password for AppleStore on my iPhone, but something's gone wrong and it doesn't work. The right solution seemed to be to get it to match my new iPad AppleStore password (which I guess is just my Apple password). System su

  • How to change font size (zoom),in Digital Edition (1.5)

    I tried to find a way to increase font size on while using Adobee Digital Edition. I can't find one! Could you advice me,please.Thanks

  • ITunes failing to open

    I'm starting to get this: Runtime Error! Program: C\Program Files\iTunes\iTunes.exe R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. Then this righ

  • Backing up WD My Book Duo

    HiI want to back up My Book Duo to external drive which I connected directly to My Book Duo via USB 3.0 in the back of the device.  I want to back up only the files on My Book, is there a way to do it?Thank you.

  • Sort files automatically to specified folders...?

    I am trying to find a way in which I can drag and drop a file onto a folder so that upon doing so, the file is automatically placed within a sub-folder of that folder based on its file type...To clarify, I have a folder on my desktop called 'Misc Stu