Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to locate the item After sorting
#39
Sorry, my statement above is incorrect

I want to add the following function to sub function #sub DisableEnableAutoText
________________________________________________________________________________
    case 7 ;;Sort autotext in qm not dialog
    int sep
    LB_SelectedItem(id(4 hDlg)  _s)
    str s=sub.getAutotextItem(_s sep)
    ARRAY(str) a=s
    a.sort(2 sub.Callback_q_sort)
    s=a
    s.rtrim
      code: Write the sort result to the original file
    mac+ _s
    h=GetQmCodeEditor
    act h
    SendMessage(h SCI.SCI_GOTOLINE 1 0)
    int ssp=SendMessage(h SCI.SCI_GETCURRENTPOS 0 0)
    SendMessage(h SCI.SCI_SETSEL ssp sep)
    s.setclip
    SendMessage(h SCI.SCI_PASTE 0 0)
__________________________________________________________________________________

Without this sort function, I can't control the order of the same items

[Image: aa.png]

Autotext Autotext
Trigger $t     Help - how to add the trigger to the macro
Code:
Copy      Help
/b/i/c/m
zz :sub.Sub1 ;;0test
abc :sub.Sub4 ;;3test
abc :sub.Sub2 ;;1test
abc :sub.Sub3 ;;2test


#sub Sub1 m ;;zz    0test
mes 0

#sub Sub2 m ;;abc    1test
mes 2


#sub Sub3 m ;;abc    2test
mes 3


#sub Sub4 m ;;abc    3test
mes 4


Messages In This Thread
how to locate the item After sorting - by macman - 01-17-2021, 12:21 AM
RE: how to locate the item After sorting - by macman - 02-01-2021, 04:31 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)