Giter VIP home page Giter VIP logo

cuda_macros's People

Contributors

alexey-t avatar kvichans avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

cudatext-addons

cuda_macros's Issues

Min sizeY of dlg

С миним высотой все плохо(кнопы внизу)

Small problem with !MacroName

If I create a new macro, and enter an existing name (say "Macro1") in the name input box, I get a another input box asking again for the name. If, originally, I wanted to overwrite "Macro1" I now enter "!Macro1"... but now, a new macro called "!Macro1" is created rather than Macro1 being overwritten. I think the second input should support the same options as the first.

(poll) What is more?

Давайте собирать идеи. Что еще может улучшить Макросы
(1) Импорт/Экспорт

(poll) Optimization

Давайте вместе подумаем, какие оптимизации можно провести в списке вызовов у макроса
(1) Две вставки текста можно заменить на одну

ed.cmd(cmds.cCommand_TextInsert,'A')
ed.cmd(cmds.cCommand_TextInsert,'B')

на

ed.cmd(cmds.cCommand_TextInsert,'AB')

label position is off

@Alexey-T @kvichans

maybe some recent commits broke the label position? (Windows OS)
please check if my diff is ok and merge.

cudatext_5Q86YJ9geS cudatext_EJSD4XUV7N
--- F:\MySSDPrograms\cudatext\py\cuda_macros\cd_macros.py
+++ untitled:____Plugin_for_CudaText_editor [8]
@@ -351,11 +351,11 @@
  +[dict(cid='waits'  ,tp='sp-ed',t=GAP* 7+HT_BTN* 6     ,l=l_btn+WD_BTN_3+GAP   ,r=l_btn+WD_BTN-40                  ,props='1,3600,1',en=only_rec_off   )]  # min,max,step
  +[dict(              tp='lb'   ,tid='waits'            ,l=l_btn+WD_BTN-40+GAP  ,w=WD_BTN   ,cap=_('sec')                                               )]
  +[dict(cid='chngs'  ,tp='ch'   ,t=GAP* 8+HT_BTN* 7     ,l=l_btn                ,w=WD_BTN   ,cap=_('While text c&hanges')                               )]
  +[dict(cid='endln'  ,tp='ch'   ,t=GAP* 9+HT_BTN* 8     ,l=l_btn                ,w=WD_BTN   ,cap=_('Until c&aret on last line')                         )]
  +[dict(cid='stst'   ,tp='bt'   ,t=GAP*11+HT_BTN*10     ,l=l_btn                ,w=WD_BTN   ,cap=stst_cap           ,props=def_stst                     )]
- +[dict(cid='view'   ,tp='ch'   ,t=GAP*14+HT_BTN*13     ,l=l_btn                ,w=WD_BTN   ,cap=_('Show actions')                                      )]
+ +[dict(cid='view'   ,tp='ch'   ,t=GAP*12+HT_BTN*13     ,l=l_btn                ,w=WD_BTN   ,cap=_('Show actions')                                      )]
  +[dict(cid='adju'   ,tp='bt'   ,t=    HT_LST-HT_BTN*2  ,l=l_btn                ,w=WD_BTN   ,cap=_('Ad&just...')                    ,en=only_rec_off    )]
  +[dict(cid='-'      ,tp='bt'   ,t=GAP+HT_LST-HT_BTN*1  ,l=l_btn                ,w=WD_BTN   ,cap=_('Close')                                             )]
  +(
   [dict(cid='acts'   ,tp='me'   ,t=GAP  ,h=HT_ACTS      ,l=l_acts               ,w=WD_ACTS                          ,props='1,1,1'                      )]  # ro,mono,border
   if vw_acts else [])

Cud 1.105, plugin don't add hotkeys for macros menuitems

