Loading ...
Sorry, an error occurred while loading the content.

A warning about multiple copies of SheepShaver

Expand Messages
  • ted_m_p_lee
    For those (probably very few) for whom it matters, having more than one copy of SheepShaver (e.g., different builds) on the same system is confusing to OS X.
    Message 1 of 3 , Apr 24, 2013
    • 0 Attachment
      For those (probably very few) for whom it matters, having more than one copy of SheepShaver (e.g., different builds) on the same system is confusing to OS X. John's startup script (which we've talked about before) has the line <tell application "SheepShaver" to activate>. If you have more than one copy of SheepShaver, even if in different home directories, it is problematical which one will get activated. Even changing the name didn't completely fix the problem (I suppose because the name "SheepShaver" is in a property list.) What I did to make sure only the one I wanted got activated was to compress the other two I happened to have around. It was only by accident that I discovered what was going on -- for purely aesthetic reasons I changed the icon on what I thought was the copy I was using. When I ran the startup script SS got started, but it had the old icon. It took a little experimenting to figure out what was going on. I suppose there is a way to write the Applescript so it always finds the "right" version (i.e., the one in <home>/Applications/SheepShaver folder)

      I suspect the problem hasn't been noticed in the Emaculation forum because if you start up SS by selecting the app or an alias to it, you get the one you selected. It's only when you use a script in which "SheepShaver" is ambiguous that there's a problem.

      Ted Lee
      Minnetonka, MN
    • sardisson
      I kept meaning to reply to this, but kept never thinking about it when I had time and was near the computer :P ... That s strange, because typically renaming
      Message 2 of 3 , May 1, 2013
      • 0 Attachment
        I kept meaning to reply to this, but kept never thinking about it when I had time and was near the computer :P

        --- In wordperfectmac@yahoogroups.com, "ted_m_p_lee" <tmplee@...> wrote:
        >
        > For those (probably very few) for whom it matters, having more than one copy of SheepShaver (e.g., different builds) on the same system is confusing to OS X. John's startup script (which we've talked about before) has the line <tell application "SheepShaver" to activate>. If you have more than one copy of SheepShaver, even if in different home directories, it is problematical which one will get activated. Even changing the name didn't completely fix the problem (I suppose because the name "SheepShaver" is in a property list.)

        That's strange, because typically renaming works. Except maybe the script has already stored the alias to the (un)desired copy since you've run the script once.

        > I suppose there is a way to write the Applescript so it always finds the "right" version (i.e., the one in <home>/Applications/SheepShaver folder)

        Yep. Instead of

        tell application "SheepShaver" to activate

        one writes

        tell application "/full/UNIX/path to/desired/SheepShaver.app" to activate

        So, for your example above, the path is "/Users/tedsusername/Applications/SheepShaver folder/SheepShaver.app"

        This is not standard practice (and is frowned upon) for a reason when writing AppleScripts, but for individual use and in certain situations, like this one, it's a valid solution. So you can edit your copy in that manner, should you desire.

        Hope this helps!

        Smokey
      • ted_m_p_lee
        Thanks. Although, as you sort of point out, if you want the script to work no matter where the target application is, you can t hard code the path. As to
        Message 3 of 3 , May 2, 2013
        • 0 Attachment
          Thanks. Although, as you sort of point out, if you want the script to work no matter where the target application is, you can't hard code the path. As to finding the wrong one, I noticed when I was working on another script and misspelled the target of an "activate" that the script editor looked for the target before it tried to save the script, so I can see how renaming might not work. (If you look inside an app you'll find the app's short name in several places on the main property list -- I vaguely remembering reading somewhere how launch services uses those.)

          --- In wordperfectmac@yahoogroups.com, "sardisson" <smokey.ardisson@...> wrote:
          >
          > I kept meaning to reply to this, but kept never thinking about it when I had time and was near the computer :P
          >

          > > I suppose there is a way to write the Applescript so it always finds the "right" version (i.e., the one in <home>/Applications/SheepShaver folder)
          >
          > Yep. Instead of
          >
          > tell application "SheepShaver" to activate
          >
          > one writes
          >
          > tell application "/full/UNIX/path to/desired/SheepShaver.app" to activate
          >
          > So, for your example above, the path is "/Users/tedsusername/Applications/SheepShaver folder/SheepShaver.app"
          >
          > This is not standard practice (and is frowned upon) for a reason when writing AppleScripts, but for individual use and in certain situations, like this one, it's a valid solution. So you can edit your copy in that manner, should you desire.
          >
          > Hope this helps!
          >
          > Smokey
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.