Newbie snapshot file saving question

I want to have Mullesight take a snapshot and place a JPG inside my "snapshots" folder on my desktop. The problem is that it keeps saving the same same file name and won't allow me to take more than one picture. I wish to have successive pictures named differently, such as picture1.jpg, picture2.jpg, etc., in my snapshots folder.
I copied a sample script from Mullesight's author to take a snaphot and save a JPEG file. How can I modify it so that I can do what I want?
Thanks for any help.
try
tell application "MulleSight"
-- save prior state
set shouldScale to should scale
set useSelection to use selection
-- now set what we need
set should scale to false
set use selection to false
-- AppleScript still uses old file/alias magic by default
-- therefore we have to use POSIX
set srcImg to (POSIX path of "/tmp/picture.tiff")
-- save the image as TIFF (other formats are not supported)...
save in srcImg as "tiff"
-- reset prior state
set should scale to shouldScale
set use selection to useSelection
end tell
-- just for the fun of it, convert TIFF into JPEG
set dstImg to (POSIX path of "/tmp/picture.jpg")
tell application "Image Events"
launch
set img to open srcImg
save img as JPEG in file dstImg with icon
close img
end tell
on error errorMsg
display dialog errorMsg
end try

Keep in mind that I do not have an 'iSight' camera.
Code portion that works, which assumes that the 'Picture.tiff' file is saved to current user's 'Desktop' and when converted is saves a 'Picture.jpg' ... 'Picturex.jpg'' where 'x' is 1 or higher in numerical value.
property inc_Value : 0
property file_Name : "Picture"
set desktop_path to ((path to desktop folder from user domain) as string)
set file_Path to (desktop_path & file_Name)
tell application "Finder" to set desktop_List to name of every file of folder desktop_path whose name extension is "jpg"
set newFileName to my handlerepeats(desktopList, "")
try
tell application "Image Events"
launch
set img to open ((file_Path & ".tiff") as alias)
save img as JPEG in file (desktop_path & newFileName & ".jpg") with icon
close img
tell application "Finder" to delete ((file_Path & ".tiff") as alias)
end tell
end try
on handlerepeats(localList, local_Inc)
if (local_List contains (file_Name & local_Inc & ".jpg")) then
set inc_Value to inc_Value + 1
my handlerepeats(localList, (inc_Value as string))
else
set inc_Value to 0
return (file_Name & local_Inc)
end if
end handle_repeats
Total code ...
property inc_Value : 0
property file_Name : "Picture"
set desktop_path to ((path to desktop folder from user domain) as string)
set file_Path to (desktop_path & file_Name)
try
tell application "MulleSight"
-- save prior state
set shouldScale to should scale
set useSelection to use selection
-- now set what we need
set should scale to false
set use selection to false
set srcImg to (file_Path & ".tiff") -- or, you may have to use the next line instead.
-- set srcImg to (POSIX path of (file_Path & ".tiff")) -- use if the above line fails.
-- save the image as TIFF (other formats are not supported)...
save in srcImg as "tiff"
-- reset prior state
set should scale to shouldScale
set use selection to useSelection
end tell
tell application "Finder" to set desktop_List to name of every file of folder desktop_path whose name extension is "jpg"
set newFileName to my handlerepeats(desktopList, "")
try
tell application "Image Events"
launch
set img to open ((file_Path & ".tiff") as alias)
save img as JPEG in file (desktop_path & newFileName & ".jpg") with icon
close img
tell application "Finder" to delete ((file_Path & ".tiff") as alias)
end tell
end try
on error errorMsg
display dialog errorMsg
end try
on handlerepeats(localList, local_Inc)
if (local_List contains (file_Name & local_Inc & ".jpg")) then
set inc_Value to inc_Value + 1
my handlerepeats(localList, (inc_Value as string))
else
set inc_Value to 0
return (file_Name & local_Inc)
end if
end handle_repeats
  Mac OS X (10.4.4)  

