Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

wordperfectmac · WPMac

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 7699 - 7731 of 7836   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#7699 From: "em315" <em315@...>
Date: Thu Mar 7, 2013 3:29 am
Subject: Question about macro variables
em315
Send Email Send Email
 
Here is a mystery that I hope a macro expert can solve.

I'm trying to write a macro that sets the default zoom (magnification) level for
all windows.

Here's a series of experiments. First I created an empty template called "New
Document Template" in the Templates folder. I did this so that an OnOpenDocument
macro would work on new documents as well as existing ones.

Then I created an "OnOpenDocument" macro that contains these lines:

Assign (GlobalVar30;135)
Magnification (GlobalVar30)

This worked perfectly. All new and existing documents open at the zoom level of
135%.

Then I created an "OnStartUp" macro (to run when WP starts up) with this line:

Assign (GlobalVar30;135)

And I changed the "OnOpenDocument" macro so that it had only this line:

Magnification (GlobalVar30)

I closed down WP, started it up again - and the first blank opens at a zoom
level of 3663%.

All later documents and windows open at 135%.

The same thing happens if I start up WP by clicking on a document icon; it opens
at 3663%.

If I close the document and reopen it, it opens at 135%, correctly.

What is making the first document open at 3663%?

#7700 From: "em315" <em315@...>
Date: Mon Mar 11, 2013 3:09 am
Subject: Macro question: branch when file not found?
em315
Send Email Send Email
 
Another macro question that should be obvious but isn't obvious to me.

I'm writing a macro that opens a file on disk. I want to go to a label if the
file does not exist. I In WP for DOS, this is handled by putting a line "On
Error (labelname)" before the line that opens the file. That doesn't seem to
work in WPMac, and the Macro Manual says that "On Error" is used to trap memory
errors.

How can a macro test whether a file exists?

#7701 From: "John R" <johnrethorst@...>
Date: Mon Mar 11, 2013 4:48 am
Subject: Re: Question about macro variables
jrethorst
Send Email Send Email
 
The program was written in Utah.

John R.



--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
>
> Here is a mystery that I hope a macro expert can solve.
>
> I'm trying to write a macro that sets the default zoom (magnification) level
for all windows.
>
> Here's a series of experiments. First I created an empty template called "New
Document Template" in the Templates folder. I did this so that an OnOpenDocument
macro would work on new documents as well as existing ones.
>
> Then I created an "OnOpenDocument" macro that contains these lines:
>
> Assign (GlobalVar30;135)
> Magnification (GlobalVar30)
>
> This worked perfectly. All new and existing documents open at the zoom level
of 135%.
>
> Then I created an "OnStartUp" macro (to run when WP starts up) with this line:
>
> Assign (GlobalVar30;135)
>
> And I changed the "OnOpenDocument" macro so that it had only this line:
>
> Magnification (GlobalVar30)
>
> I closed down WP, started it up again - and the first blank opens at a zoom
level of 3663%.
>
> All later documents and windows open at 135%.
>
> The same thing happens if I start up WP by clicking on a document icon; it
opens at 3663%.
>
> If I close the document and reopen it, it opens at 135%, correctly.
>
> What is making the first document open at 3663%?
>

#7702 From: "John R" <johnrethorst@...>
Date: Mon Mar 11, 2013 4:55 am
Subject: Re: Macro question: branch when file not found?
jrethorst
Send Email Send Email
 
I'd thought this kind of error handler would do it (file "biff" doesn't exist):

On Error (anError)
Open Document ("Storyville:users:jrethorst:biff")
Alert ("I found the file")
Return
Label (anError)
Alert ("I didn't find the file")

but WP opens the last file opened, in whatever folder, and says it found the
file.

A longer script using the commands Set Directory and Get File could probably be
made to work, but it would be convoluted. I've had more luck doing larger-scale
operations with Applescript, and using WP's redoubtable 900 macro commands and
objects for more specific actions.

John R.



--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
>
> Another macro question that should be obvious but isn't obvious to me.
>
> I'm writing a macro that opens a file on disk. I want to go to a label if the
file does not exist. I In WP for DOS, this is handled by putting a line "On
Error (labelname)" before the line that opens the file. That doesn't seem to
work in WPMac, and the Macro Manual says that "On Error" is used to trap memory
errors.
>
> How can a macro test whether a file exists?
>

#7703 From: "em315" <em315@...>
Date: Mon Mar 11, 2013 9:46 pm
Subject: Re: Question about macro variables
em315
Send Email Send Email
 
I found a workaround that uses one of your ideas, and should be able to post an
easy method for setting and changing a default zoom level in a day or two. But
this bug is still strange...

--- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@...> wrote:
>
> The program was written in Utah.
>
> John R.
>
>
>
> --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> >
> > Here is a mystery that I hope a macro expert can solve.
> >
> > I'm trying to write a macro that sets the default zoom (magnification) level
for all windows.
> >
> > Here's a series of experiments. First I created an empty template called
"New Document Template" in the Templates folder. I did this so that an
OnOpenDocument macro would work on new documents as well as existing ones.
> >
> > Then I created an "OnOpenDocument" macro that contains these lines:
> >
> > Assign (GlobalVar30;135)
> > Magnification (GlobalVar30)
> >
> > This worked perfectly. All new and existing documents open at the zoom level
of 135%.
> >
> > Then I created an "OnStartUp" macro (to run when WP starts up) with this
line:
> >
> > Assign (GlobalVar30;135)
> >
> > And I changed the "OnOpenDocument" macro so that it had only this line:
> >
> > Magnification (GlobalVar30)
> >
> > I closed down WP, started it up again - and the first blank opens at a zoom
level of 3663%.
> >
> > All later documents and windows open at 135%.
> >
> > The same thing happens if I start up WP by clicking on a document icon; it
opens at 3663%.
> >
> > If I close the document and reopen it, it opens at 135%, correctly.
> >
> > What is making the first document open at 3663%?
> >
>

#7704 From: "em315" <em315@...>
Date: Thu Mar 14, 2013 2:44 am
Subject: WPMacApp - revised with default zoom option
em315
Send Email Send Email
 
John R. suggested a way of setting a default zoom setting in WPMac, and I've put
it work in the WPMacApp, the system I put together for running WPMac in
SheepShaver:

http://www.columbia.edu/~em36/wpdos/mac-intel.html

The way this works is this:

An OnStartup macro runs whenever WP starts up; it runs another macro called
GetDefaultZoom.

The GetDefaultZoom macro opens a file called WPZoomLevel. This file contains a
number that will be the default zoom level. The macro saves the number to a
variable.

An OnOpenDocument applies the default zoom level to every document when opened.
(There is a New Document Template in the Templates folder so that the
OnOpenDocument macro runs whenever a new document is created.)

A Set Default Zoom macro lets you enter a different number which gets saved in
the file called WPZoomLevel.

This system is a bit fragile in that everything breaks if the WPZoomLevel file
is missing. I've tried to work out some error-checking routines, but haven't
succeeded. Any suggestions will be welcome.

By default the zoom level is set to 100. If the system breaks, you can turn the
whole thing off by editing the OnStartup macro and removing the line that runs
the GetDefaultZoom macro.

#7706 From: "em315" <em315@...>
Date: Tue Mar 19, 2013 6:45 pm
Subject: Re: WPMacApp - revised with default zoom option
em315
Send Email Send Email
 
I've temporarily (I hoped) removed my WPMacApp download because I found problems
in it that will take some time to solve. I hope to have it back in a day or so.

--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
>
> John R. suggested a way of setting a default zoom setting in WPMac, and I've
put it work in the WPMacApp, the system I put together for running WPMac in
SheepShaver:
>
> http://www.columbia.edu/~em36/wpdos/mac-intel.html
>
> The way this works is this:
>
> An OnStartup macro runs whenever WP starts up; it runs another macro called
GetDefaultZoom.
>
> The GetDefaultZoom macro opens a file called WPZoomLevel. This file contains a
number that will be the default zoom level. The macro saves the number to a
variable.
>
> An OnOpenDocument applies the default zoom level to every document when
opened. (There is a New Document Template in the Templates folder so that the
OnOpenDocument macro runs whenever a new document is created.)
>
> A Set Default Zoom macro lets you enter a different number which gets saved in
the file called WPZoomLevel.
>
> This system is a bit fragile in that everything breaks if the WPZoomLevel file
is missing. I've tried to work out some error-checking routines, but haven't
succeeded. Any suggestions will be welcome.
>
> By default the zoom level is set to 100. If the system breaks, you can turn
the whole thing off by editing the OnStartup macro and removing the line that
runs the GetDefaultZoom macro.
>

#7708 From: "em315" <em315@...>
Date: Wed Mar 20, 2013 1:53 pm
Subject: Re: WPMacApp - revised again, default-zoom option removed
em315
Send Email Send Email
 
RESEND WITH CORRECTED LINK:

I've now put back my WPMacApp installer:

https://dl.dropbox.com/u/271144/WPMacApp%20Installer.dmg

I removed the macro that sets a default zoom level, because it conflicted with
the macros that make it possible to create PDFs on OS X. I'll continue to work
on the default-zoom option, because I think it's a good idea to have something
like it.

--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
>
> I've temporarily (I hoped) removed my WPMacApp download because I found
problems in it that will take some time to solve. I hope to have it back in a
day or so.
>
> --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> >
> > John R. suggested a way of setting a default zoom setting in WPMac, and I've
put it work in the WPMacApp, the system I put together for running WPMac in
SheepShaver:
> >
> > http://www.columbia.edu/~em36/wpdos/mac-intel.html
> >
> > The way this works is this:
> >
> > An OnStartup macro runs whenever WP starts up; it runs another macro called
GetDefaultZoom.
> >
> > The GetDefaultZoom macro opens a file called WPZoomLevel. This file contains
a number that will be the default zoom level. The macro saves the number to a
variable.
> >
> > An OnOpenDocument applies the default zoom level to every document when
opened. (There is a New Document Template in the Templates folder so that the
OnOpenDocument macro runs whenever a new document is created.)
> >
> > A Set Default Zoom macro lets you enter a different number which gets saved
in the file called WPZoomLevel.
> >
> > This system is a bit fragile in that everything breaks if the WPZoomLevel
file is missing. I've tried to work out some error-checking routines, but
haven't succeeded. Any suggestions will be welcome.
> >
> > By default the zoom level is set to 100. If the system breaks, you can turn
the whole thing off by editing the OnStartup macro and removing the line that
runs the GetDefaultZoom macro.
> >
>

