• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Man entry to pdf variant command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Man entry to pdf variant command


  • Subject: Re: Man entry to pdf variant command
  • From: Laine Lee via AppleScript-Users <email@hidden>
  • Date: Thu, 11 Feb 2021 13:11:48 -0600
  • Thread-topic: Man entry to pdf variant command

At Axel Lüttgens’ suggestion, I’ve updated my script so that specific
documentation requests are opened in Safari rather than in Preview. It’s then a
trivial matter to save as a pdf, if desired. I’ve tested with two specific help
commands: “ffmpeg -h full” and “other-transcode --help full”. Please let me
know if it fails with others. Thanks.




try

                     set z to the clipboard

on error

                     set z to ""

end try

set x to "/usr/local/bin/"

display dialog "Specify the executable name or the documentation request
command:" default answer z

set z to text returned of result

if z contains ("" & space) then

                     set y to x & z

                     do shell script y & space & "| open -f -a
/Applications/Safari.app"

else

                     set x to z

                     do shell script "man -t" & space & x & space & "| open -f
-a /Applications/Preview.app"

end if





Laine Lee

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Addressing a page in Microsoft Word (Christian Boyce)
  • Next by Date: Any idea why this script stopped working when I upgraded to Big Sur?
  • Previous by thread: Re: Addressing a page in Microsoft Word (Christian Boyce)
  • Next by thread: Any idea why this script stopped working when I upgraded to Big Sur?
  • Index(es):
    • Date
    • Thread