kvichans / cuda_macros Goto Github PK
View Code? Open in Web Editor NEWCudaText plugin to manage app macros
CudaText plugin to manage app macros
С миним высотой все плохо(кнопы внизу)
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.
Давайте собирать идеи. Что еще может улучшить Макросы
(1) Импорт/Экспорт
Давайте вместе подумаем, какие оптимизации можно провести в списке вызовов у макроса
(1) Две вставки текста можно заменить на одну
ed.cmd(cmds.cCommand_TextInsert,'A')
ed.cmd(cmds.cCommand_TextInsert,'B')
на
ed.cmd(cmds.cCommand_TextInsert,'AB')
keys_json = app.app_path(app.APP_DIR_SETTINGS)+os.sep+'keys.json'
now it's local (2 places?)
@MiroslavMatas @kvichans
I move discusstion here
@kvichans can search all info in Cud wiki.
Alexey-T/CudaText#2521
maybe some recent commits broke the label position? (Windows OS)
please check if my diff is ok and merge.
--- 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 [])
Show msg if not
@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)
{
"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
}
}
-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"
Вместе с плагином 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
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.
Слишком много-надо меню в Плагинс
Вызвал длг,
повсавил ОТКЛ правого мемо
нажал start rec,
напечатал символы, вызывают длг---НЕ вызывается
теперь еще Custom кнопа не выз-ся.
Listbox пуст-тогда del/rename.... кнопы не пашут- ошибки в конс
слишком мало 1000.
надо 100 000
не нашел где вы для spinedit контрола ставите 1000, Куд тоже не ставит
Export macros:
"ncheck a"-OSX обрезает ткс
(хочет показать пустое место, на крае)
Cud beta http://www.uvviewsoft.com/c/
Run... есть
Надо
Run multuple times... (оно сначала спрашивает число, если введено 0- то выполняет до упора, логика "до упора" неочевидная. не помню как Син.)
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 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.
Wish
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.