Automate XD commands via script
Hot Search/ Run:
Not only saves time, but also very much easy to use.
Now a days, We(user) want "on hands".
Say if i'm half the way of designing any interface
and trying to insert any symbol/ object/ element to particular place
It would be obvious to go, search for "symbol, library panel" and then find the appropriate element like Large Button, Navigation.. and finally drag drop to the screen.
Instead we could search for what we want in a single interaction.
If we are searching for it, We would have already created/ known about it. (Let it be symbols or executing any menu commands).
It could also done by solving some of the pain points the current sketch runner plugin has.
For example: If I am searching for a symbol using the runner, and trying to use a particular symbol.
1) I should Click it.
.... It randomly adds the symbol in to screen.
How about getting the symbol on the place were the cursor is present.
From that,
we can place the cursor were the item need to be created and then search for [xyz] and confirm it. (So that it adds the element in place)
This way works well for reusable element.
Likewise we could get more out on other commands/ any.
-
BenKapa commented
Useful script, I found it very useful, I'm thinking of applying it to https://epiccarry.com
-
Quintan Barnes commented
I think it will be useful for all those who are engaged in designing. When you don't know how to write an effective call center script, it's best to refer to https://wow24-7.io/blog/how-to-write-an-effective-call-center-script and it will help you create a good project. Thus, this will serve as a good way to ensure that the project is at its best.
-
Bostjan Vidovic commented
XD needs something like sketchrunner and Figma quick menu / launcher for quick access to run plugins, add assets to art board, apply styles, jump between windows (files) ...
-
Danny commented
Please port from Sketch to XD. https://sketchrunner.com/
-
David XD commented
XD already provides a rich automation framework using plugins (written in JavaScript). You can find out more information here:
https://adobexdplatform.com/plugin-docs/develop.html -
xd_user-56 commented
Would be great to be able to automate use of XD via scripting, as seen in other Adobe applications (Illustrator, InDesign) through the use of Javascript or AppleScript.
-
Julia Hoang commented
Man that would be awesome. Switching workflow from sketch to adobe XD is still such a pain....
-
Martin Klausen commented
Yes! Being able to access the search bar in the assets panel with a keyboard shortcut -> type name of symbol and press enter -> have the symbol placed in the active Artboard or connected to the mouse pointer for easy positioning would be a super handy way to speed up the workflow.
-
Pb commented
Another extension of this idea is allow us to add custom properties to the layers, simply as a key | value table.
Having all that we would have enough dynamism to make of Adobe XD anything we want.
I could make a script to convert my design into HTML automatically.
I could make a script to convert my design into a custom game UI interface system, binary or not. -
Pb commented
1. Script engine that allows to interact with the design and components specs.
2. As a developer, once my design is finished, I have to perform some quite repetitive tasks, those could be simplified if I could write a script such as JavaScript which has access to the Artboards and Layers containing their specs.
A script system would open a whole new world for developers to take the best of Adobe XD.
I could possibly create scripts to transform the design into binary data rather than having to create my own edit tools.
I could possibly create scripts to automate tasks like saving, renaming + saving, etc.
Plus a javascript engine embedded can not only benefit developers as front end developers that could have some pre-defined component behavior features, rendering a more interactive design prototype. (I order a design and the designer forgets to make samples of hover buttons and other interactions)3. Example of things that I would like to be able to do:
var artboard = engine.artboards['main-page'];
//Some possible selections
var layers = artboard.selectedLayers();
var layers = artboard.layers;
var layers = artboard.layersContaining('button');//Layer data printing.
for (layer in layers) {
print("Layer: " + layer.name + ", x: " + layer.x + ", y: " + layer.y);
}//Cool feature
layer.getPositionRelative(otherLayer);//Maybe automatic layer renaming. (Useful for exporting)
for(i = 0; i < layers.length; i++)
layer.name = "Button " + i;The possibilities are endless if we have access to the components specs.
-
Mitsuki commented
It would be great if we can toggle a simple text base launcher and run commands by just typing...
Here's a great example: http://sketchrunner.com/
Sketch Runner also shows keyboard shortcuts and it's really helpful! -
[Deleted User] commented
It would be great to have an Action window to ***** actions and execute them both once and as batch like Photoshop.