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

Re: [Was: WPMac stalls during startup] Problem with background script

Expand Messages
  • John R
    ... if WP is not running: tell application WordPerfect to activate -- runs OnStartup, opens new document, brings app to front tell application WordPerfect
    Message 1 of 15 , Jan 23, 2012
    • 0 Attachment
      --- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:

      > So may I assume I'm right in thinking that there's no need to specify that OnStartup should run, because it runs anyway?

      if WP is not running:

      tell application "WordPerfect" to activate
      --> runs OnStartup, opens new document, brings app to front

      tell application "WordPerfect" to run
      --> runs OnStartup, opens new document, does not bring app to front

      tell application "WordPerfect" to launch
      --> loads app into memory but doesn't do anything else

      If WP is running, the launch and run commands do nothing; the activate command brings the app to the front.

      > Thank you again for this. I don't actually use this - I use WPDOS - but I enjoy putting this together as a mental exercise and public service.

      It's a great public service. Thank you.

      John R.
    • em315
      Thank you for this - it lets me sort out my script a bit more. I ll upload an improved version by the morning. The new version adds one more feature. It
      Message 2 of 15 , Jan 23, 2012
      • 0 Attachment
        Thank you for this - it lets me sort out my script a bit more. I'll upload an improved version by the morning.

        The new version adds one more feature. It occurred to me that it might be useful to shutdown SheepShaver in an orderly way by running a script in OS X that would tell SheepShaver to shut down.

        So I've written a script that will do exactly that with the WPMacApp, provided that the user hasn't quit the script that runs in the background in SheepShaver when it's running. A copy of the script is stored inside the WPMacApp. (Show Package Contents ->Resources->Files and copy the ShutdownWPMacApp application somewhere else.) When you run the ShutdownWPMacApp application in OS X, a few seconds later, the WPMacApp itself will shut down. All this, of course, is based on your method of using AppleScript to communicate between OS X and SheepShaver.

        --- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@...> wrote:
        >
        > --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
        >
        > > So may I assume I'm right in thinking that there's no need to specify that OnStartup should run, because it runs anyway?
        >
        > if WP is not running:
        >
        > tell application "WordPerfect" to activate
        > --> runs OnStartup, opens new document, brings app to front
        >
        > tell application "WordPerfect" to run
        > --> runs OnStartup, opens new document, does not bring app to front
        >
        > tell application "WordPerfect" to launch
        > --> loads app into memory but doesn't do anything else
        >
        > If WP is running, the launch and run commands do nothing; the activate command brings the app to the front.
        >
        > > Thank you again for this. I don't actually use this - I use WPDOS - but I enjoy putting this together as a mental exercise and public service.
        >
        > It's a great public service. Thank you.
        >
        > John R.
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.