#7709 From: "em315" <em315@...>
Date: Wed Mar 20, 2013 3:21 pm
Subject: Macro question: place variable in Mac OS clipboard?
em315
Send Email Send Email
 
Is there an easy way to put a WP variable into the Mac OS clipboard without
opening a new window in WP?

I'm trying to put the title of the front window into the Mac OS clipboard
without opening a new window, writing it into it, selecting it, and copying it
to the clipboard.

The only thing I can think of is to write the FrontWindow variable into the
current file (maybe in a text box), select it and cut it (and then cut the text
box it's in), but this seems extremely unreliable and awkward.

There must be a better way, and I'll be glad to know about any possibilities.

#7710 From: Chad Smith <chad78@...>
Date: Wed Mar 20, 2013 3:20 pm
Subject: Re: [wpmac] Re: WPMacApp - revised again, default-zoom option removed
gimpshopdotnet
Send Email Send Email
 
Thank you for your continued efforts to improve this already awesome system.  I
appreciate it.

*- Chad W. Smith*


On Wed, Mar 20, 2013 at 8:53 AM, em315 <em315@...> wrote:

> RESEND WITH CORRECTED LINK:
>
>
> I've now put back my WPMacApp installer:
>
> https://dl.dropbox.com/u/271144/WPMacApp%20Installer.dmg

#7711 From: "John R" <johnrethorst@...>
Date: Wed Mar 20, 2013 5:21 pm
Subject: [wpmac] Re: WPMacApp - revised again, default-zoom option removed
jrethorst
Send Email Send Email
 
Seconded.

John R.


--- In wordperfectmac@yahoogroups.com, Chad Smith <chad78@...> wrote:
>
> Thank you for your continued efforts to improve this already awesome system. 
I appreciate it.
>
> *- Chad W. Smith*
>
>
> On Wed, Mar 20, 2013 at 8:53 AM, em315 <em315@...> wrote:
>
> > RESEND WITH CORRECTED LINK:
> >
> >
> > I've now put back my WPMacApp installer:
> >
> > https://dl.dropbox.com/u/271144/WPMacApp%20Installer.dmg
>

#7712 From: "John R" <johnrethorst@...>
Date: Wed Mar 20, 2013 5:26 pm
Subject: Re: Macro question: place variable in Mac OS clipboard?
jrethorst
Send Email Send Email
 
Would an Applescript work there?

tell application "WordPerfect" to set frontWindow to name of window 1
set the clipboard to frontWindow

John R.


--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
>
> Is there an easy way to put a WP variable into the Mac OS clipboard without
opening a new window in WP?
>
> I'm trying to put the title of the front window into the Mac OS clipboard
without opening a new window, writing it into it, selecting it, and copying it
to the clipboard.
>
> The only thing I can think of is to write the FrontWindow variable into the
current file (maybe in a text box), select it and cut it (and then cut the text
box it's in), but this seems extremely unreliable and awkward.
>
> There must be a better way, and I'll be glad to know about any possibilities.
>

#7713 From: Bob Stern <bob_stern@...>
Date: Wed Mar 20, 2013 5:55 pm
Subject: Re: [wpmac] Macro question: place variable in Mac OS clipboard?
patentbobs
Send Email Send Email
 
> On Mar 20, 2013, at 10:26 AM, John R <johnrethorst@...> wrote:
>
> Would an Applescript work there?


Can you use the "Open Document" macro command to launch an AppleScript, or does
that command only work for opening WordPerfect documents?

Bob Stern

#7714 From: "em315" <em315@...>
Date: Wed Mar 20, 2013 5:58 pm
Subject: Re: Macro question: place variable in Mac OS clipboard?
em315
Send Email Send Email
 
That's quite brilliant. It seems to work when I run the AppleScript directly but
I'm having trouble running it from a macro. Will report back again later.

Meanwhile, is there a way to get a string from a "Get Integer" prompt into the
Mac OS clipboard?

--- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@...> wrote:
>
> Would an Applescript work there?
>
> tell application "WordPerfect" to set frontWindow to name of window 1
> set the clipboard to frontWindow
>
> John R.
>
>
> --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> >
> > Is there an easy way to put a WP variable into the Mac OS clipboard without
opening a new window in WP?
> >
> > I'm trying to put the title of the front window into the Mac OS clipboard
without opening a new window, writing it into it, selecting it, and copying it
to the clipboard.
> >
> > The only thing I can think of is to write the FrontWindow variable into the
current file (maybe in a text box), select it and cut it (and then cut the text
box it's in), but this seems extremely unreliable and awkward.
> >
> > There must be a better way, and I'll be glad to know about any
possibilities.
> >
>

#7715 From: "em315" <em315@...>
Date: Wed Mar 20, 2013 7:02 pm
Subject: Re: [wpmac] Macro question: place variable in Mac OS clipboard?
em315
Send Email Send Email
 
John answers all such questions in his Scripting Guide, which is essential
reading on these matters, and includes material that, as far as I can tell, is
not documented anywhere else.

--- In wordperfectmac@yahoogroups.com, Bob Stern <bob_stern@...> wrote:
>
> > On Mar 20, 2013, at 10:26 AM, John R <johnrethorst@...> wrote:
> >
> > Would an Applescript work there?
>
>
> Can you use the "Open Document" macro command to launch an AppleScript, or
does that command only work for opening WordPerfect documents?
>
> Bob Stern
>

#7716 From: "em315" <em315@...>
Date: Wed Mar 20, 2013 7:33 pm
Subject: Re: Macro question: place variable in Mac OS clipboard?
em315
Send Email Send Email
 
Here's something strange. The following script works when run from the Script
Editor:

-----
try
	 tell application "WordPerfect" to set frontWindow to name of window 1
on error errmsg
	 tell me to activate
	 display dialog errmsg
	 error number -128
end try
tell me to activate
display dialog frontWindow
-----

But if I use an "Execute Apple Script" command in a WP macro to run the script,
then nothing happens. It seems to exit silently.

However, the following variation does seem to work when I use an "Execute Apple
Script" command in a macro to launch it:

-----
try
	 tell application "WordPerfect" to set frontWindow to name of window 1
on error errmsg
	 tell me to activate
	 display dialog errmsg
	 error number -128
end try
set the clipboard to frontWindow
set pdfName to string of (the clipboard as record)
tell me to activate
display dialog pdfName
------

What on earth is going on here??

--- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@...> wrote:
>
> Would an Applescript work there?
>
> tell application "WordPerfect" to set frontWindow to name of window 1
> set the clipboard to frontWindow
>
> John R.
>
>
> --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> >
> > Is there an easy way to put a WP variable into the Mac OS clipboard without
opening a new window in WP?
> >
> > I'm trying to put the title of the front window into the Mac OS clipboard
without opening a new window, writing it into it, selecting it, and copying it
to the clipboard.
> >
> > The only thing I can think of is to write the FrontWindow variable into the
current file (maybe in a text box), select it and cut it (and then cut the text
box it's in), but this seems extremely unreliable and awkward.
> >
> > There must be a better way, and I'll be glad to know about any
possibilities.
> >
>

#7717 From: "em315" <em315@...>
Date: Wed Mar 20, 2013 7:58 pm
Subject: Re: Macro question: place variable in Mac OS clipboard?
em315
Send Email Send Email
 
Now that you've answered one question, may I bother you with another:

Can I use an AppleScript to get the value of a Global Variable in WordPerfect?

In other words, is it possible to have an AppleScript that says something like
this:

tell application "WordPerfect"
set myVar to GlobalVar26
end tell
tell me to activate
display dialog myVar


--- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@...> wrote:
>
> Would an Applescript work there?
>
> tell application "WordPerfect" to set frontWindow to name of window 1
> set the clipboard to frontWindow
>
> John R.
>
>
> --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> >
> > Is there an easy way to put a WP variable into the Mac OS clipboard without
opening a new window in WP?
> >
> > I'm trying to put the title of the front window into the Mac OS clipboard
without opening a new window, writing it into it, selecting it, and copying it
to the clipboard.
> >
> > The only thing I can think of is to write the FrontWindow variable into the
current file (maybe in a text box), select it and cut it (and then cut the text
box it's in), but this seems extremely unreliable and awkward.
> >
> > There must be a better way, and I'll be glad to know about any
possibilities.
> >
>

#7718 From: "em315" <em315@...>
Date: Thu Mar 21, 2013 2:28 am
Subject: Re: WPMacApp - revised, default-zoom option restored again
em315
Send Email Send Email
 
OK, thanks to John's suggestions, I figured out how to write a macro that sets a
default zoom level in WPMac, and also made some other improvements.

To set a default zoom level (other than the default 100) run the SetDefaultZoom
macro.

Same download link:

https://dl.dropbox.com/u/271144/WPMacApp%20Installer.dmg

--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
>
> I've now put back my WPMacApp installer:
>
> https://dl.dropbox.com/u/271144/WPMacApp%20Installer.dmg
>
> I removed the macro that sets a default zoom level, because it conflicted with
> the macros that make it possible to create PDFs on OS X. I'll continue to work
> on the default-zoom option, because I think it's a good idea to have something
> like it.
>
> --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> >
> > I've temporarily (I hoped) removed my WPMacApp download because I found
problems in it that will take some time to solve. I hope to have it back in a
day or so.
> >
> > --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> > >
> > > John R. suggested a way of setting a default zoom setting in WPMac, and
I've put it work in the WPMacApp, the system I put together for running WPMac in
SheepShaver:
> > >
> > > http://www.columbia.edu/~em36/wpdos/mac-intel.html
> > >
> > > The way this works is this:
> > >
> > > An OnStartup macro runs whenever WP starts up; it runs another macro
called GetDefaultZoom.
> > >
> > > The GetDefaultZoom macro opens a file called WPZoomLevel. This file
contains a number that will be the default zoom level. The macro saves the
number to a variable.
> > >
> > > An OnOpenDocument applies the default zoom level to every document when
opened. (There is a New Document Template in the Templates folder so that the
OnOpenDocument macro runs whenever a new document is created.)
> > >
> > > A Set Default Zoom macro lets you enter a different number which gets
saved in the file called WPZoomLevel.
> > >
> > > This system is a bit fragile in that everything breaks if the WPZoomLevel
file is missing. I've tried to work out some error-checking routines, but
haven't succeeded. Any suggestions will be welcome.
> > >
> > > By default the zoom level is set to 100. If the system breaks, you can
turn the whole thing off by editing the OnStartup macro and removing the line
that runs the GetDefaultZoom macro.
> > >
> >
>

#7719 From: "John R" <johnrethorst@...>
Date: Thu Mar 21, 2013 9:28 pm
Subject: Re: Macro question: place variable in Mac OS clipboard?
jrethorst
Send Email Send Email
 
No idea as to specifics, except that the clipboard can be complicated. It exists
as a record, so coercions such as (clipboard as string) are often useful.

I also don't know whether WP's absolutely first-generation support for
Applescript could play a role. I know that property values don't update in a
script written to update them, when the script is run with Execute Apple Script.

For a few reasons, while I see the combination of Applescript and WP macros as a
very powerful scripting environment, I like to code the 'big picture' in
Applescript, getting only a little bit from WP, e.g. text of document 1, and
then work using a largely Applescript structure that sends Do Script commands to
WP (you can also send 50 variables to WP, while if a WP macro calls an
Applescript there's no way except the clipboard to pass data).

John R.


--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:

> What on earth is going on here??

#7720 From: "John R" <johnrethorst@...>
Date: Thu Mar 21, 2013 9:30 pm
Subject: Re: Macro question: place variable in Mac OS clipboard?
jrethorst
Send Email Send Email
 
I don't know of a way to do that. But again (see last post), I'd try to generate
a value in Applescript and pass that to WP instead of the other way around.

John R.



--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
>
> Now that you've answered one question, may I bother you with another:
>
> Can I use an AppleScript to get the value of a Global Variable in WordPerfect?
>
> In other words, is it possible to have an AppleScript that says something like
this:
>
> tell application "WordPerfect"
> set myVar to GlobalVar26
> end tell
> tell me to activate
> display dialog myVar
>

#7721 From: "em315" <em315@...>
Date: Fri Mar 22, 2013 12:03 am
Subject: Re: Macro question: place variable in Mac OS clipboard?
em315
Send Email Send Email
 
That's exactly what I did in the version that I posted yesterday. I used an
Applescript to prompt the user for a default zoom level; then I save it to the
clipboard so that WP can copy it from the clipboard to a global variable, which
is used by the OnOpenDocument macro (and a New Document Template is in the
Templates folder so that new documents get the same zoom level).

The same Applescript saves a text file that contains the zoom-level number.

An OnStartup macro that runs when WP starts up runs an Applescript that reads
the text file for the zoom-level number and copies it to the clipboard - so that
the WP macro can copy the number from the clipboard to a global variable. It
seems to work.

Again, this is entirely your idea - I just banged my forehead on the trackpad
until the code seemed to work.


--- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@...> wrote:
>
> I don't know of a way to do that. But again (see last post), I'd try to
generate a value in Applescript and pass that to WP instead of the other way
around.
>
> John R.
>
>
>
> --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> >
> > Now that you've answered one question, may I bother you with another:
> >
> > Can I use an AppleScript to get the value of a Global Variable in
WordPerfect?
> >
> > In other words, is it possible to have an AppleScript that says something
like this:
> >
> > tell application "WordPerfect"
> > set myVar to GlobalVar26
> > end tell
> > tell me to activate
> > display dialog myVar
> >
>

#7722 From: "John R" <johnrethorst@...>
Date: Sat Mar 23, 2013 8:51 pm
Subject: Re: Macro question: place variable in Mac OS clipboard?
jrethorst
Send Email Send Email
 
Looks like it would work fine. I'd probably steer clear of the clipboard and
pass the value to WP with a neutral (and in this case often helpful) macro like
Redraw, adding a parameter to it that WP accepts as a script variable. Script
variables 1-50 are global in scope.

set theZoom to text returned of (display dialog "Enter zoom level:") etc.
tell app "WordPerfect" to do script {"Redraw",theZoom)

placing the numeric string into ScriptVar01.

John R.


--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
>
> That's exactly what I did in the version that I posted yesterday. I used an
Applescript to prompt the user for a default zoom level; then I save it to the
clipboard so that WP can copy it from the clipboard to a global variable, which
is used by the OnOpenDocument macro (and a New Document Template is in the
Templates folder so that new documents get the same zoom level).
>
> The same Applescript saves a text file that contains the zoom-level number.
>
> An OnStartup macro that runs when WP starts up runs an Applescript that reads
the text file for the zoom-level number and copies it to the clipboard - so that
the WP macro can copy the number from the clipboard to a global variable. It
seems to work.
>
> Again, this is entirely your idea - I just banged my forehead on the trackpad
until the code seemed to work.
>
>
> --- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@> wrote:
> >
> > I don't know of a way to do that. But again (see last post), I'd try to
generate a value in Applescript and pass that to WP instead of the other way
around.
> >
> > John R.
> >
> >
> >
> > --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> > >
> > > Now that you've answered one question, may I bother you with another:
> > >
> > > Can I use an AppleScript to get the value of a Global Variable in
WordPerfect?
> > >
> > > In other words, is it possible to have an AppleScript that says something
like this:
> > >
> > > tell application "WordPerfect"
> > > set myVar to GlobalVar26
> > > end tell
> > > tell me to activate
> > > display dialog myVar
> > >
> >
>

#7723 From: "John R" <johnrethorst@...>
Date: Sat Mar 23, 2013 9:03 pm
Subject: Re: Macro question: place variable in Mac OS clipboard?
jrethorst
Send Email Send Email
 
s/b

set theZoom to text returned of (display dialog "Enter zoom level:") etc.
tell app "WordPerfect" to do script {"Redraw",theZoom}

with curly brackets around script name and parameters.




--- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@...> wrote:
>
> Looks like it would work fine. I'd probably steer clear of the clipboard and
pass the value to WP with a neutral (and in this case often helpful) macro like
Redraw, adding a parameter to it that WP accepts as a script variable. Script
variables 1-50 are global in scope.
>
> set theZoom to text returned of (display dialog "Enter zoom level:") etc.
> tell app "WordPerfect" to do script {"Redraw",theZoom)
>
> placing the numeric string into ScriptVar01.
>
> John R.
>
>
> --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> >
> > That's exactly what I did in the version that I posted yesterday. I used an
Applescript to prompt the user for a default zoom level; then I save it to the
clipboard so that WP can copy it from the clipboard to a global variable, which
is used by the OnOpenDocument macro (and a New Document Template is in the
Templates folder so that new documents get the same zoom level).
> >
> > The same Applescript saves a text file that contains the zoom-level number.
> >
> > An OnStartup macro that runs when WP starts up runs an Applescript that
reads the text file for the zoom-level number and copies it to the clipboard -
so that the WP macro can copy the number from the clipboard to a global
variable. It seems to work.
> >
> > Again, this is entirely your idea - I just banged my forehead on the
trackpad until the code seemed to work.
> >
> >
> > --- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@> wrote:
> > >
> > > I don't know of a way to do that. But again (see last post), I'd try to
generate a value in Applescript and pass that to WP instead of the other way
around.
> > >
> > > John R.
> > >
> > >
> > >
> > > --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> > > >
> > > > Now that you've answered one question, may I bother you with another:
> > > >
> > > > Can I use an AppleScript to get the value of a Global Variable in
WordPerfect?
> > > >
> > > > In other words, is it possible to have an AppleScript that says
something like this:
> > > >
> > > > tell application "WordPerfect"
> > > > set myVar to GlobalVar26
> > > > end tell
> > > > tell me to activate
> > > > display dialog myVar
> > > >
> > >
> >
>

#7724 From: "em315" <em315@...>
Date: Sun Mar 24, 2013 12:39 am
Subject: Re: Macro question: place variable in Mac OS clipboard?
em315
Send Email Send Email
 
Thank you - a much better solution than mine. Will implement later...

--- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@...> wrote:
>
> s/b
>
> set theZoom to text returned of (display dialog "Enter zoom level:") etc.
> tell app "WordPerfect" to do script {"Redraw",theZoom}
>
> with curly brackets around script name and parameters.
>
>
>
>
> --- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@> wrote:
> >
> > Looks like it would work fine. I'd probably steer clear of the clipboard and
pass the value to WP with a neutral (and in this case often helpful) macro like
Redraw, adding a parameter to it that WP accepts as a script variable. Script
variables 1-50 are global in scope.
> >
> > set theZoom to text returned of (display dialog "Enter zoom level:") etc.
> > tell app "WordPerfect" to do script {"Redraw",theZoom)
> >
> > placing the numeric string into ScriptVar01.
> >
> > John R.
> >
> >
> > --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> > >
> > > That's exactly what I did in the version that I posted yesterday. I used
an Applescript to prompt the user for a default zoom level; then I save it to
the clipboard so that WP can copy it from the clipboard to a global variable,
which is used by the OnOpenDocument macro (and a New Document Template is in the
Templates folder so that new documents get the same zoom level).
> > >
> > > The same Applescript saves a text file that contains the zoom-level
number.
> > >
> > > An OnStartup macro that runs when WP starts up runs an Applescript that
reads the text file for the zoom-level number and copies it to the clipboard -
so that the WP macro can copy the number from the clipboard to a global
variable. It seems to work.
> > >
> > > Again, this is entirely your idea - I just banged my forehead on the
trackpad until the code seemed to work.
> > >
> > >
> > > --- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@> wrote:
> > > >
> > > > I don't know of a way to do that. But again (see last post), I'd try to
generate a value in Applescript and pass that to WP instead of the other way
around.
> > > >
> > > > John R.
> > > >
> > > >
> > > >
> > > > --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> > > > >
> > > > > Now that you've answered one question, may I bother you with another:
> > > > >
> > > > > Can I use an AppleScript to get the value of a Global Variable in
WordPerfect?
> > > > >
> > > > > In other words, is it possible to have an AppleScript that says
something like this:
> > > > >
> > > > > tell application "WordPerfect"
> > > > > set myVar to GlobalVar26
> > > > > end tell
> > > > > tell me to activate
> > > > > display dialog myVar
> > > > >
> > > >
> > >
> >
>

#7725 From: "em315" <em315@...>
Date: Sun Mar 24, 2013 12:45 am
Subject: WPLO Converter - some new features
em315
Send Email Send Email
 
I got an email asking if the WPLO Converter (my Applescript that uses
LibreOffice to convert WPMac files to Word format) could be run from the
terminal so that it could convert files without drag-and-drop or selecting a
file in the finder.

The solution turned out to require four lines of Applescript, so now the WPLO
Converter can be run like this from the command line:

osascript /Applications/WPLO\ Converter /path/to/Input\ File

One benefit of this is that it was easy to create an Automator service that lets
you ctrl-click on a file and choose "Convert with WPLO Converter" from the
contextual menu (it might be on a "Services" submenu depending on your system).

To install this, after copying the WPLO Converter to the Applications folder,
double-click the "Convert with WPLO Converter" service in the download, and
follow the prompts.

Same download link as before:

https://dl.dropbox.com/u/271144/WPLOConverter.zip

#7726 From: "em315" <em315@...>
Date: Sun Mar 24, 2013 12:52 am
Subject: Re: WPLO Converter - some new features
em315
Send Email Send Email
 
Sorry - I spoke too soon. I've restored the old version (without the
command-line or Automator features until I can fix the new features)...

--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
>
> I got an email asking if the WPLO Converter (my Applescript that uses
LibreOffice to convert WPMac files to Word format) could be run from the
terminal so that it could convert files without drag-and-drop or selecting a
file in the finder.
>
> The solution turned out to require four lines of Applescript, so now the WPLO
Converter can be run like this from the command line:
>
> osascript /Applications/WPLO\ Converter /path/to/Input\ File
>
> One benefit of this is that it was easy to create an Automator service that
lets you ctrl-click on a file and choose "Convert with WPLO Converter" from the
contextual menu (it might be on a "Services" submenu depending on your system).
>
> To install this, after copying the WPLO Converter to the Applications folder,
double-click the "Convert with WPLO Converter" service in the download, and
follow the prompts.
>
> Same download link as before:
>
> https://dl.dropbox.com/u/271144/WPLOConverter.zip
>

#7727 From: "em315" <em315@...>
Date: Sun Mar 24, 2013 1:51 am
Subject: Re: WPLO Converter - some new features
em315
Send Email Send Email
 
Fixed it now. The new version has all the earlier features, but can also run
from the command line with a filename as parameter, and can be set up to run as
a service by double-clicking the service included in the zip file:

https://dl.dropbox.com/u/271144/WPLOConverter.zip

--- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
>
> Sorry - I spoke too soon. I've restored the old version (without the
command-line or Automator features until I can fix the new features)...
>
> --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> >
> > I got an email asking if the WPLO Converter (my Applescript that uses
LibreOffice to convert WPMac files to Word format) could be run from the
terminal so that it could convert files without drag-and-drop or selecting a
file in the finder.
> >
> > The solution turned out to require four lines of Applescript, so now the
WPLO Converter can be run like this from the command line:
> >
> > osascript /Applications/WPLO\ Converter /path/to/Input\ File
> >
> > One benefit of this is that it was easy to create an Automator service that
lets you ctrl-click on a file and choose "Convert with WPLO Converter" from the
contextual menu (it might be on a "Services" submenu depending on your system).
> >
> > To install this, after copying the WPLO Converter to the Applications
folder, double-click the "Convert with WPLO Converter" service in the download,
and follow the prompts.
> >
> > Same download link as before:
> >
> > https://dl.dropbox.com/u/271144/WPLOConverter.zip
> >
>

#7728 From: "em315" <em315@...>
Date: Sun Mar 24, 2013 3:26 am
Subject: Re: Macro question: place variable in Mac OS clipboard?
em315
Send Email Send Email
 
Thanks for this suggestion. I've now implemented your suggestion, and left the
clipboard untouched, which I wanted to do all along. New version posted now.

So basically this code is entirely yours. Thanks again.

--- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@...> wrote:
>
> Looks like it would work fine. I'd probably steer clear of the clipboard and
pass the value to WP with a neutral (and in this case often helpful) macro like
Redraw, adding a parameter to it that WP accepts as a script variable. Script
variables 1-50 are global in scope.
>
> set theZoom to text returned of (display dialog "Enter zoom level:") etc.
> tell app "WordPerfect" to do script {"Redraw",theZoom)
>
> placing the numeric string into ScriptVar01.
>
> John R.
>
>
> --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> >
> > That's exactly what I did in the version that I posted yesterday. I used an
Applescript to prompt the user for a default zoom level; then I save it to the
clipboard so that WP can copy it from the clipboard to a global variable, which
is used by the OnOpenDocument macro (and a New Document Template is in the
Templates folder so that new documents get the same zoom level).
> >
> > The same Applescript saves a text file that contains the zoom-level number.
> >
> > An OnStartup macro that runs when WP starts up runs an Applescript that
reads the text file for the zoom-level number and copies it to the clipboard -
so that the WP macro can copy the number from the clipboard to a global
variable. It seems to work.
> >
> > Again, this is entirely your idea - I just banged my forehead on the
trackpad until the code seemed to work.
> >
> >
> > --- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@> wrote:
> > >
> > > I don't know of a way to do that. But again (see last post), I'd try to
generate a value in Applescript and pass that to WP instead of the other way
around.
> > >
> > > John R.
> > >
> > >
> > >
> > > --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
> > > >
> > > > Now that you've answered one question, may I bother you with another:
> > > >
> > > > Can I use an AppleScript to get the value of a Global Variable in
WordPerfect?
> > > >
> > > > In other words, is it possible to have an AppleScript that says
something like this:
> > > >
> > > > tell application "WordPerfect"
> > > > set myVar to GlobalVar26
> > > > end tell
> > > > tell me to activate
> > > > display dialog myVar
> > > >
> > >
> >
>

#7730 From: "em315" <em315@...>
Date: Wed Mar 27, 2013 6:30 pm
Subject: How to add an app (e.g. a SheepShaver setup) to ctrl-click menu (REVISED)
em315
Send Email Send Email
 
(Corrected and reposted.)

This may be useful to anyone who (like me) didn't already know how to do it.

If you have files that don't automatically open in the application you want them
to open in, you can create a "service" that appears on the file's ctrl-click
menu and that will open the file in the application you choose. This procedure
is often simpler and easier than using the "Open with..." menu. (And yes, I
really do understand that this procedure is NOT needed in most cases and that
you don't need to waste time creating it if you don't need it.)

For example, let's say you want to open a WordPerfect for Windows or WPDOS file
in the
WPMacApp or my WPDOSBox51 or WPDOSBox62 applications, or open it in John's Open
in WP application that launches SheepShaver, or convert it using my WPLO
Converter application.

To create a convenient ctrl-click menu item that does this, start by opening OS
X's Automator application. Select the Service icon and click Choose.

In the top panel of the right-hand pane, set Service receives selected "files or
folders" in "Finder" (in other words, change the settings in the two drop-down
menus).

Next, in the Actions column on the left, select Files & Folders; from the column
on the right, drag "Open Finder items" into the canvas on the right.

In the drop-down menu in the Open Finder items panel, change "Default
application" to whichever application you want to use to open or convert your
file.

From Automator's File menu, select Save, and give a name to your service, for
example, "Open in WPMac" or whatever might be appropriate.

Close Automator (not necessary at this point, but there's no reason to keep it
open).

Select the file you want to open or convert; ctrl-click on it; if you see the
name of the service you just created, click on it; if you don't see the name of
the service that you just created, Click on Services... and select the service
from the submenu.

Again, in the hope of avoiding bandwidth-wasting messages, I want to emphasize
that this procedure is not generally needed. However, I find it useful for
opening documents I created in WordPerfect for DOS that have non-standard
filenames such as "MYDOC.DAT" or "LETTER.123" that do not readily open in WPMac
or my WPDOS setup on the Mac, and this procedure makes it easier to open them in
the applications I want. It may be useful to others.

#7731 From: "ted_m_p_lee" <tmplee@...>
Date: Fri Mar 29, 2013 5:54 pm
Subject: installing 9.0.4 in sheepshaver in OS 10.7
ted_m_p_lee
Send Email Send Email
 
I'll be getting a new MacBook Air pretty soon and am preparing for the changes
I'll have to make.  One of them will be to install one of the
WordPerfect/SheepShaver packages (I haven't decided which, but since I have a
few other ancient "classic" apps to run, I probably won't use the "appliance"
version.)  In any case, I have a copy of OS 9.0.4 that I'd like to install in
the SS volume.  Somewhere in browsing through the files here, possibly following
some link, I ran across a comment that I recall as saying to do that kind of
install on 10.7 (or later) I would have to use a disk image and not a real disk.
I can't find that comment again -- does anyone remember where it would have been
or how I'd find it?

Ted Lee
Minnetonka, MN

Messages 7699 - 7731 of 7836   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help