Similar Messages

  • Big file saving question.

    Dear all,
    I am writing a foto ablum application in RIA.I want to save
    all the fotos in bytearray,and then save it as a file in user's
    computer,so that the user can open their file to retouch without
    downloading or uploading.
    Question is that I afraid if the fotos' filesize is too
    big,it may make an error such as "out of memory".
    What should I do,please?
    Thank you!

    I hope you try to say AIR instead of RIA. (bcuz RIA means
    rich internet application = any asyn applicaiton including ajax
    etc)
    If you try to make it as a RIA application (which means it
    runs in a browser), you can not touch to client's file system so
    you need to send the data to server to make it downloadable.(any
    php script that will get the bytarray, return an image would work
    for this case)
    for the AIR case, you dont need to worry for the file size
    unless the user does not have enough space.

  • Aperture newbie - library / file folder question

    I am still trying to figure out the best way to use aperture to organize my work and even after reading the documents, I'm confused about why it stores things the way it is and what other options would be of benefit.
    With iPhoto, everything was stored in the iPhoto library. With they way Aperture is set up, I still have an Aperture library "file" that is 6.x gig but all my files are being stored in the pictures folder under their own folder names. I was under the impression all pictures were stored in the library file like iPhoto did. I'm assuming I just have something set differently.
    So if that is the case and I can store all my images in the Aperture folder, what is the advantage of doing that versus they way its storing all of them now? Is one way better than another? Any opinions?
    Thanks.
    Matt

    On a laptop or on an iMac you probably do want to manage by Referencing image Masters. Hard drives slow as they fill, so at some point - perhaps immediately - you will want your Masters on one or more external Firewire 800 hard drives. OWC <http://www.owcomputing.com/> has good Firewire 800 solutions.
    With Referenced Masters, simply Finder-copy each new batch of images to the external hard drive and eject the camera card. Then (after backup of images) from within Aperture Import the images by Reference (when you go to import, on the right hand side of the import window select "Store files in their current location").
    Existing images on your hard drive can similarly be imported selecting "Store files in their current location" however personally I would move the originals to an external drive prior to importing into Aperture because trying to keep originals on the single iMac or laptop internal drive will sooner or later overfill the drive.
    During the import process is also a good time to assign all manner of keywords, so take some time in advance thinking about keywording.
    A good rule of thumb is not to fill any drive more than 70%, and for best speed keep important drives no more than 50% full.
    Good luck!
    -Allen Wicks

  • File saving question

    Hi all,
    I am not too familiar with how to get a set of data save into txt file format. The following attachment is my vi (is a bit messy) and a screenshot on where I want the data to be save is also attached.
    It would be extremely grateful if someone could kindly offer some help.
    Thanks a lot,
    Adi
    Attachments:
    write to file.png ‏169 KB
    Work1_v2.vi ‏1168 KB

    Hi Adi,
    You can go through the example which I have attached. This may be the solution you are looking for. You can use shift registers if your data to be written into the txt file is continuous. Or also you can use a true constant on "append to file?" ternminal of write to spreadsheet function. 
    Regards,
    Nitzz
    (Kudos are always Welcome, Accept as a solution if it is the One)
    Attachments:
    Untitled 1.vi ‏7 KB

  • Files saved to NFS share by MS word cause finder to loose sync w/filesystem

    I am posting this bug report(#4699323, opened Aug 24th, 2006) I have open with Apple because there is no indication that they have even noticed it. Please reply if you have similar problems, questions, or suggestions. Bug report follows.
    24-Aug-2006 04:17 PM Erik Meitner:
    Summary:
    Files saved to an NFS volume by Microsoft Word dissappear from the Finder. Many times "Ghosted" icons of "Word Work Files" are left behind.
    Steps to Reproduce & Actual Results:
    1. Mount an NFS volume from a server(Mac or Linux, doesn't matter. NFS options do not matter.) from the Finder or command line.
    2. Open a Finder window to the mount point.
    3. Create a word document(test.doc), save to the NFS mount point.
    4. Make sure both the Word window and Finder window are visible.
    5. Type a single letter, Save.
    6. "Word Work File L_200098113"(the number varies.) apears and test.doc dissapears from the folder. Then the icon for "Word Work File L_200098113" goes "ghosted" (test.dc IS still there, just not shown. You can verify this in the shell )
    7. Type a letter, Save.
    8. The work file dissapears and is replaces by "Word Work File L_200098113"
    9. Rinse, Repeat ad infinitum.
    Expected Results:
    File saved & Finder does NOT get out of sync with the filesystem.
    Regression:
    * Only happens on NFS volumes.
    * Only happens with MS Word.
    * It happens on Panther(10.3.9) and Tiger(up to 10.4.7)
    * "Fast saves" in Word has no effect.
    * The user has full access to the root of the NFS volume.(a .TemporaryItems folder IS being created)
    * Verified that problem happens with all Versions of Office 2004 from 11.2.3 to 11.2.6(current).
    * Happens with ALL users: admin, local, and non-local(LDAP authenticated, network homes).
    Notes:
    * The work files(with "ghosted" icons) never show up when listing the folder via the CLI.
    * The original(test.doc) always shows in the CLI.
    * Relaunching the Finder usually causes the "missing" files to show again, but not always.
    * Problem is exacerbated by users losing faith in the system, thus saving very frequently, guaranteeing that the problem will always happen.
    * Only workaround is to have users work on files "off the network" on a local disk.
    30-Aug-2006 01:45 PM Erik Meitner:
    Screen shot attached showing initial state of Finder.
    '1.tiff' was successfully uploaded
    30-Aug-2006 01:46 PM Erik Meitner:
    Screen shot attached showing state of Finder after 1st save.
    '2.tiff' was successfully uploaded
    30-Aug-2006 01:47 PM Erik Meitner:
    Screen shot attached showing state of Finder after 3rd save.(2nd save same as 1st)
    '3.tiff' was successfully uploaded
    01-Sep-2006 08:37 AM Erik Meitner:
    Relaunching the Finder will restore the icons to the proper state most of the time. One can also use this application to force a refresh of a folders contents: http://www.brockerhoff.net/nudge/index.html
    I am not sure of the internal workings of "Nudge", but it does seem to be the best hack available to get the Finder to work properly.
    01-Sep-2006 08:48 AM Erik Meitner:
    I should also add that this problem is repeatable on 15 different Macs of different models, all running 10.3.9 with the latest updates.
    11-Sep-2006 12:41 PM Erik Meitner:
    Problem is repeatable on all 6 of our Machines running Tiger(10.4.7) with all the latest updates.
    20-Sep-2006 02:25 PM Erik Meitner:
    The "Nudge" tool mentioned previously does not always work especially for some users who experience this problem the worst. It will only restore the file to a "ghosted" icon that is still inaccessable.
    Moving the file to a different folder and deleting the resource fork file is the only solution in this case.

    OS X 10.4.8 update has not altered the behavior of this bug. The Office 2004 11.30 update seems to have caused the problem to happen less frequently. I would say it now happens half as frequently.

  • PSD files saved in TemporaryItems has disappeared.

    Ahhhhhhhhhh PSD files saved in TemporaryItems has disappeared.
    Hi I was working in Photoshop CS5.1 (OS X 10.7.5) and the original image I started with was saved in TemporaryItems, long story short I spent 4 hours working on an illustration and saving the .psd files\ versions in the same TemporaryItems folder, planning to move all the files tonight. Just came back to it and the files are gone! I may cry pixel tears, desperately running out of swear words.
    If anyone can help I would be so very appreciative.
    Cheers Matt from Melbourne

    Silly question, but, are you sure that's where Photoshop was saving? I've had it happen before where I open a file from folder A, then do a Save As, only to find that (for whatever reason) Photoshop has been saving to some other folder entirely.
    Have you tried Open Recent Files in photoshop to see if maybe they were saved somewhere else?
    Or, try this; go to Photoshop, create a blank document, then immediately Save As and look at where it's pointing. If it is not at the Temporary folder you expect, look there for your files.
    Failing that, have you tried a search on your computer?
    Silly. But I'm trying to cover all the bases.
    --OB

  • Photoshop Elements 11 file saving proterties

    I am currently using Photoshop Elements 11 trail version to decide if I like it enough to upgrade.
    Yesterday, while saving my files - .jpg, .png, psd - etc - when I'd go to access the file to upload, it wouldn't recognize the file.
    Then when I went back into PSE 11 to open the file, it wouldn't recognize the file format, no matter what
    I have went ahead & uninstalled the program, then restarted my computer, reinstalled & it's doing the same thing.
    If this is a known issue, I certainly have no desire to upgrade. I use PSE 8 previously with zero problems.
    Please, if anyone can answer why this is happening, I'd really appreciate it.
    As for PSE 11 - I do feel, aside from this file saving issue, Adobe got so many things right - I love how PSE 11 has been changed, it's much easier to use, but this file issue, I don't have time for it when my clients are expecting turn around times from me.
    Thanks much!
    Tori

    Thank you for all your responses.
    First let me start off with, I am not new to saving files. I've been designing & saving files for over 10+ yrs. I've never ran into this problem with any program until using PSE 11. All my files were saving perfectly fine. This problem just started yesterday with PSE 11 for me. That's why I uninstalled, restarted & reinstalled with a restart after the install.
    When I go to save a file, these are my steps
    1. File
    2. Save as
    3. Name of the file (no characters - only using letters, maybe letters & numbers in combination together)
    4. I select what format I wish to save it in.
    5. Click save
    When I did this yesterday, my files were appearing to save, but actually, they were not saving no matter what format I was trying to save that as.
    How I found out this was happeneing - I went to upload a file to the web - I was then told the file was not a proper file format. I tried various things such as saving as a png, jpeg, tiff, gif - not of which were working. That's when I uninstalled PSE 11 & as said above, reinstalled, etc.
    Screen shot below shows what the icons ended up being - problem right there!
    What message I get when I try to open the file
    Message I get when I try to upload the file to the web
    This is WHY I feel this is a problem with the particular PSE 11 I'm using (downloaded directly from Adobe's site) It's a trial vertson. And I always try to try programs before I invest in them, no matter if they're $20 or $500
    I hope all this will help thos of you trying to answer this mystrey question for me. As I mentioned, I've never had this happen before.
    Today - it seems to be saving just fine..... and I haven't changed how I save files at all. If this is a known issue with PSE 11, I just wish to know so I don't waste my money on it. I love all the changes Adobe has made to PSE 11, but if it's full of bugs - I'd rather pass is all.
    Thanks so much once again!

  • Document file saving confusion using desktop "alias" folder

    I'm having trouble finding files in Snow Leopard. My question is , where are "saved" document files supposed to go?
    I like using a desktop alias folder, but over time I've played around with Time Machine, adding and deleted folders in the Dock, and created three or four different alias folders and basically I've screwed the pooch; there are now non-duplicate folders named "User Name" and "User Name 2"  (plus the  empty "Documents" sub-folder I've heard is a place holder for older software files ?) on the HD and I don't what is where the new files are being saved.
    In any case, I may have two, three or even four sets of partial documents, so I need to do some work moving files around, trashing some and condsolidating the rest into the master Documents file ... but before I go through all that I need to make sure I understand where the OS wants saved files to go.
    Is this path correct ? MS Word > Save > Documents Alias Folder > HD > Users > User Name > Documents.
    If that's correct, then I can go to the various Word 2011  forums and find out how to make sure files are being saved using that path.
    Thanks,
    Brian

    Stuffit's default is to decompress files saved to the desktop.
    Pages documents are actually zipped folders.
    Look in the Stuffit preferences and see if you can turn it off. Or get out of the habit of saving to the desktop, there are better places to organise your work
    I disagree that Stuffit is useless, in fact it really is the swiss army knife of decompression and pays to have it around. Amongst other archive utilities.
    Peter

  • PDF or Excel file saved to Network folder Intermittently has "Date Modified" changed to an older date

    Client saves files locally to her Win 7 64-bit laptop and they are fine when it comes to the date modifed stamp. On occasion a few of these files each day, when saved to the home directory on the server, get the Date Modified stamp changed. Time is never
    the same and can be set for las tweek or - literally - 1990, 2004, 2010, etc. I have seen tech articles talking about the different options for saving the file date based on an embedded image or attachment of some type, but that has been ruled out. And this
    is not the local saved file time being modified within the first minute or two of a locally copied file.
    Any ideas how a file saved to a network share can randomly and intermittently have the date modified to a much older date? Have scanned for malware as well.... Thanks!

    Hi
    Make sure the server or nas where it's saved is sync'ed with it,s time source, and be sure it's update for the OS's patch.
    Regards, Philippe
    Don't forget to mark as answer or vote as helpful to help identify good information. ( linkedin endorsement never hurt too :o) )
    Answer an interesting question ? Create a
    wiki article about it!

  • I saved my completed rendered video in Publish and Share as an MP4, but where is the file saved to. I set it to be saved on my desktop, but I don't see it. thanks

    I saved my completed rendered video in Publish and Share as an MP4, but where is the file saved to. I set it to be saved on my desktop, but I don't see it. thanks

    markg
    What version of Premiere Elements and what computer operating system? You have a few other threads awaiting follow up, and consequently that information
    is not available elsewhere.
    What is your specific export...
    Publish+Share
    Computer
    AVCHD
    and Presets = MP4 - H.264 1920 x 1080p30 or something like that.
    Specific please.
    But what specifically are you entering in the Save In: field of the dialog that includes the Save button to initiate the export process.
    Are you saving it as a file to the Desktop or to a specific folder on the Desktop? Have you given the export a distinctive file name?
    The screenshot shows the Save In: to the Desktop as a file.
    I have no idea of your background with the program, so I ask these questions so as to take nothing for granted.
    If the computer Desktop is crowded, as mine often is, it is easy to have difficulty spotting a file save to the Desktop.
    We will be watching for your follow up.
    Thank you.
    ATR

  • I did a backup from all my files saved in old external hd to time capsule. After that double checked and recover one file from TC to mac air and it worked just perfect. Today went through TC to recover another file and none of them were there?

    I did a backup from all my files saved in old external hd to time capsule. After that double checked and recover one file from TC to mac air and it worked just perfect. Today went through TC to recover another file and none of them were there?Anybody has a clue what happened?

    renatocremonese wrote:
    I want to use it for backing up my Mac.
    It's good for that . . . 
    But also I don't keep all my stuff in my Mac.
    But not for that. 
    This older and not day-by-day usage files I want to store in the time machine.
    You can do that (see below), but how are you going to back them up?   If your only copies are on the TC, when (not if) it fails, you risk losing your only copy of the data.
    Is it possible to split TC in two partitions.
    No, but there are some workarounds, including making a fixed-size disk image on it to "reserve" some space.  See #Q3 in Using Time Machine with a Time Capsule.
    But you still won't have backups of the stuff you put there.
    You don't say what kind of Mac you have.  If it's a desktop model, just keep the external HD connected to it, and let Time Machine back it up along with your internal HD.
    However, it sounds like you may have a laptop, where that's not going to be convenient.  In that case, your best bet might be to copy the external HD to a disk image on the TC as above, then keep the HD in a safe place.
    To finish, when i enter the TC and go through the Time line how can I get a file from there and move it back to Mac hd.
    Via the "Star Wars" display, per #15 in Time Machine - Frequently Asked Questions.
    You might also want to review the Time Machine Tutorial, and perhaps browse the rest of the FAQ.

  • How to retrieve pdf file saved in icloud drive from iphone

    how to retrieve pdf file saved in icloud drive from iphone or ipad

    Hi henawybek, 
    Welcome to Apple Support Communities. 
    Take a look at the article linked below, it provides answers to frequently asked questions about iCloud Drive and will help you solve your question.
    iCloud Drive FAQ
    You can access your files in iCloud Drive any of these ways:
    On your iPhone, iPad or iPod touch with iOS 8, you can use Apple apps like Pages, Numbers, and Keynote, or any apps that support iCloud Drive.
    I hope this helps.
    -Jason 

  • Feed files saved by labview directly to the matlab executables

    Hi All,
    I have 2 program 1) . Labview data acquistion program which saves the data in .Ask format into particualr directly of computer. 2). Matlab program(executable) which can take those files saved by the labview program and plots them with the analysis. Now these are two separate program, I know I can call the Matlab exe from labview but I need to go that directory manually and find those files saved by labview . Is it a way by which I can directly or automatically  feed those files to matlab exe without manually going to that folder.Please let me know.
    Thanks,
    Ankit G

    I don't know. Can you? That's a Matlab question, not a LabVIEW question. Since you are calling a Matlab executable then presumably you can pass it command-line switches to indicate a file to load. If there are, then add that to how you're calling the Matlab executable. Which, presumably, is via System Exec.

  • A Few Newbie 10.8 Server Questions...

    Hi All,
    A few quick newbie 10.8 Server questions:
    1) Airport Extreme - I currently have an Airport Extreme attached to one of my workstations which is serving as my main router with a dedicated IP. I'm just in testing mode with my new server and wondering if I need to do anything to the Airport's configuration to make it work with the Server? Does the Server need to administer the functions of the AirportExtreme? Or is it ok to leave it attached to the workstation? Or does it not make any difference?
    2) Automount Shared Folder/Drive - I would like my users (who are mostly using MacBookPros with they take home and bring back to work) to be able to Automount our shared data drive when they come in to work. I read the help section regarding AutoMount, but it a) referred to using ServerAdmin, which I understand has been eliminated from 10.8 (dont know why they are still referring to it in the help!) and b) it talks about AutoMounting Home Folders, but not shared Drives/Folders.
    3) Firewall - I have a static IP and want my users to be able to connect using VPN. I am buying a SSL for the domain. Wondering if the combination of the built in firewall, plus the SSL, plus the built in VPN is secure enough, or should I be investing in a solution such as the SonicWall TZ100.
    Thank you !!!!!

    1) Airport Extreme - I currently have an Airport Extreme attached to one of my workstations which is serving as my main router with a dedicated IP. I'm just in testing mode with my new server and wondering if I need to do anything to the Airport's configuration to make it work with the Server? Does the Server need to administer the functions of theAirportExtreme? Or is it ok to leave it attached to the workstation? Or does it not make any difference?
    The Server app is not required to manage your airport.
    The server app can automatically open ports for you, so it makes life easier for a home-server-administrator.
    Continue managing your Airport or whatever NAT router you prefer any way you choose.
    2) Automount Shared Folder/Drive - I would like my users (who are mostly using MacBookPros with they take home and bring back to work) to be able to Automount our shared data drive when they come in to work. I read the help section regarding AutoMount, but it a) referred to using ServerAdmin, which I understand has been eliminated from 10.8 (dont know why they are still referring to it in the help!) and b) it talks about AutoMounting Home Folders, but not shared Drives/Folders.
    You can drag a mounted sharepoint to the right-side of a user's dock.
    It will then remember the sharepoint, and its 1-click to open it when needed,
    This is my preference with laptops.
    You can also add the sharepoint to your user's login items (on their workstations, System Prefs, UsersGroups/, User, Login Items - I don't like to do this with laptops because it causes a login delay when they aren't in the locaiton of the sharepoint.
    Either method is simple.
    I even use Safari bookmarks to get people to a server. Go to the addressbar and type:   afp://[email protected]   (with your real IP) then bookmark it. You can also drag that that URL to the desktop to have a location file which will ALSO take you to the server.
    So Lots of ways...  Depends on users/environment.
    3) Firewall - I have a static IP and want my users to be able to connect using VPN. I am buying a SSL for the domain. Wondering if the combination of the built in firewall, plus the SSL, plus the built in VPN is secure enough, or should I be investing in a solution such as the SonicWall TZ100.
    If you aren't going to have anything except for VPN open to the public, then you won't need SSL.
    VPN, but nature, is already encrypted and does not use SSL.
    If you will run Mail, Web, Calendar, Contacts, etc and don't want to requires users to VPN, then you should use SSL.
    TIP: Fromt the start, use a fqdn for your server. Don't use a .private or something fictitious.
    If you own mydomain.com, then setup myserver.mydomain.com and make it your server's hostoname from the get-go.
    Later, you'll be glad you used a proper FQDN
    Jeff

  • I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    Hold down the Option key while you boot your Mac. Then, it should show you a selection of devices. Click your flash drive and it will boot from that.

Maybe you are looking for