This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
action:Custom_HTML_Prompt [2017/09/05 01:49] peternlewis [Downloads] |
action:Custom_HTML_Prompt [2017/09/06 02:27] peternlewis [See Also] |
||
---|---|---|---|
Line 9: | Line 9: | ||
===== How To Use ===== | ===== How To Use ===== | ||
+ | |||
- Create a standard HTML page with a form that uses [[token:Variable|Keyboard Maestro Variables]] in the Form Field //Name// attribute | - Create a standard HTML page with a form that uses [[token:Variable|Keyboard Maestro Variables]] in the Form Field //Name// attribute | ||
* If the Variable contains spaces, you must replace them with underscores (`_`) in the HTML code | * If the Variable contains spaces, you must replace them with underscores (`_`) in the HTML code | ||
Line 20: | Line 21: | ||
You design the HTML form using standard HTML code, which can be stored in either a file or as text in the Action. You can, of course, use any Web/HTML editor you like. If you'd like some suggestions, see the [[Custom_HTML_Prompt#WebHTML_Editors|Web/HTML Editors]] section at the bottom of this page for editors that others have found useful. | You design the HTML form using standard HTML code, which can be stored in either a file or as text in the Action. You can, of course, use any Web/HTML editor you like. If you'd like some suggestions, see the [[Custom_HTML_Prompt#WebHTML_Editors|Web/HTML Editors]] section at the bottom of this page for editors that others have found useful. | ||
- | |||
- | |||
- | ---- | ||
===== HTML Window Design ===== | ===== HTML Window Design ===== | ||
Line 57: | Line 55: | ||
Then you can control-click on elements and use Inspect Element and get an inspector window, including a Console tab. | Then you can control-click on elements and use Inspect Element and get an inspector window, including a Console tab. | ||
- | ---- | ||
===== Using Keyboard Maestro Variables in the HTML Form ===== | ===== Using Keyboard Maestro Variables in the HTML Form ===== | ||
- | |||
Keyboard Maestro ensures sync between *Keyboard Maestro Variables* and the HTML form field values. The **[[http://www.w3schools.com/Tags/att_input_name.asp|HTML name attribute]]** is used to identify the *Keyboard Maestro Variable*. For example, **''Web Name''** is the *Keyboard Maestro Variable* shown below in the HTML **[[http://www.w3schools.com/Tags/tag_input.asp|<input>]]** tag. You must replace spaces in the *Keyboard Maestro Variable* name with underscores when used on the HTML form. | Keyboard Maestro ensures sync between *Keyboard Maestro Variables* and the HTML form field values. The **[[http://www.w3schools.com/Tags/att_input_name.asp|HTML name attribute]]** is used to identify the *Keyboard Maestro Variable*. For example, **''Web Name''** is the *Keyboard Maestro Variable* shown below in the HTML **[[http://www.w3schools.com/Tags/tag_input.asp|<input>]]** tag. You must replace spaces in the *Keyboard Maestro Variable* name with underscores when used on the HTML form. | ||
Line 99: | Line 95: | ||
|*data-kmignoresubmit* |avoid saving form field back to the *Keyboard Maestro Variable*| | |*data-kmignoresubmit* |avoid saving form field back to the *Keyboard Maestro Variable*| | ||
|*data-kmignore* | avoid setting and saving the form field| | |*data-kmignore* | avoid setting and saving the form field| | ||
- | |||
- | |||
- | ---- | ||
===== Using JavaScript ===== | ===== Using JavaScript ===== | ||
Line 145: | Line 138: | ||
(!) Be aware that the system will not allow Keyboard Maestro Engine to see keys typed in its own windows so the [[trigger:Typed String | Typed String triggers]] will not work within Keyboard Maestro Engine windows. | (!) Be aware that the system will not allow Keyboard Maestro Engine to see keys typed in its own windows so the [[trigger:Typed String | Typed String triggers]] will not work within Keyboard Maestro Engine windows. | ||
- | |||
- | ---- | ||
===== See Also ===== | ===== See Also ===== | ||
Line 153: | Line 144: | ||
* [[action:Alert|Alert]] action | * [[action:Alert|Alert]] action | ||
- | * [[action:Prompt for User Input|Prompt for User Input]] | + | * [[action:Get_Touch_Bar_Selection|Get Touch Bar Selection]] action |
+ | * [[action:Prompt_for_User_Input|Prompt for User Input]] action | ||
+ | * [[action:Show_Palette_of_Macros|Show Palette of Macros]] action | ||
* [[:Actions|See all Actions]] | * [[:Actions|See all Actions]] | ||
Line 184: | Line 177: | ||
* If your favorite Web/HTML editor is not listed here, and you would like to include it, post a request in the [[https://forum.keyboardmaestro.com/c/wiki|Keyboard Maestro Forum, Wiki section]]. | * If your favorite Web/HTML editor is not listed here, and you would like to include it, post a request in the [[https://forum.keyboardmaestro.com/c/wiki|Keyboard Maestro Forum, Wiki section]]. | ||
- | |||
- | --- | ||
**Keywords:* Custom HTML Prompt, User Prompt, HTML, Dialog | **Keywords:* Custom HTML Prompt, User Prompt, HTML, Dialog |