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

Re: [wpmac] Digest Number 184

Expand Messages
  • Karl Winkelmann
    ... When Classic is running Select the Internet control panel from the Apple menu Select the Web tab and at the bottom is the place where you can set the
    Message 1 of 10 , Jul 18, 2005
      > On or about 7/18/2005 1:13 PM wordperfectmac@yahoogroups.com AKA
      wordperfectmac@yahoogroups.com eruditely mused the following:

      >is it possible to select Safari as the browser to open links
      >in WP. Classic doesn't see Safari as an application but a folder.
      >What is the easiest way to get this functionality?

      When Classic is running
      Select the 'Internet' control panel from the Apple menu
      Select the Web tab and at the bottom is the place where you can set the
      default browser - it does allow you to select the 'Safari.app', save and
      close.
      Then your WP links should then work fine.

      Cheers
      Karl Winkelmann
    • John Rethorst
      ... I can t get this to work. I select Safari in the Internet control panel, then open WP s Prefs HTML window. Current browser shows as None. When I navigate
      Message 2 of 10 , Jul 19, 2005
        --- In wordperfectmac@yahoogroups.com, Karl Winkelmann
        <ww2censor@p...> wrote:
        > > On or about 7/18/2005 1:13 PM wordperfectmac@yahoogroups.com AKA
        > wordperfectmac@yahoogroups.com eruditely mused the following:
        >
        > >is it possible to select Safari as the browser to open links
        > >in WP. Classic doesn't see Safari as an application but a folder.

        > >What is the easiest way to get this functionality?
        >
        > When Classic is running
        > Select the 'Internet' control panel from the Apple menu
        > Select the Web tab and at the bottom is the place where you can set
        > the default browser - it does allow you to select the 'Safari.app',
        > save and close. Then your WP links should then work fine.

        I can't get this to work. I select Safari in the Internet control
        panel, then open WP's Prefs > HTML window. Current
        browser shows as None. When I navigate to Safari to select
        it, I see it as a folder. WP's looking for a file of type "APPL"
        (application), which Safari.app is not. Am I overlooking
        something?
      • J Busch
        No, not missing anything. It was a good suggestion, and could have been a good solution if WP used the preference from Internet control panel. But alas, WP
        Message 3 of 10 , Jul 19, 2005
          No, not missing anything. It was a good suggestion,
          and could have been a good solution if WP used the
          preference from 'Internet' control panel. But alas,
          WP has it's own internet linking preference.

          I was thinking that an OS 9 apple scipt of type "appl"
          which would open safari and pass the information might
          do the trick. Now just need to figure out the code.
          -Jonathan

          --- John Rethorst <jrethorst@...> wrote:

          > --- In wordperfectmac@yahoogroups.com, Karl
          > Winkelmann
          > <ww2censor@p...> wrote:
          > > > On or about 7/18/2005 1:13 PM
          > wordperfectmac@yahoogroups.com AKA
          > > wordperfectmac@yahoogroups.com eruditely mused the
          > following:
          > >
          > > >is it possible to select Safari as the browser to
          > open links
          > > >in WP. Classic doesn't see Safari as an
          > application but a folder.
          >
          > > >What is the easiest way to get this
          > functionality?
          > >
          > > When Classic is running
          > > Select the 'Internet' control panel from the Apple
          > menu
          > > Select the Web tab and at the bottom is the place
          > where you can set
          > > the default browser - it does allow you to select
          > the 'Safari.app',
          > > save and close. Then your WP links should then
          > work fine.
          >
          > I can't get this to work. I select Safari in the
          > Internet control
          > panel, then open WP's Prefs > HTML window. Current
          > browser shows as None. When I navigate to Safari to
          > select
          > it, I see it as a folder. WP's looking for a file of
          > type "APPL"
          > (application), which Safari.app is not. Am I
          > overlooking
          > something?
          >
          >
          >
          >
          >


          __________________________________________________
          Do You Yahoo!?
          Tired of spam? Yahoo! Mail has the best spam protection around
          http://mail.yahoo.com
        • John Rethorst
          ... That s it. I tried a script that would pass the URL to an open event; didn t work. I m trying to pass the URL to the run handler, but can t get that
          Message 4 of 10 , Jul 19, 2005
            --- In wordperfectmac@yahoogroups.com, J Busch <job4031@y...> wrote:

            > I was thinking that an OS 9 apple scipt of type "appl"
            > which would open safari and pass the information might
            > do the trick. Now just need to figure out the code.

            That's it. I tried a script that would pass the URL to an
            open event; didn't work. I'm trying to pass the URL to
            the run handler, but can't get that working either.

            John R.
          • J Busch
            John, After several hours of applescripting and searching the Internet, this is a workable kludge I have created. It seems that for a clean solution, I would
            Message 5 of 10 , Jul 28, 2005
              John,
              After several hours of applescripting and searching
              the Internet, this is a workable kludge I have
              created.

              It seems that for a clean solution, I would need to
              create a full OS9 application that would take in an
              argument as the URL and then start Safari. With my
              limited knowledge of OS9 programming this wasn't an
              option for now.

              I thought I might be on to a solution with the OSX
              CLI. I found an example to pass command line
              arguments to an applescript handler, but ran into the
              problem of using the command line from classic. Is
              there a way to call a unix script from classic?

              So I took what I had working. I could get WP to open
              a URL with iCab. I then created a script which copied
              the URL from iCab to Safari. The stay open script
              starts WP and then waits for iCab to start. When it
              does it copies the link to Safari and closes iCab.
              Finally when WP closes the script closes.

              Appreciate any critiques or insight into how this
              could be done better.

              -Jonathan

              The code: (Also attached)
              property initialized : false
              property URLLink : "http://"

              on idle
              tell application "Finder"
              if process "iCab" exists then
              if initialized is false then
              set initialized to true
              return 2
              else

              tell application "iCab"
              set URLLink to item 1 of (GetWindowInfo 1)
              end tell

              if URLLink is "about:blank" then
              return 2
              else
              tell application "iCab" to quit
              tell application "Safari"
              open location URLLink
              end tell
              end if
              set initialized to false
              end if
              else
              set initialized to false
              end if

              if process "Corel WordPerfect" exists then
              else
              quit me
              end if
              end tell
              return 1
              end idle

              on run
              tell application "Corel WordPerfect"
              activate
              end tell
              end run

              --- John Rethorst <jrethorst@...> wrote:

              > --- In wordperfectmac@yahoogroups.com, J Busch
              > <job4031@y...> wrote:
              >
              > > I was thinking that an OS 9 apple scipt of type
              > "appl"
              > > which would open safari and pass the information
              > might
              > > do the trick. Now just need to figure out the
              > code.
              >
              > That's it. I tried a script that would pass the URL
              > to an
              > open event; didn't work. I'm trying to pass the URL
              > to
              > the run handler, but can't get that working either.
              >
              > John R.
              >
              >
              >
              >
              >

              __________________________________________________
              Do You Yahoo!?
              Tired of spam? Yahoo! Mail has the best spam protection around
              http://mail.yahoo.com

              [Non-text portions of this message have been removed]
            • John Rethorst
              ... I saw something like that at macosxhints.com. It s amazing that you can t pass an argument to an Applescript s run handler in the first place. ... If the
              Message 6 of 10 , Jul 29, 2005
                On Jul 28, 2005, at 10:34 PM, J Busch wrote:

                > I thought I might be on to a solution with the OSX
                > CLI. I found an example to pass command line
                > arguments to an applescript handler,

                I saw something like that at macosxhints.com. It's amazing that you
                can't pass an argument to an Applescript's run handler in the first
                place.

                > but ran into the
                > problem of using the command line from classic. Is
                > there a way to call a unix script from classic?

                If the unix script can be saved as a file of type "APPL". I don't
                know how to do that, but am just starting to learn unix . . .

                > So I took what I had working. I could get WP to open
                > a URL with iCab. I then created a script which copied
                > the URL from iCab to Safari. The stay open script
                > starts WP and then waits for iCab to start. When it
                > does it copies the link to Safari and closes iCab.
                > Finally when WP closes the script closes.

                Which at least works! but user resistance to a stay-open script, and
                to using a helper browser, might be too much.

                I tried this. The user clicks on a url and runs this WP macro, which
                selects the url and copies it to the clipboard:

                Find/Change Direction (Backward;No Wrap)
                Find/Change Where ({Current Doc})
                Find/Change Match (Partial Word;Case Insensitive;Alphabet
                Insensitive;CharRep Insensitive;{Text Only})
                Find/Change Action (Position After)
                Find String (" ")
                Find
                If (!FindStatusFlag)
                Beginning of Line ()
                Find/Change Direction (Forward;No Wrap)
                Find String ("http")
                Find
                End If
                ;
                Find/Change Direction (Forward;No Wrap)
                Find/Change Action (Extend Selection)
                Find String (" ")
                Find
                If (!FindStatusFlag)
                End (Select)
                End If
                ;
                If (SelectionFlag)
                Copy
                Else
                Alert ("I could not find a URL.")
                Return
                End If
                ;
                Execute Apple Script ("WP Browser Helper")

                which script gets the clipboard and runs with it, so to speak:

                property myBrowser : 0

                on run
                tell me to activate -- so it can see the clipboard
                set theURL to the clipboard
                if myBrowser == 0 then chooseBrowser()
                getURL(theURL)
                end run

                on chooseBrowser()
                set myBrowser to choose file of type "APPL" with prompt "Choose
                a web browser:"
                end chooseBrowser

                on getURL(theURL)
                open location theURL
                end getURL

                but this either freezes WP, or activates the browser but does nothing
                else.

                The open location was suggested as an alternative to the older:

                on getURL(theURL)
                set theURL to theURL as string
                tell application (myBrowser as string)
                activate
                «event WWW!OURL» theURL given «class WIND»:0
                end tell
                end getURL

                without effect.

                I think what's going to be needed is something in another language,
                which is fine. It (or the unix script) just needs to be saved as a
                file of type application.

                John R.
              • Steve Kane
                ... I know nothing about AppleScript and I don t know if the issue you all are discussing is a WordPerfect or a Classic issue. But, I ve been using a Classic
                Message 7 of 10 , Jul 30, 2005
                  On Jul 29, 2005, at 8:51 PM, John Rethorst wrote:

                  > On Jul 28, 2005, at 10:34 PM, J Busch wrote:
                  >
                  > > I thought I might be on to a solution with the OSX
                  > > CLI.  I found an example to pass command line
                  > > arguments to an applescript handler,
                  >
                  > I tried this. The user clicks on a url and runs this WP macro, which 
                  > selects the url and copies it to the clipboard:
                  > ...
                  > but this either freezes WP, or activates the browser but does nothing 
                  > else.

                  I know nothing about AppleScript and I don't know if the issue you all
                  are discussing is a WordPerfect or a Classic issue. But, I've been
                  using a Classic database application called Panorama to open urls
                  directly in Safari using an AppleScript originally created by ProVUE,
                  the developer of Panorama, and later modified by a user to work with
                  Safari. There was also another issue that required the script to be
                  opened in the new Mac OS X Script Editor and then resaved, or maybe the
                  text of the script had to be pasted into a new window in Script Editor
                  and then saved as a new AppleScript; something to do with resource
                  forks, I think.

                  This AppleScript is so simple that I am guessing that there is some
                  other WordPerfect issue, but here it is anyway. ActiveURL is a text
                  variable in Panorama's procedure language that contains a url as the
                  result of a previous user action:

                  tell application "Panorama"
                  set ActiveURL to Value of Cell "ActiveURL"
                  end tell

                  tell application "Safari"
                  open location ActiveURL

                  (* use this alternate approach to reuse current browser window
                  if (count of documents) < 1 then
                  make new document at beginning of documents
                  end if
                  set the URL of document 1 to ActiveURL
                  *)

                  activate
                  end tell
                • John Rethorst
                  ... There s no other issue, and your solution works but again requires a helper app. Here s something that requires only an Applescript. It needs to be saved
                  Message 8 of 10 , Jul 31, 2005
                    --- In wordperfectmac@yahoogroups.com, Steve Kane <skane@s...> wrote:

                    > This AppleScript is so simple that I am guessing that there is some
                    > other WordPerfect issue, but here it is anyway. ActiveURL is a text
                    > variable in Panorama's procedure language that contains a url as
                    > the result of a previous user action:
                    >
                    > tell application "Panorama"
                    > set ActiveURL to Value of Cell "ActiveURL"
                    > end tell

                    There's no other issue, and your solution works but again requires
                    a helper app. Here's something that requires only an Applescript.
                    It needs to be saved as a stay-open application:

                    on «event WWW!OURL» theURL
                    open location theURL
                    end «event WWW!OURL»

                    [If the characters preceding and succeeding "event WWW!OURL"
                    are garbled in this post, replace them with guillemets (double
                    left and right carets, by typing option-backspace at the front
                    and shift option-backspace afterwards.]

                    The stay-open part is an inconvenience, and I'm looking for a way
                    around that.

                    BTW, to create an internet link in a WP doc: select the link in your
                    text and run this macro:

                    Copy
                    Create Hyperlink (Internet;"";Clipboard)
                    Display (On)
                  • J Busch
                    The solution is so close, I can almost taste it :-) I modified your macro so that it would copy the link as text and not a link, which was giving applescript
                    Message 9 of 10 , Jul 31, 2005
                      The solution is so close, I can almost taste it :-)

                      I modified your macro so that it would copy the link
                      as text and not a link, which was giving applescript
                      issues:

                      Find/Change Direction (Backward;No Wrap)
                      Find/Change Where ({Current Doc})
                      Find/Change Match (Partial Word;Case
                      Insensitive;Alphabet Insensitive;CharRep
                      Insensitive;{Text Only})
                      Find/Change Action (Position After)
                      Find String (" ")
                      Find
                      If (!FindStatusFlag)
                      Beginning of Line ()
                      Find/Change Direction (Forward;No Wrap)
                      Find String ("http")
                      Find
                      End If
                      ;
                      Find/Change Direction (Forward;No Wrap)
                      Find/Change Action (Extend Selection)
                      Find String (" ")
                      Find
                      If (!FindStatusFlag)
                      End (Select)
                      End If
                      ;
                      If (SelectionFlag)
                      Copy
                      New Document
                      Paste Text
                      Select All
                      Cut
                      Close
                      Else
                      Alert ("I could not find a URL.")
                      Return
                      End If

                      Here is the Apple Script:

                      property URLLink : "http://"

                      tell application "Corel WordPerfect"
                      activate
                      Do Script "Grab URL"
                      end tell

                      tell application "Finder"
                      set URLLink to the clipboard
                      end tell

                      --This is here to see what the link looks like
                      display dialog URLLink

                      tell application "Safari"
                      activate
                      open location URLLink
                      end tell

                      Now the only thing that has to be fixed is to get the
                      link without , and . such as when a link looks like
                      http://www.something.com. <- getting only the link
                      and not any extraneous punctuation.

                      Also I don't know, can a Macro extract the actual
                      hyperlink? Maybe an Edit Hyperlink Dialog
                      command or something?

                      -Jonathan

                      --- John Rethorst <jrethorst@...> wrote:

                      > --- In wordperfectmac@yahoogroups.com, Steve Kane
                      > <skane@s...> wrote:
                      >
                      > > This AppleScript is so simple that I am guessing
                      > that there is some
                      > > other WordPerfect issue, but here it is anyway.
                      > ActiveURL is a text
                      > > variable in Panorama's procedure language that
                      > contains a url as
                      > > the result of a previous user action:
                      > >
                      > > tell application "Panorama"
                      > > set ActiveURL to Value of Cell "ActiveURL"
                      > > end tell
                      >
                      > There's no other issue, and your solution works but
                      > again requires
                      > a helper app. Here's something that requires only an
                      > Applescript.
                      > It needs to be saved as a stay-open application:
                      >
                      > on «event WWW!OURL» theURL
                      > open location theURL
                      > end «event WWW!OURL»
                      >
                      > [If the characters preceding and succeeding "event
                      > WWW!OURL"
                      > are garbled in this post, replace them with
                      > guillemets (double
                      > left and right carets, by typing option-backspace at
                      > the front
                      > and shift option-backspace afterwards.]
                      >
                      > The stay-open part is an inconvenience, and I'm
                      > looking for a way
                      > around that.
                      >
                      > BTW, to create an internet link in a WP doc: select
                      > the link in your
                      > text and run this macro:
                      >
                      > Copy
                      > Create Hyperlink (Internet;"";Clipboard)
                      > Display (On)
                      >
                      >
                      >
                      >
                      >




                      ____________________________________________________
                      Start your day with Yahoo! - make it your home page
                      http://www.yahoo.com/r/hs
                    • J Busch
                      John, Had another idea, but I am new to WP macros. Left () Edit Hyperlink Dialog --Code here that would copy the selected text --Close the dialog box I am not
                      Message 10 of 10 , Jul 31, 2005
                        John,

                        Had another idea, but I am new to WP macros.

                        Left ()
                        Edit Hyperlink Dialog
                        --Code here that would copy the selected text
                        --Close the dialog box

                        I am not sure how or if WP macros can contol these
                        actions or not. Could possibly do it with an
                        applescript but the only way I know how currently is
                        with a third party app that cost money.

                        -Jonathan

                        --- John Rethorst <jrethorst@...> wrote:

                        > --- In wordperfectmac@yahoogroups.com, Steve Kane
                        > <skane@s...> wrote:
                        >
                        > > This AppleScript is so simple that I am guessing
                        > that there is some
                        > > other WordPerfect issue, but here it is anyway.
                        > ActiveURL is a text
                        > > variable in Panorama's procedure language that
                        > contains a url as
                        > > the result of a previous user action:
                        > >
                        > > tell application "Panorama"
                        > > set ActiveURL to Value of Cell "ActiveURL"
                        > > end tell
                        >
                        > There's no other issue, and your solution works but
                        > again requires
                        > a helper app. Here's something that requires only an
                        > Applescript.
                        > It needs to be saved as a stay-open application:
                        >
                        > on «event WWW!OURL» theURL
                        > open location theURL
                        > end «event WWW!OURL»
                        >
                        > [If the characters preceding and succeeding "event
                        > WWW!OURL"
                        > are garbled in this post, replace them with
                        > guillemets (double
                        > left and right carets, by typing option-backspace at
                        > the front
                        > and shift option-backspace afterwards.]
                        >
                        > The stay-open part is an inconvenience, and I'm
                        > looking for a way
                        > around that.
                        >
                        > BTW, to create an internet link in a WP doc: select
                        > the link in your
                        > text and run this macro:
                        >
                        > Copy
                        > Create Hyperlink (Internet;"";Clipboard)
                        > Display (On)
                        >
                        >
                        >
                        >
                        >




                        ____________________________________________________
                        Start your day with Yahoo! - make it your home page
                        http://www.yahoo.com/r/hs
                      Your message has been successfully submitted and would be delivered to recipients shortly.