Open URL Passed from KM Public Web Server

MACRO:   @Web Open URL Passed from KM Public Web Server


VER: 1.0    2017-02-01 ~~~

DOWNLOAD:

@Web Open URL Passed from KM Web Server.kmmacros (27 KB)


ReleaseNotes

Author.@JMichaelTX

PURPOSE:

  • Open ANY URL (including custom URL schemes) passed by the KM Web Server

HOW TO USE:

  1. Create a URL like this:
    http://127.0.0.1:4490/action.html?macro=<YourMacroUUID>&value=<TheURLYouWantToOpen>
  • where the <YourMacroUUID> is the UUID of this macro
  • and the <TheURLYouWantToOpen> is just that, but MUST be URL encoded.
    .
  1. Execute the above URL from anywhere that will process normal, web, URLs.
    .
  2. I use this mostly to open files and folders on my Mac.
  • So, I have another macro that will create a rich-text hyperlink to the selected file/folder in the Finder.
  • MACRO: [KM] Make Link/URL to Open File/Folder via KM Web

WHAT IT DOES:

:warning: Warning! This uses the KM Public Web Entry, which may have some security issues. See KM wiki for details.

The KM Web URL is like this:
http://127.0.0.1:4490/action.html?macro=<YourMacroUUID>&value=<TheURLYouWantToOpen>

For example:

http://127.0.0.1:4490/action.html?macro=1238B406-69B6-4093-8E59-85431F7483AD&value=/Users/Shared/Dropbox/Your%20File%20Name.txt

TAGS:

USER SETTINGS:

  • Any Action in magenta color is designed to be changed by end-user
  • This macro uses Google Search and Google Chrome, but can be easily changed

ACTION COLOR CODES

  • To facilitate the reading, customizing, and maintenance of this macro,
    key Actions are colored as follows:
  • GREEN -- Key Comments designed to highlight main sections of macro
  • MAGENTA -- Actions designed to be customized by user
  • YELLOW -- Primary Actions (usually the main purpose of the macro)
  • ORANGE -- Actions that permanently destroy Varibles or Clipboards

REQUIRES:
(1) Keyboard Maestro Ver 7.2.1+
(2) Yosemite (10.10.5)+


By downloading or installing this software, you agree to the terms of usage in the below Action labeled "License and Usage Agreement". Do not install or use if you do not agree.



1 Like

I just want to use web server in KM. I didn't set the password or username just the port number but when I test the webserver in postman it gave me Html.
http://mojoservo.local:4490/action.html?macro=Test(This i am using) how I use webserver? Please help

Make sure the macro's public web trigger is enabled, and use the macro's UUID (which you can get from any of the "Or by script" triggers) in your URL:

So to run my WebTest macro from my local browser I'd use

http://127.0.0.1:4490/action.html?macro=46DD0A9E-58A7-4E17-8D80-B74378491484

Yes thanks it works but Now I want to ask can I save macro to my mysql db? When I create a macro its name and its uuid will be save to my db?

You have asked this question in another thread, please don't repeat the same question in multiple locations. If anyone wants to answer this, please answer here:

-rob.

1 Like