Yes, and rename the *.txt extension of the text file in *.lua. And put it in the script folder (you can access it via File/Scripts/Open Scripts Folder).
Hello, I would like to modify this script to make the bar only appear when I press a key and disappear when I press the key again.
I want the bar to appear right next to the cursor and I also want to customize the buttons to put the tools that I use, but that I donāt have in direct access with custom shortcuts.
Can I do that with the script.
Before I get into trouble I would like to know if it is possible.
The goal is to position the tools just within the cursorās reach so you donāt have to move the cursor to the toolbar.
What if it were round instead of rectangular?
You press a key, the circle appears in the middle of the cursor with the custom tools, you choose a tool and then the circle disappears again.
Then you would have a bunch of quick access tools.
Shortcuts + circle of quick tools.
All to avoid moving the cursor to the side toolbars.
El objetivo es ubicar las herramientas justo al alcance del cursor para no tener que desplazar el cursor hasta la barra lateral de herramientas.
ĀæY si fuese redondo en vez de rectangular?.
Pulsas una tecla, aparece el cĆrculo centrado con el curosr y con las herramientas personalizadas, eliges una herramienta y entonces el circulo desaparece nuevamente.
Entonces tendrĆas un montĆ³n de herramientas de rĆ”pido acceso.
Shortcuts + circulo de herramientas rƔpidas.
Todo para evitar desplazar el cursor a las barras de herramientas laterales.
hi, david, iām making custom toolbar based on this example and i wanted to add option to run a script. i avoided app.command.RunScript and used dofile as you recommended here: Opening one script with another - #3 by dacap with just a file name.
when alone in script it works fine, but here in dialog, when i wrap dofile in a function, i get an error message: cannot open xxx.lua: No such file or directory. to run a script i have to insert absolute path like this: :button{text="run",onclick=function() dofile( path .. 'xxx.lua') end}
iād prefer not to do that, what is the correct way to use relative path here?
Hi @Olga_Galvanova, Iāll check this, the dofile('./other-file.lua') should work for relative names, but if itās used from a function/callback used in a dialog that runs in the background, it might be a problem if you can local object = dofile(...) at the header of your script and then using the object in the onclick callback, I think that might be the best solution at the moment.
(This is because the ācurrent script pathā is lost when we exit the script, but the dialog is still running)
thank you for an answer!
iām still confused though, when i put local object = dofile(...) in my script, dofile is exectuted immediately.
on top of that when i use :button{text="run",onclick=object } it closes the script when i click the button, however if i use :button{text="run",onclick=function() object end} i get a syntax error. calling object() is attempt to call nil value, so i also tried local f = assert(loadfile("./xxx.lua")) f()
and nothing else in the script, because loadfile should return chunk as function, but i get No such file or directory error again. that same file which is executed by dofile perfectly fine.
so iām completely lost now :]]
oh, i understand now. this works, thank you!
but it would mean i have to duplicate all the scripts i want to use, so i guess sticking with absolute path is going to be easier for now :]]
but iām sure this will be handy in the future.
I installed the tool bar in this way, I just copy the code into a txt and rename to .lua, the script appear and run from Aseprite, but return an error.
Toolbar.lua:1: unexpected symbol near ā{ā
What I doing wrong?
Thank you very much for this incredible tool! I need this for iPAD too!