Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Popup menu for Autotext-items?
#1
I have a few autotext items for personal data. Usually I remember the (long) words that trigger them - but some that I use seldom are easier to forget. So I would like to create a popup menu showing selected items from a Autotext-list (ideally name & "trigger text") and allow selection & activation of any item through the menu.
So far I have discovered that I could use the same trigger text and get the menu - but I still would like to be able to use the "direct method" via targetted keywords (when I remember them).  

One way to solve this would be to repeat entries with an alternative trigger:
Code:
Copy      Help
infotext : "Some text"
infot: "Some text"

infomore :"More text"
infot :"More text"

infolist: "Cat,Dog,Horse,House,Car"
infot: "Cat,Dog,Horse,House,Car"

But I dislike the duplication here - things might get out of sync. Is there a way I could setup "infot" to present a choice of "infotext, infomore and infolist" and execute it?
#2
Probably there are no other easy ways.

Could create macro that processes text of an autotext list and creates new autotext list that shows menu.
But then need to remember to run the macro after each change in the first autotext list.
Example:

You create this autotext list. It replaces when typed long text.
Autotext Autotext19
Trigger $t     Help - how to add the trigger to the macro
Code:
Copy      Help
/b/i/c/p3
infotext :"Some text"
infomore :"More text"
infolist :"Cat,Dog,Horse,House,Car"

The macro would create this new autotext list. It shows menu.
Autotext Autotext19_menu
Trigger $t     Help - how to add the trigger to the macro
Code:
Copy      Help
/b/i/c
info :"Some text"
info :"More text"
info :"Cat,Dog,Horse,House,Car"
#3
Ah, yes - but as you said, it needs manual intervention and therefore has the same risk of getting out of sync as the current solution...
#4
could create autotext entry infot that runs a sub function and processes autotext file and shows a dynamic menu consisting of infotext,informore, and infolist that will act just like an autotext list.
try this

Autotext Autotext
Trigger $t     Help - how to add the trigger to the macro
Code:
Copy      Help
/b/i/c
infot :sub.Sub2
infotext :"Some text"
infomore :"More text"
infolist :"Cat,Dog,Horse,House,Car"

#sub Sub2
str d s.getmacro(getopt(itemname 6))
ARRAY(str) a
findrx(s "(info.+ ):(''.+'')" 0 4 a)
for _i 0 a.len
,d.formata("%i %s-%s :%s[]" _i+1 a[1 _i] a[2 _i] a[2 _i])
d.trim
d-" /pos text /noicons[]"
DynamicMenu(d "" 1)
#5
Wow, that's neat...and inspiring  Wink
Thanks a lot!


Forum Jump:


Users browsing this thread: 1 Guest(s)