@kvichans @tmsg-gh
maybe it worked before 1.105? but now not. plugin runs in "on_start" but it doesn't add hotkeys for my macros. I have 1 macro with Alt+W and menuitem for this macro has no Alt+W. (after Cud restart)

  • keys.json has Alt+W
  • macros -
{
    "ver": "20151204",
    "list": [
        {
            "id": 34882,
            "nm": "tst-edit",
            "rec": "150,m\n150,a\n150,c\n150,r\n150,o\n150,.\n",
            "evl": [
                "ed.cmd(cmds.cCommand_TextInsert,'macro.')"
            ]
        }
    ],
    "dlg_prs": {
        "h_acts": 450,
        "times": 1000,
        "h_list": 450,
        "w_acts": 500,
        "w_btn": 200,
        "w_list": 200
    },
    "tm_ctrl": {
        "rp_ctrl": 1000,
        "tm_wait": 10
    }
}

Import?

-exported macro to file, wrote name "dd.dd" in homedir
-i got file "dd.dd"
-i call import
-i CANNOT see file "dd.dd" in homedir- filter not allows?

wish. append extent to "dd.dd"===>"dd.dd.cuda-macro"

Er on start

Вместе с плагином ConfMenu (его только ставлю)
показывает ошибку при старте

Python 3.4.3
OK config menus from "/home/user/cuda/cuda/app/settings/menu.json"
Loading icons: LibreOffice_24x24
Loading toolbar config
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/cuda/cuda/app/py/cuda_macros/cd_macros.py", line 72, in on_start
    self._do_acts(acts='|reg|menu|')
  File "/home/user/cuda/cuda/app/py/cuda_macros/cd_macros.py", line 611, in _do_acts
    self.adapt_menu()
  File "/home/user/cuda/cuda/app/py/cuda_macros/cd_macros.py", line 96, in adapt_menu
    plg_ind = [i for (i,nm) in enumerate(top_nms) if '|plugins' in nm][0]
IndexError: list index out of range

Files .cuda-macro

System of macr files: i suggest files (json?) with ext .cuda-macro
and in folder settings/macros/
(auto create folder if none)
User can copy macro file. macro appears.

3 Plugins items

Слишком много-надо меню в Плагинс

Dlg not appears(bug)

Вызвал длг,
повсавил ОТКЛ правого мемо
нажал start rec,
напечатал символы, вызывают длг---НЕ вызывается

теперь еще Custom кнопа не выз-ся.

Empty list

Listbox пуст-тогда del/rename.... кнопы не пашут- ошибки в конс

btn caption

Export macros:
"ncheck a"-OSX обрезает ткс
(хочет показать пустое место, на крае)

Rework menu items for new Cud

From Alexey-T/CudaText#3756

  1. в бете Куд я сделал чтобы команда 'start recording' делала также и Стоп. две команды 'stop recording' / 'cancel recording' теперь deprecated. просьба адаптировать плагин (но пока только в ГХ, не релизить). чтобы сделать 'cancel' юзеру надо будет сделать 'stop recording' + отмена в диалоге.

Cud beta http://www.uvviewsoft.com/c/

  1. там же юзер просит новую команду "playback last recorded macro". сделаете, плиз? (тоже в ГХ, пока не релиз.)
    @kvichans

Run multiple times

Run... есть
Надо
Run multuple times... (оно сначала спрашивает число, если введено 0- то выполняет до упора, логика "до упора" неочевидная. не помню как Син.)

Time of run 10sec

If time (play) >10sec, give warn "Macro plays too long (> 10 sec). Still continue?"
Time is option in Custom (10sec deft)

example: type "ab"/play 10000 times

Menu needs "Stop/Cancel"

menu Macros
1)has Start item ONLY if empty list. pls do not only
2)has NO stop/cancel at all.

OK to have 3 items. str/stop/can. in menu.

chr2

откуда тут chr(2)?

c2

Store each macro to its own file

now: all macros are saved to 1 json.

not easy to move macros from 1 PC to another...

wish: on start, read old config, and MOVE all macros to separate .json files in settings/macros/.
make filenames like "macros/name_of_macro.json", name_of_macro is from old config, name_of_macro is not needed inside new json file.

on next starts, read OLD config + all NEW files settings/macros/*.json.

write all macros only to macros/*.json.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.