It would be nice to be able to assign IDE actions to a hotkey. Imagine one or more comment link actions being performed when you press a hotkey. A simple example would be Ctrl-M running the IDE command ide://goto?Module=Main. There could be a separate interface for this, or something like a separate code module.
In the code module, it could be defined something like:
B4X:
#MACRO: Go to Main module
#ACTIVATION: Ctrl-M
#COMMAND1: ide://goto?Module=Main
#MACROEND
Or:
B4X:
'Go to Main module.
#MACRO: Ctrl-M, ide://goto?Module=Main
'Go to Activity_Create
#MACRO: Ctrl-A, ide://goto?Sub=Activity_Create
while i think macros in the IDE would be a welcome addition, i think writing them as code in the modules is a strange approach, also leading to potential problems (malicious macros embedded into projects?)
a record/play approach, alas notepad++, seems more appropriate
while i think macros in the IDE would be a welcome addition, i think writing them as code in the modules is a strange approach, also leading to potential problems (malicious macros embedded into projects?)
a record/play approach, alas notepad++, seems more appropriate
The reason I suggested having a module for it is that this would allow you to use a different set of macros in different apps. I think the risk would be low as it requires the user to activate the macro to run it. I don't think record/play would be needed. You can do that yourself with other programs like Macro Express.
Some possibilities:
Open a folder (like shared files or objects)
Open a website
Open a document (like a change log, testing list spreadsheet, etc...)
Run a program
An additional thing that could be done would be to act on a text selection.
B4X:
'search b4x forum for the selected text
#MACRO: CTRL-1, https://www.b4x.com/android/forum/pages/results/?query=[selected_text]
'use Google to search for the selected text
#MACRO: CTRL-2, https://www.google.com/search?q=site%3Ab4x.com+[selected_text]
'open selected text corresponding to a file in the assets folder
#MACRO: CTRL-3, file://%PROJECT%\[selected_text]