Applescript "some" keyword

This Applescript line
open some file of folder "[folderPathName]"
displays a random-choice jpg from a folder containing only jpgs, and works well – except that it always chooses the same “random” files, starting with one particular file and then going through the exact same sequence of “random” selections every time.
Restarting the Mac resets the sequence. The first time this line is called after a restart, it begins with that same first “random” selection and goes through the same sequence.
Am I misundersanding the some keyword? Does it need a “seed” to make it fully random?
Thank you.

FIrst, try resetting the PRAM.  As far as I can think, the most likely cause of this effect would be that the system is seeding its random number generator with the exact same 32/64-bit integer at startup.  That speaks to something being off at a very low level, which a PRAM reset might shake loose.
If that doesn't solve the problem, could you explain precisely what you do to make this happen - i.e., give us the whole script (it it's not too long) and tell us how and when it gets launched?  There are only three other ways I can think of to get this effect, and they are all far-fetched:
You run this applescript so early in the startup process that the system hasn't been fully initialized.
You've added a bad or outdated third-party scripting addition that's interfering with the way applescript works.
You're running the command in a context that has (somehow) redefined the some keyword.
I'm betting on the PRAM thing, though, because everything else is a bit crazy.

Similar Messages

  • Text search returns results with some keywords, but not others

    This pertains to a tours website for Turkey. I've sucessfully
    set up a search form, and results page which returns results when
    multiple keywords are entered. Everything is working well, except
    when certain keywords are used. For example, the table column being
    searched for is called long_itinerary, so if anyone is interested
    in a certain site or city, it's bound to be in the long itinerary
    somewhere.
    Here's the problem, by example: When someone searches with
    the keywords Antalya, Konya, Ankara, or Adana, for example, results
    are returned from the database, and those keywords are in each
    returned tour's long itinerary.
    But certain keywords return nothing, even when they're in
    practically all of the tours, in the long_itinerary column. For
    example, Istanbul, Ephesus, and Izmir, Kusadasi and Pergamum return
    no results, even though they're there. I've gone through all of the
    most likely keywords, and these are the offenders. If, for example,
    I search with "Istanbul Ankara," I get results with tours including
    Ankara (and Istanbul, but only because the word "Ankara" is in the
    itinerary).
    First I made sure the Charset values were the same on the
    search form page and the results page. Still had the problem. Next,
    I went into the database itself, and copied the word "Istanbul"
    directly from the long_itinerary column of the database, and pasted
    it into the search function's text field, and searched again. Same
    problem--no results returned.
    I can't see any difference between the keywords which work
    correctly, and those which don't, what baffles me is that even when
    I copy a keyword directly from the database and paste it in the
    search text field, it returns no results!
    Well, I'm baffled! Any ideas what might cause this?

    Hmm -- one of my customers is a turkish building company
    (Kusadasi BTW), and when *they* add some contents to the DB,
    they´ll be entering turkish chars. It´s in particular the
    turkish "I" which is pretty different, and this is when a search
    for keywords containing a western "I" will fail.
    Could that be the problem in your case ?

  • Keyword Bugs and Some Keywording Improvement / Feature Suggestions

    Tagging Bugs and Some Improvement / Feature Suggestions
    Please excuse where I should use the word Tag or Keyword or vice versa!
    1.       BUG?    If a tag synonym is added or changed then all affected photos should be marked for re-publish.  I do not think this currently happens.   Should this possibly be considered a bug?
    2.       BUG?    When viewing a smart collection in a Flickr publish service and a new tag is added to a photo it is correctly moved to the “requires re-publish” section.   However … the thumb selection in the grid moves to the next photo, the loop view remains on the photo just tagged and the key wording still reflects the just tagged photo.    The selection shown in the grid appears to be wrong.      When working quickly this can result in tagging errors as the user looking on the grid believes he is working on the next highlighted photo in the grid.      This is surely a bug?
    3.       BUG?      A minor point and I realise this is probably not the correct way to do things … but a double word synonym entered with quotes for example “Ice Climbing” will create two tags “Ice” and “Climbing” at the flicker end of things.    Removal of this synonym and forcing a re-publish does not delete these two tags at the flicker end of things.    I may have miss-understood, but perhaps it is best for LR not to allow quoted tags? 
    4.       SUGGESTION      An easier and more powerful way to review tagging of current photos should be provided whereby it is possible to clearly see the current tagging of a photo and have immediate access to the keyword list at the same time to make corrections.    Having both the Keywording and Keyword List panels open in Library mode results in a lot of up and down scrolling for me and is a slightly inelegant UI in my opinion.   I would suggest it should at very least be possible to have the tags viewable in Loop info as an option - so long as no truncation is made and all tags visible.    Ideally a better way should be sought.
    5.       SUGGESTION      It would be very useful when reviewing tagging to select to show all photos in the currently selected folder or set which do not contain the selected tag.    Note, I don’t think this can be easily achieved by using a keyword filter and selecting all keywords and unselecting the tag of interest as the pictures may have many tags.    The same might be performed by textual based searches but this is inelegant and its slowness precludes a browsing approach.     For example – for me it would be useful to look at all my mountain shots in a trip which have not been tagged with “Glacier” and it will be immediately visually apparent where I need to make tagging corrections.    I would suggest a “Not” checkbox is made available on the top of each column in the library filter – this may also provide a great deal of power for other situations.
    6.       SUGGESTION      It would be useful to allow a means of showing all pictures with a certain tag but which have not been tagged yet with any children of said tag.   For example all pictures tagged with Glacier which I have not yet named the glacier by introducing a relevant child tag or selecting an existing child tag.    A similar situation occurs for wildlife and potentially many other scenarios … I would like to use a tag “Butterfly” which I can quickly use on my first pass… and then do the identification and child tagging on a second pass using appropriate filtering.   This allows for a step wise or “top down” approach to tag classifying things in a workflow.    I appreciate this can be achieved (as I do now) by using a child tag called “Unnamed butterfly” or “Unnamed Glacier” but it seems more powerful, elegant and generically applicable to be able to filter on a “not tagged with a child” basis.
    I apologise if I have missed the point on some existing functionality on any of these points and welcome any suggestions.

    This is a great post.
    I couldn't have written it myself better.
    I'm also in dying need of Korean input as I can't communicate with my Korean friends.
    But I second every point.
    I hope the tech teams are reading this.

  • I have two related keyword problems.  Some keywords get "broadcast" to every photo in an event.  It's almost impossible to delete these keywords from individual photos.  I select the keyword, hit delete and it reappears after a few seconds.

    I have two related problems with keywords in iphoto 11.  Sometimes, keywords get magically "broadcast" to every photo in an event or album.  It's difficult to delete these keywords.  If I select one and try to delete it it vanishes.  About half the time, it reappears again either in a couple of seconds or after I go to another photo and then return to the previous one.  When thios happens, I need to delete the keyword two or more times before it actually vanishes.  With several hundred photos in an event that all have a bad keyword, this is a tedious process.  I've tried rebuilding the library once, but with only the first (I think) option checked on the rebuild.

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Advise appreciated for some keywording issues

    I've been working on the road for a while and have several catalogues set up. The main one on my desktop iMac has many of the hierarchies set up correctly
    iMac
    jockeys
    fred
    kevin
    horses
    Desert Orchid
    Zenyetta
    etc
    but I made the mistake on my laptop of not setting the hierarchies up correctly
    on the laptop  
    kevin
    fred
    Bert
    Sam
    jockeys
    horses
    Desert Orchid
    Zenyetta
    etc
    When I copied the laptop catalogue to my imac, I realised I have a problem
    Desert Orchid
    kevin
    fred
    Bert
    Sam
    jockeys fred
    horses
    Desert Orchid
    Zenyetta
    For example,
    As Fred was already in the original catalogue and in the correct hierarchy, he's now appeared twice, as does Zenyetta, and others many others.....
    I now have about 120 horses scattered across the "root" and the correctly keyword folder / category what ever and a few less of the mess of the jockey.
    It is simple (hmmm) to select all the images tagged Fred in the root keyword, and then select them all and tag them with the
    jockeys fred
    keyword and then remove the
    fred
    from the root, thus correctly updating the keyword, however, its very cumbersome and so far I've wiped all the keywords from the images of 2 jockeys from my correctly keyworded keyword collection (UNGH) due to getting confused over what I was doing.....
    Is there a more simple way to select and drag around keywords into new hierarchies reducing the risk of more deletions of keywords from images?
    I've commented on a keyword improvement thread (link) in the new forums for suggestions etc, but that does not help me at the moment.
    Any suggestions would be muchly appreciated.
    Hamish
    http://feedback.photoshop.com/photoshop_family/topics/better_keyword_management/replies/60 07860

    Hmmm.. Well, my suggestion proabably isn't the best, but...
    First, fix the keyword structure on your laptop. Just drag the keywords around, you don't have to select/deslect the images.  Then re-do the import, but don't include negatives.  It *should* update the meta tags and update all your keywords to match what you want them to see without losing them all.
    If that's not an option, then (if you don't know about this method) if you hover over the keywords in the panel to the right, you'll see a little arrow pop up on the right.  Click that arrow, and it will filter all of the images based on that keyword.   Then just scroll down to the correct keyword, and click on the box to the LEFT of the keyword (still on the right panel), and it will add that keyword to all those images.  Then scroll back up (if necessary!) and uncheck (by clicking on the check box) of the one you don't want.  Gone.  Then remove the old keyword from your listing.
    Cheers!

  • Some keywords not being exported

    What's going on with keywords not being exported. The "will export" list of keywords seems to have a mind of its own.  What's going on and how can one add to the "will export" data?

    I have been having similar issues. Specifically with keywords randomly disappearing and applied keywords in Lightroom not following through to Bridge. I have no advice but just wanted to let you know you're not alone with keyword issues.

  • IPhoto 11 deleting some keywords

    Hi all,
    Yesterday I started trying to add keywords to my photos in iPhoto. It went well for about 100 photos, then started getting a bit wonky.
    If I added keywords a, b, c, d to a photo and then clicked outside the keyword box (say, to add location data, which was not doing well with batch editing), 2 of the keywords would just disappear. It was the same two keywords for every photo. I'd have to go back and add them again and then they'd stay.
    Any idea what's going on there?

    I applied the keywords (2 of them twice to make them save) to a photo.
    I exported it to my download folder, making sure it was a jpeg and that the "titles and keywords" box was checked.
    I exported a few photos that would require the same keywords (but had none) to the download folder.
    I closed iPhoto, then reopened it holding down the option key. I made a new library and then imported the file with the keywords and the other 3 without.
    I added keywords to the other 3 photos in this new library.
    For two photos, I added the keywords from the grid view (all 4 photos were on the screen) and the same behavior occurred - those two keywords disappeared as soon as I clicked out of the box. For one photo, I needed to add a face and when I did so, it enlarged that photo to fill the screen. I added the keywords while it was the only photo on the screen and it took all 4 keywords without deleting any.
    I reproduced this in the original library as well. It will add the keywords if that's the only photo on the screen, but will delete those two if I'm adding keywords to a photo that's in grid view.

  • Error number -1728 Applescript & some issues with spotToProcess

    I have been working on this script for weeks. Basically I would like to batch (using AS) illustrator files. (open, find spot colors, change to process, save, close). So far I'm able to open files but the part when is supposed to change them into process is falling giving me an error number -1728 from document 1 of document 1.  I tried to put as many --comments on the script
    I want to clarify my knowlege in AS is basic. What is this error? I search specifically for this error number with no success.  What I have was pieced together and modified from 2 scripts I found. I'm challenging myself with not too much success but If I don't to ask, I don't learn. Can you anyone guide me to a solution?
    property file_types : {"EPSf", "EPSP"}
    property file_extensions : {"eps"}
    --Would like just Illustrator eps files not Photoshop eps. How can you do this? currently if in the folder there are Photoshop eps files the script is opening those files
    set the_folder to (choose folder with prompt "Select the files containing Illustrator docs to change spot to process colors:")
    set the_images to get_folder_list(the_folder, file_types, file_extensions, true, false)
    if the_images = {} then
      beep
              display dialog "No valid Illustrator found in chosen folder." buttons {"OK"} default button 1 with icon 0 giving up after 10
              return
    end if
    on openLegacyFile(fileToOpen) --Open a file with automatic update of legacy text --(I found this in the ADOBE ILLUSTRATOR CS4SCRIPTING REFERENCE)
              tell application "Adobe Illustrator"
      activate
      open POSIX file fileToOpen as alias with options {update legacy text:true}
              end tell
    end openLegacyFile
    tell application "Adobe Illustrator"
      activate
      --set user interaction level of script preferences to never interact --Will ignore any dialogs when opening files. Currently NOT working with files with embedded color profiles I'm getting a message: Your current settings discard CMYK profiles in linked content but profiles were set to be honored when this document was created. Cancel/Continue
              repeat with the_image in the_images
      open the_image as alias
                        tell document 1
                                  set locked of every layer to false --unlock all layers
                                  set locked of every page item to false --unlock any page items
                                  set selected of (every page item) to true
                                  set spotColorCount to count of spots
                                  try
                                            set color type of (spots of document 1 whose name is not "[Registration]" and its color type is spot color) to process color
                                  end try
                                  if exists (swatches whose class of color of it is CMYK color info) then
                                            set t to (name of every swatch whose class of color of it is CMYK color info)
                                            my convertSpotSwatchesToProcess(t)
                                  end if
      --This is the part that is not working at all. It doesnt find any spot colors
    -- the results is --> error number -1728 from document 1 of document 1
      --set user interaction level of script preferences to interact with all --restore prefs
                        end tell
              end repeat
    end tell
    on convertSpotSwatchesToProcess(list_of_swatches)
              tell application "Adobe Illustrator"
                        tell document 1
                                  set replacementSwatches to {}
                                  set deleteSwatches to {}
                                  set cmykSwatches to every swatch whose class of color of it is CMYK color info and name is in list_of_swatches
                                  repeat with thisSwatch in cmykSwatches
                                            set swatchName to name of thisSwatch
                                            set swatchColor to color of thisSwatch
                                            copy {name:swatchName, color:swatchColor} to end of replacementSwatches
                                            set end of deleteSwatches to thisSwatch
                                  end repeat
      delete deleteSwatches
                                  repeat with thisReplacement in replacementSwatches
      make new spot at end with properties thisReplacement
                                  end repeat
                        end tell
              end tell
    end convertSpotSwatchesToProcess
    on get_folder_list(the_folder, file_types, file_extensions)
              set the_files to {}
              tell application "Finder" to set folder_list to every item of folder the_folder
              repeat with new_file in folder_list
                        try
                                  set temp_file_type to file type of new_file
                                  set temp_file_extension to name extension of new_file
                        on error
                                  set temp_file_type to "folder"
                                  set temp_file_extension to ""
                        end try
                        if file_types contains temp_file_type or file_extensions contains temp_file_extension then set end of the_files to (new_file as string)
              end repeat
              return the_files
    end get_folder_list
    -I'm getting this results get file type of document file "Black.eps" of folder "test" of folder "Desktop" of folder "user" of folder "Users" of startup disk --> missing value

    I'm using Illustrator CS4

  • Keyword search omits some results

    Mac OS X 10.8.5, Adobe Bridge CC 6.0.1.6
    I recently assigned keywords to hundreds of photo files. I am now finding that when I search on some keywords, the search results omit a number of files tagged with that keyword.
    For instance, I just searched for the keyword "People". In the Find dialog box, the search terms read:
    Look in: Bridged (the name of the folder containing the files I have so far keyworded.)
    Keywords contain: people (or People -- I've tried both ways)
    Match: if any criteria are met
    "Include all subfolders" is checked
    My "People" keyword is a top level keyword with several sub-keywords. Depite the fact that I do have "Include all subfolders" checked, none of the files keyworded "People" in at least one subfolder showed up in the results. Also, none of the files keyworded additionally "Venice" -- a second lever keyword -- showed up.
    Then I did a new search of my Venice folder, which contains 3 subfolders, using "People" as the keyword. At first nothing at all showed up in the search results. As I drilled down in the subfolder and/or keyword hierarchy, I was able to get results for some and then more, but they're still not all showing up!
    What's going on here and, more importantly, how do I fix it?
    Thanks!
    Beth

    The folders have to be indexed to be found.  May have to use search with "non-indexed files" so it will index everything.

  • How to get Keyword metadata from PDF's ?

    Hi,
    First of all apologies for perhaps stupid questions that I'm asking as I'm a AppleScript novice
    What I'm trying to do is to convert PDF documents to image files (.png or .jpeg), this I can easily accomplish using the Automators "Render PDF Pages as Images" action.
    The difficulty comes from that I also want to rename the generated image files (or PDF's before converting them to images) using part of the data that is contained in each PDF's Keywords metadata and for this I think I need to do some AppleScript coding (need to get and parse the Keyword metadata string for each PDF and then use the parsed data to rename files). Any ideas, hints or tips how this should be done using AppleScript ? (any websites / blogs where this kind of processing has been done ?)
    Appreciate a lot if you can help in this,
    Alan

    Hi Alan,
    Typing the following two lines in the Script Editor should list the metadata attributes for the choosen file:
    set F to choose file with prompt "Choose a PDF file:" of type "PDF "
    do shell script "mdls" & space & quoted form of POSIX path of F
    For more information on "mdls", open the Terminal window and just type “man mdls” (and return).
    Maybe you might also use the following AppleScript statement in case there were some keywords in the Spotlight comments field of the file:
    tell application "Finder" to return comment of F
    Message was edited by: Pierre L.

  • How can I integrate metadata and keywords in Lightroom with those in Photoshop, Bridge, and Photoshop Elements? In other words, is there a way to retrieve common metadata templates from all modules? Thanks!

    Keyword and Metadata Integration throughout Adobe Modules

    Thanks! That's helpful.
    What I mean by "common metadata", is a unified, updated, most current metadata, which I could update in each program. That is without overwriting the metadata, but appending new keywords to the metadata I created in the previous program.
    I use Bridge, then Lightroom and finally Photoshop. That's the regular workflow: Bridge for preliminary sorting and and adding some keywords; Lightroom for organizing and picking the best images; finally, Photoshop for processing. I got Photoshop Elements on trial. Doesn't work for my purposes.
    I need to share and update the metadata / keywords when I go from one program into another. Can't retrieve metadata I set up in Bridge into Lightroom. Same happens with Photoshop, where I can't retrieve keywords I add in Lightroom. It's tedious to write up the keywords again.
    Thanks for your efforts!

  • How can I search for files with more than one keyword?

    I´ve created some keywords, and some files in my folder are tagged with two, three or more keywords.
    Is there a way to search for files using more than one keyword on the search field?
    Thanks!

    Use the Find command (menu Edit) and in criteria at the right side is a plus sign to add another criteria and set it to your custom wishes.
    make a choice in results and you should be OK

  • How to load a text file int JEditorPane and highlight some words (Urgent !)

    I want to load a text file into a JEditorPane and then highlights some keywords such as while,if and else.I am using an EditorKit in order to style the JEditorPane. I have no difficulty while giving the input through the keyboard but lots of exceptions are thrown if i try to load the string from a file.

    Hi,
    I think the setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace) will solve the problem.
    You can create your own Styled Document and set it to the Editor Pane.

  • Lost Bridge CS3 keywords after upgrade to Leopard

    So I have have spent many, many man hours assigning keywords to images in Bridge CS3. I then recently upgraded the computer from OSX Tiger to Leopard (not Snow Leopard).
    I use Filters to get at the exact images that I am interested in previewing. The first indication that something is wrong is there is far too few hits for the filter I am executing. So I go into the whole image gallery and notice that the images that should have keywords no longer have them.
    Also, attempting to add keywords now fails. I assign one, go to another image, come back and no keyword assignment, gone.
    During the OS upgrade I saved all support files, including preferences. Those are there including some keywords from before but not all.
    Does anyone know how I can recover the other keyowords and how I can get the new ones to stick?
    Thanks so much, I am really shut down until I figure this out. My image Library is somewhere north of 35,000 images.

    This happened to me too. I spent hours keywording my images, and now almost all of them are gone! Oddly enough some pictures still have keywords left on them, but most does not. I can still find images with keywords through spotlight, but Bridge seems to not notice that they are there.
    Is there a way to manually make Bridge aware that these images does in fact have keywords?
    Edit: I forgot to say that I just upgraded to Snow Leopard.

  • Keywords in Adobe Bridge CS4

    I've been experimenting with Bridge's metadata functionality, and I'm confused about the relationship between keywords that are added to a jpeg in Bridge, and keywords that are added to a jpeg manually (outside of Bridge, by right-clicking file, Properties > Summary > Description > Keywords)? Are the keywords mutually exclusive of one another, or do they relate to the same piece of metadata?
    I added some keywords to a jpeg file and then closed Bridge. As expected, the keywords were picked up in Bridge when I re-opened the application, but the keywords were not visible by right-clicking the file and choosing properties > summary > keywords. Are the keywords supposed to be visible in the file properties or are the keywords stored in Bridge's configuration?
    I tried searching Google for an answer to this to no avail, so I thought I'd ask in here (Photography seemed to be the best place to post this thread, but apologies if this question belongs somewhere else).
    TIA,
    Mike

    They should be the same no matter where entered. If keywords are not viable in the thumbnail go to edit/preferences/thumbnails and make sure that keywords are checked as "additional lines of metadata".
    On my machine right click in CS3 and file info yields keywords. Right click in Windows and properties yields keywords also, but called tags in Vista.

Maybe you are looking for

  • Problem with query

    Dear all, I have this query which returns me the quantity received through inventory transfer window against quantity sent out through the same window. There can be multiple receipts against one dispatch (Jobwork) and the receipts are linked through

  • IMac 2013 and Windows 8.1 Connectivity

    Up until I installed Yosemite, I could connect my new Windows 8.1 computer to my iMac external hard drives. ( I have 5 of them hooked up to the iMac) and could access all of my files.) without a problem. Now I can't access not 1 one of them. I can ge

  • This is a system that works for me

    I'm not looking for anyone to respond to this post.  It's just that a lot of people have problems gettting Premiere CS4 to work on their computers, so I thought I'd post the specs of my system on which CS4 is working fine.  This is not an ultra high-

  • Why are my films not working :L

    why are my films not working the soung is all out off place and it is doing my head in can some one help me :L X

  • MSI K8N Neo2 Help!!!!!

    My system is running perfectly fine but some how the core cell utility keep beeping. Im not sure what is happending. Anyone have similiar problem? Here is the screenshot of my core cell reading.here