Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Predefined variable for the mouse pointer
#18
If a code editor auto-indents code and you want to avoid it, use paste, not key.

Function PasteAutoInputDialog
Code:
Copy      Help
;/
function $template

;Calls <help>AutoInputDialog</help> and pastes the text. Also sets caret if need.

;EXAMPLE
;_s=
;F
;;Dear Mr. $inp_Customer$,
;;
;;thank you for contacting us. The price is $$inp_Price$. Let's meet next $inp_Day$.
;;
;;Thanks and best regards,
;;$set_CaretHere$
;;
;;$var_ShortDate$
;;
;PasteAutoInputDialog(_s)


int nLeft
str s=AutoInputDialog(template nLeft)
spe 10
paste s
if(nLeft) key L(#nLeft)

Other option - before key insert opt keychar 1. Then some code editors, including QM, will not auto-indent when previous line is tab-indented. But still will auto-indent after lines such as 'if', 'sel', 'rep'. Better paste.


Messages In This Thread
RE: Predefined variable for the mouse pointer - by Gintaras - 04-09-2019, 07:44 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)