CaptureScreen failing

I have been trying CaptureScreen in many different ways and get the same result. Here is my current attempt:
CaptureScreen( Name:"/tmp/startupscreen" )
repeat with each item of files ("/tmp")
put it
end repeat

CaptureScreen( Name:"startupscreen" )
CaptureScreen "startupscreen"

and the current result:
Tue, 5/22/07 2:17:42 PM capturescreen (image not saved: unable to determine save directory)
cs_cache_lock_92
objc_sharing_ppc_4294967294
objc_sharing_ppc_9738
Tue, 5/22/07 2:17:42 PM capturescreen (image not saved: unable to determine save directory)
Tue, 5/22/07 2:17:42 PM capturescreen (image not saved: unable to determine save directory)

What do you suppose is the problem?
-edj

Comments

  • JonathanOSXJonathanOSX ForumAdmin admin
    I think that you are running those as a selection (and no log is available).

    I think it will work (it just did for me) if you put those into a script which is running "straight up".

    There is at least one bug in that the absolute path one should work when run as a selection, although the others wouldn't have anyplace to go.
  • Hmm. No, I'm running a script from the command line. I am running this on our linux-based scheduling tool so I thought maybe the idea of "/tmp/" might be confusing. That's why I have tried all those flavors. It's picking up the /tmp from the Mac, which makes sense to me. So it seems to me "/tmp/startupscreen" should work at least.

    Anyway - it is a script I'm running, not a selection.
    -edj
  • ToddTodd Member
    You may want to read this series of posts on macrumors...

    http://forums.macrumors.com/archive/index.php/t-185638.html

    It would seem likely that you have a link problem in /tmp directory. As super user, you want to relink if your /tmp/private is not linked to /tmp. Seems to be a well known problem.

    ln -s /private/tmp /tmp

    and see if that helps you out.

    Cheers
  • PamelaPamela Member
    Hi there!

    I was just able to reproduce that problem myself... on my old v3.3.

    Word on the street is that it was fixed for 3.3.1.

    Happy Capturing! :D
  • ToddTodd Member
    Artie,

    Would you mind spending a few minutes with me and step thru the reproducable error sequence. I wouldn't mind putting this into a regression test if it is duplicatable.
  • With EP 331, when I executed your snipped the startupscreen was captured in the script result directory, no errors were thrown, so looks like 3.31 may be an easy answer, I did run it in 2.22 and it also executed correctly, so perhaps it was broken in 3.3.
  • Thank you all for taking a look. The good news is, while trying to reproduce this with a simple case of my own, I determined my silly mistake was not having a connection to a SUT.

    Interactively in Eggplant worked because it had by chance some VNC connection open already. From the command line, that is not the case.

    I would like to suggest that in the future, the error message caused by trying to do a CaptureScreen when a VNC connection is not active should be:

    "Cannot find remote screen to capture."

    Rather than the current, just plain *wrong* error message:

    "image not saved: unable to determine save directory"

    Thanks again for your help.
    -edj
  • are the number one casue of hair loss among old programmers..great bug, and hats off to stepping up and fessing up as it will certainly get fixed, and the incorrect directory message will go back where it belongs.
  • PamelaPamela Member
    OK, I feel really silly...

    I thought about the SUT issue, and then said, "oh, well it's trying to do _something_"

    But the whole exercise did get me to update all the same. :)
  • Heh. Always make sure it's plugged in first! :)
    I make so many mistakes; it's become part of my learning process. And nothing drives the lesson home more than a little public humiliation. :)
    Hey, I used to work in support for the old Borland C++ product, so I feel your pain.
    I don't feel too bad because I think we all learned a little something here.
    -edj
  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    Well, you'll all be pleased to know that the error message has been *ahem* improved for the next release.

    Just for your information: The reason the CaptureScreen command doesn't just report that there's no connection (like most other commands do) is that it tries to allow you to capture screen shots even after a (previously open) connection has been lost (such as from a network failure). Unfortunately, this resulted in the rather misleading error message in this case. :( Fortunately, you brought it to our attention, so everyone will be happier when 4.0 ships. :)
Sign In or Register to comment.