Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Autocomplete certain character combination into a text
#1
So far , i have moved most of my macros from other faulty, laggy, buggy macro programs to QM .
However , all but one.

I require a way for QM to turn my
;;
into
()

(In text) Turning typed double semicolons to parentheses .
I can currently do it , kind of . Typing in empty space gives me the result i want, hovewer .
I use that macro while coding . ie. Pressing semicolon 3 times should give me "();"
my function();
But i instead get
my function;;;

I really need this functionality , the ability to make some of my "expand text" macros to work anywhere everywhere all the time , without requiring any trigger situation or condition.
I have many other macros that require this ability. Any help will be appreciated.

Thank you in advance..
#2
It works in new QM version 2.3.5.
QM 2.3.5
#3
Cant seem to get it to work , does it require something different in header section ?
/b/i
etc
#4
Autotext Autotext
Trigger $t     Help - how to add the trigger to the macro
Code:
Copy      Help
/b/i/c/p3
;; :"()"

or

Autotext Autotext2
Trigger $t     Help - how to add the trigger to the macro
Code:
Copy      Help
/b/i/c
;; :"()"

Works in QM 2.3.5. Trigger must be Autotext, not Keyboard.
In older QM would not work after a word, eg Function;;
#5
I have tried this as new->Autotext list->Working Raw

Then changed it into
Code:
Copy      Help
/b/i/c
;; :"()"

My list of Extra delimiter characters in options are
]*/[-=%;


And

function;; still doesnt change to function()
alone ;; do change to ()

:S
#6
In Options you can set additional non-delimiter characters. Default are all alphanumeric. Remove ; because now ; is interpreted in the same way as alpanumeric characters and therefore the autotext does not work if typed after an alphanumeric character. That is the purpose of this option.
#7
with triggers as
]*/[-=%

It still doesnt work
Code:
Copy      Help
/b/i/c
;; :"()"

It stopped working alone aswell.
;;;; nothing.
function;;;;;; nothing.
#8
Don't need to specify something in trigger. Just select Autotext trigger and nothing more. And don't need any changes in Options.
#9
I have created a new autotext macro
new->new autotext list ->working with sample items

and then just changed its header
Code:
Copy      Help
/b/i/c

SIMPLE TEXT EXAMPLES
sim :'"simple text" ;;inserts simple text when you type sim and postfix (Ctrl, space, comma, Enter...)
simp :"paste text" ;;same as above, but uses clipboard instead of keys. If 'Hybrid paste' checked in Options, uses keys for short text, clipboard for long text.

FORMATTED TEXT EXAMPLES
dt :str s.timeformat("{DD} {T}"); key (s) ;;current date and time. To add the code, you can use the Text dialog from the floating toolbar.
inpn :if(inp(_i "a number")) key F"the number is {_i}" ;;manual text input

POPUP LIST EXAMPLE
If there are several matching items, shows a popup list. Select an item with mouse, Enter, Tab or a number key.
PL :'"list item 1"
PL :'"list item 2" ;;Label


Now when i type sim it expands into simple text
but
testsim doesnt expand into "testsimple text"
#10
Correct. Does not expand sim because it begins with a word character, but will expand ;; always.
#11
When i add
Code:
Copy      Help
;; :"()"
into the previous autotext
so that it becomes
Code:
Copy      Help
/b/i/c

SIMPLE TEXT EXAMPLES
sim :'"simple text" ;;inserts simple text when you type sim and postfix (Ctrl, space, comma, Enter...)
simp :"paste text" ;;same as above, but uses clipboard instead of keys. If 'Hybrid paste' checked in Options, uses keys for short text, clipboard for long text.

FORMATTED TEXT EXAMPLES
dt :str s.timeformat("{DD} {T}"); key (s) ;;current date and time. To add the code, you can use the Text dialog from the floating toolbar.
inpn :if(inp(_i "a number")) key F"the number is {_i}" ;;manual text input

POPUP LIST EXAMPLE
If there are several matching items, shows a popup list. Select an item with mouse, Enter, Tab or a number key.
PL :'"list item 1"
PL :'"list item 2" ;;Label
;; :"()"

;;;;;
Doesnt work. Not without adding ; as a delimiter character in options. Then it becomes as it were in older version of QM.
Apparently what this new version has brought doesnt currently work in my computer , i have unicode selected in options .
In case it helps. Using english keyboard. English os. Win7 etc. And only QM is working , i dont have any other keyboard affecting software atm.
#12
Now I tested in empty file with just 1 autotext list. ;; does not work. Added another autotext list with single item and /p3. Then works. Will need to fix it in next QM.

To make it work now, add another autotext list. Can be disabled.
Autotext Autotext unused
Trigger $t     Help - how to add the trigger to the macro
Code:
Copy      Help
/p3
this_is_just_a_workaround :""
#13
Yes , the file you have sent works . Looks like i will have to wait until next fix, thank you for your efforts Gintaras .
QM is still the best software in my computer Smile
#14
Don't need to wait. Can make it work now. Create new autotext list with Autotext trigger and paste:
/p3
this_is_just_a_workaround :""

Can disable it.
#15
I did as you said , i dont know how but workaround made it work .
This will do , until next fix then , thank you very much !
Here comes bunch of new macros to my QM wee Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)