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

WP-L-Digest 2004/12/06 #951

Expand Messages
  • jrethorst@post.com
    Message Number: 1 Date: Sun, 28 Nov 2004 18:44:49 -0500 From: Edward Mendelson
    Message 1 of 1 , Dec 21, 2004
    View Source
    • 0 Attachment
      Message Number: 1
      Date: Sun, 28 Nov 2004 18:44:49 -0500
      From: Edward Mendelson <emendelson [email address protected]Subject: An
      AppleScript to move the dock when WP is running

      I like to keep the OS X dock at the foot of the screen - except when
      I'm running WPMac. Then I want it at the right edge. So here is an
      AppleScript that moves the dock to the right, launches WP, and waits
      until WP is closed, and then moves the dock back to the bottom.

      Copy and paste it into Script Editor; change the first line to match
      the EXACT pathname of WP on your system. Click Compile to make sure the
      syntax is OK. Save the script as an Application, with the "Stay Open"
      box checked. Run the application.

      Do not run it from inside the Script Editor, because the "on idle"
      section will not run.

      If your dock gets moved to the wrong place and won't go back, use
      System Preferences, Dock, Position on Screen to get it where you want
      it.

      Comments or corrections will be welcome. I don't pretend to know
      anything at all about AppleScript, but this works on my system. On your
      system, this may cause your computer to explode and it may curl your
      hair if it's straight or straighten it if it's curly, or it may do many
      other, worse things. So be careful.

      Edward Mendelson

      Script begins below. Cut on the dotted line:

      ------------------------------------------------------------------------
      ----

      property itemname : "Macintosh HD:Applications (Mac OS 9):Corel
      WordPerfect 3.5 Enhanced:Corel WordPerfect"
      property appname : "Corel WordPerfect"
      on run
      tell application "Finder" to open item itemname
      do shell script ("defaults write com.apple.dock orientation -string
      right;killall Dock")
      delay 2
      end run
      on idle
      tell application "Finder"
      set x to the name of every process
      if appname is not in x then
      do shell script ("defaults write com.apple.dock orientation -string
      bottom;killall Dock")
      tell me to quit
      end if
      end tell
      return 1
      end idle


      ------------------------------

      Message Number: 2
      Date: Sun, 28 Nov 2004 20:33:35 -0500
      From: "Alarik W. Skarstrom" <acies [email address protected]Subject:
      Re: An AppleScript to move the dock when WP is running

      Edward,

      That's great. I'm looking forward finally to getting a new computer
      and to using X. I've been running X on an old Mac (using XPostFacto)
      as "practice," and I can see that WP seems to do quite well.

      I look forward to running your script. Thank you.

      Alarik



      I like to keep the OS X dock at the foot of the screen - except when
      I'm running WPMac. Then I want it at the right edge. So here is an
      AppleScript that moves the dock to the right, launches WP, and waits
      until WP is closed, and then moves the dock back to the bottom.

      ------------------------------

      Message Number: 3
      Date: Fri, 3 Dec 2004 11:02:44 -0500
      From: Edward Mendelson <emendelson [email address protected]Subject:
      Another AppleScript to move Dock when WP is/isn't frontmost

      A few days ago, I posted an AppleScript that moves the dock to the
      right, launches WP, and waits until WP is closed, and then moves the
      dock back to the bottom.

      Here's one that moves the dock to the right when WP is the foremost
      application (the one whose menubar appears at the top) and moves it
      back to the foot when WP is in the background, and also when WP is not
      running at all. I don't think this is useful on anything less than a
      VERY fast machine - perhaps 1.2GHz G5 or faster. It's too slow to
      bother with on my 800MHz G4.

      Copy and paste it into Script Editor; change the first line to match
      the EXACT pathname of WP on your system. Click Compile to make sure the
      syntax is OK. Save the script as an Application, with the "Stay Open"
      box checked. Run the application.

      Do not run it from inside the Script Editor, because the "on idle"
      section will not run.

      If your dock gets moved to the wrong place and won't go back, use
      System Preferences, Dock, Position on Screen to get it where you want
      it.

      Comments or corrections will be welcome. Again, I don't pretend to know
      anything at all about AppleScript, but this works on my system. On your
      system, this may cause your computer to explode and it may curl your
      hair if it's straight or straighten it if it's curly, or it may do many
      other, worse things. So be careful.

      Edward Mendelson

      Script begins below. Cut on the dotted line:

      ------------------------------------------------------------------------
      ----

      property itemname : "Macintosh HD:Applications (Mac OS 9):Corel
      WordPerfect 3.5 Enhanced:Corel WordPerfect"
      property appname : "Corel WordPerfect"
      property dockside : "bottom"

      on run
      tell application "Finder" to open item itemname
      do shell script ¬
      ("defaults write com.apple.dock orientation -string right;killall
      Dock")
      set dockside to "right"
      delay 2
      end run

      on idle
      tell application "System Events"
      if name of item 1 of ¬
      (application processes whose frontmost is true) ¬
      is not appname then
      if dockside is "right" then
      do shell script ¬
      ("defaults write com.apple.dock orientation -string bottom;killall
      Dock")
      set dockside to "bottom"
      end if

      end if
      end tell

      tell application "System Events"
      if name of item 1 of ¬
      (application processes whose frontmost is true) ¬
      is appname then
      if dockside is "bottom" then
      do shell script ¬
      ("defaults write com.apple.dock orientation -string right;killall
      Dock")
      set dockside to "right"
      end if
      end if
      end tell

      tell application "Finder"
      set x to the name of every process
      if appname is not in x then
      if dockside is "right" then
      do shell script ¬
      ("defaults write com.apple.dock orientation -string bottom;killall
      Dock")
      end if
      tell me to quit
      end if
      end tell

      return 1
      end idle


      ------------------------------

      Message Number: 4
      Date: Fri, 3 Dec 2004 16:31:17 -0500
      From: hunter <whunterjr [email address protected]Subject: Re: Another
      AppleScript to move Dock when WP is/isn't frontmost

      Advantage / rationale versus the quick and simple 'Command+Option+d' to
      toggle or the Dock menu option to 'Position on Right' ?? NOT, repeat
      NOT being dismissive of your efforts, just puzzled over all the extra
      'baggage' to do what is perceived to be routine and simple.

      Relevance to a recent quest to adjust printing for book format:
      "BookLightning" This is for reference only. Have not tried this OS X
      utility for PDF file printing nor do I have need.

      http://www.metaobject.com/Products.html

      Regards,
      Bill Hunter

      On Dec 3, 2004, at 11:02 AM, Edward Mendelson wrote:

      A few days ago, I posted an AppleScript that moves the dock to the
      right, launches WP, and waits until WP is closed, and then moves the
      dock back to the bottom.


      ------------------------------

      Message Number: 5
      Date: Fri, 3 Dec 2004 18:20:27 -0500
      From: Edward Mendelson <emendelson [email address protected]Subject:
      Re: Another AppleScript to move Dock when WP is/isn't frontmost

      Bill,

      The answer to the question " What is the Advantage / rationale of this
      kind script?" is:

      Absolutely none.

      It's not even remotely rational to spend an hour writing a routine that
      will save perhaps 30 seconds of effort over the course of a lifetime.
      This is almost entirely for the pleasure of tinkering, nothing more. I
      should have said something like "This satisfaction of this kind of
      thing is more in writing it than using it, but someone else may find it
      satisfying for the same reason."

      Edward Mendelson

      On Dec 3, 2004, at 4:31 PM, hunter wrote:

      Advantage / rationale versus the quick and simple 'Command+Option+d'
      to toggle or the Dock menu option to 'Position on Right' ?? NOT,
      repeat NOT being dismissive of your efforts, just puzzled over all the
      extra 'baggage' to do what is perceived to be routine and simple.

      On Dec 3, 2004, at 11:02 AM, Edward Mendelson wrote:

      A few days ago, I posted an AppleScript that moves the dock to the
      right, launches WP, and waits until WP is closed, and then moves the
      dock back to the bottom.

      _______________________________________________________________________
      _____
      To subscribe, unsubscribe, or change options, visit
      <http://www.r8ix.com/lists.html>. Thanks!





      ------------------------------

      Message Number: 6
      Date: Fri, 3 Dec 2004 17:55:12 -0600
      From: Steve Kane <skane [email address protected]Subject: Re: Another
      AppleScript to move Dock when WP is/isn't frontmost

      On Dec 3, 2004, at 10:02 AM, Edward Mendelson wrote:

      A few days ago, I posted an AppleScript that moves the dock to the
      right, launches WP, and waits until WP is closed, and then moves the
      dock back to the bottom.

      Here's one that moves the dock to the right when WP is the foremost
      application (the one whose menubar appears at the top) and moves it
      back to the foot when WP is in the background, and also when WP is not
      running at all. I don't think this is useful on anything less than a
      VERY fast machine - perhaps 1.2GHz G5 or faster. It's too slow to
      bother with on my 800MHz G4.

      Edward,

      Your script is sooo cool. The AppleScript even quits its little self
      when I quit WordPerfect. How does it know to do that?!

      Makes me wish I knew AppleScript, though I know I won't take the
      trouble to learn it. As the fellow listening to the virtuoso said, "I'd
      do anything to be able to play like that, except practice."

      It is a bit slow on my 550MHz TiBook, so it would not do for rapid
      switching between WordPerfect and other applications, but for casual
      use it is really neat. Process Monitor says it never uses more than 2%
      cpu time!

      I have so many icons in my Dock (even just running applications) that
      when my Dock is on the right they are too small. If you are ever in the
      mood, can you add a line or two that turns on magnification when the
      Dock is on the right and turns magnification off when the Dock is moved
      back to the foot?

      Regards,

      Steve


      ------------------------------

      Message Number: 7
      Date: Sat, 04 Dec 2004 09:05:02 +0900
      From: Paul Chadha <hchadha [email address protected]Subject: OT - ANN -
      PDF2Office v2.0 Pro Edition

      Greeting Folks on the WP list -

      I apologize for posting an off topic email here. However, as I've come
      to
      understand that a lot of attorneys are on this list I think the message
      would be of relevance.

      Recosoft Corporation has just begun shipping a product called PDF2Office
      v2.0 Pro Edition. It allows you to open PDF documents directly in Word
      X/2004. One of the key features is a Retain layout/Process Form mode -
      which is used primarily to inform PDF2Office that you are trying to
      convert
      a form (very useful court documents we believe). PDF2Office will then
      try
      to retain a 100% replica of the document. You dont need Word X/2004 as
      PDF2Office also allows converting to the RTF or AppleWorks formats.
      Please
      give it a try - you will find a trial version on our web site.

      Please visit http://www.recosoft.com

      Our servers are being overwhelmed right now due to the amout of
      access/downloads that are happening simultaneously - thus, it may take
      a few
      seconds to get the pages to show.

      Regards -

      Paul Chadha
      --
      Recosoft Corporation
      Osaka, Japan
      English URL:www.recosoft.com
      Japanese URL: www.recosoft.com/japan
      Phone: +81-6-6443-0015 Fax:+81-6-6443-1458
      email: hchadha [email address protected]Message Number: 8
      Date: Fri, 3 Dec 2004 18:37:13 -0800
      From: John Rethorst <jrethorst [email address protected]Subject: Past
      digests

      Are past digests available via FTP? Alternatively, has anyone archived
      them all (I have them from 2002 on, but none before).

      Thanks,
      John R.


      ------------------------------

      Message Number: 9
      Date: Sat, 4 Dec 2004 12:13:48 -0500
      From: Edward Mendelson <emendelson [email address protected]Subject:
      Re: Another AppleScript to move Dock when WP is/isn't frontmost

      On Dec 3, 2004, at 6:55 PM, Steve Kane wrote:

      I have so many icons in my Dock (even just running applications) that
      when my Dock is on the right they are too small. If you are ever in
      the mood, can you add a line or two that turns on magnification when
      the Dock is on the right and turns magnification off when the Dock is
      moved back to the foot?

      Nothing easier. To turn magnification on when the dock is at the right,
      change the parenthetical command after "do shell script" command that
      moves the dock to the right so that it reads like this:

      ("defaults write com.apple.dock orientation -string right; defaults
      write com.apple.dock magnification -bool yes; killall Dock")

      and change the two parenthetical "do shell script" command that move
      the dock back to the bottom so that they read like this:

      ("defaults write com.apple.dock orientation -string bottom; defaults
      write com.apple.dock magnification -bool no; killall Dock")

      Edward Mendelson


      ------------------------------

      Message Number: 10
      Date: Sat, 4 Dec 2004 13:13:40 -0800
      From: John Rethorst <jrethorst [email address protected]Subject: Re:
      Another AppleScript to move Dock when WP is/isn't frontmost

      Your script is sooo cool.

      Yes. Have you seen his web page on WPMac? At
      http://www.columbia.edu/~em36/wpdos/macintosh.html

      Copy and paste it into Script Editor; change the first line to match

      the EXACT pathname of WP on your system.

      I was never good at exact stuff and anyway it's too much typing for me.
      The script could have the Finder locate WP, and then get the name of
      the copy of WP for use in the idle handler:

      global wpName

      on run
      tell application "Finder"
      set wpPath to (application file id "WPC2") as alias
      set wpName to name of wpPath
      open wpPath
      end tell

      --other stuff
      end run

      on idle
      if wpCheck() then
      --do this
      else
      --do that
      end if
      return 1
      end idle

      on wpCheck()
      tell application "System Events"
      (name of every process whose frontmost is true) contains wpName
      end tell
      end wpCheck

      John R.


      ------------------------------

      Message Number: 11
      Date: Sat, 4 Dec 2004 14:24:26 -0800
      From: John Rethorst <jrethorst [email address protected]Subject: Re:
      Another AppleScript to move Dock when WP is/isn't frontmost

      A little more poking around showed me that in the wpCheck() handler of
      the script I just posted, this:

      on wpCheck()
      (path to frontmost application as string) contains wpName
      end wpCheck

      is something like 40 times faster than:

      on wpCheck()
      tell application "System Events"
      (name of every process whose frontmost is true) contains wpName
      end tell
      end wpCheck

      John R.


      ------------------------------

      Message Number: 12
      Date: Sat, 4 Dec 2004 18:35:18 -0500
      From: Edward Mendelson <emendelson [email address protected]Subject:
      Re: Another AppleScript to move Dock when WP is/isn't frontmost


      On Dec 4, 2004, at 5:24 PM, John Rethorst wrote:

      A little more poking around showed me that in the wpCheck() handler of
      the script I just posted, this:

      <snip>

      is something like 40 times faster than:

      <snip>


      John,

      This confirms my original statement that I know nothing at all about
      AppleScript. (True, by the way - all I do is piece together bits and
      pieces I found in other people's scripts.) So, here's a revised version
      of the script that moves the dock when the focus shifts to and from WP.
      Copy and paste into Script Editor, save as Application with Stay Open
      checked, and don't try to run it from the Script Editor window. You can
      give the Application the same WP icon as WP itself, or one of the icons
      at http://wpdos.org/macintosh.html

      All improvements welcomed...

      Edward Mendelson

      Cut on the dotted line:

      -------------------------------------------------------------

      global dockside
      global wpName

      on run
      tell application "Finder"
      set wpPath to (application file id "WPC2") as alias
      set wpName to name of wpPath
      open wpPath
      end tell
      set dockside to "right"
      do shell script ¬
      ("defaults write com.apple.dock orientation -string right;killall
      Dock")
      delay 1
      end run

      on idle
      if wpCheck() then
      if dockside is "bottom" then
      do shell script ¬
      ("defaults write com.apple.dock orientation -string right;killall
      Dock")
      set dockside to "right"
      end if
      else
      if dockside is "right" then
      do shell script ¬
      ("defaults write com.apple.dock orientation -string bottom;killall
      Dock")
      set dockside to "bottom"
      end if
      end if

      tell application "Finder"
      set x to the name of every process
      if wpName is not in x then
      if dockside is "right" then
      do shell script ¬
      ("defaults write com.apple.dock orientation -string bottom;killall
      Dock")
      end if
      tell me to quit
      end if
      end tell

      return 1
      end idle

      on wpCheck()
      (path to frontmost application as string) contains wpName
      end wpCheck

      ----------------------------------------


      ------------------------------

      Message Number: 13
      Date: Mon, 6 Dec 2004 10:44:31 -0600
      From: "Randall C. Wilson" <rwilson [email address protected]Subject:
      Re: Past digests

      John, I have messages going back to July 2, 2001 an additional 6
      months but have not formally archived them. If I did it would be to
      a freely available Filemaker Pro Database solution.

      Are past digests available via FTP? Alternatively, has anyone
      archived them all (I have them from 2002 on, but none before).

      Thanks,
      John R.

      ________________________________________________________________________
      ____
      To subscribe, unsubscribe, or change options, visit
      <http://www.r8ix.com/lists.html>. Thanks!


      --
      /S/ Randall

      mailto:rwilson [email address protected]Alternate: mailto:gryndal
      [email address protected]End of wp-l-digest #951
      ************************************

      ________________________________________________________________________
      ____
      To subscribe, unsubscribe, or change options, visit
      <http://www.r8ix.com/lists.html>. Thanks!
    Your message has been successfully submitted and would be delivered to recipients shortly.