Copy link to clipboard
Copied
Someone could be kind to create a small panel with only one slider that changes opacity to the level with the name test.
Thanks to those who help me
You weren't that far
Copy link to clipboard
Copied
Yes those nice guys are called Freelancers. They will give you their best in exchange for some money covering the time they will spend helping you.
Or you could start trying on your own, learning from scratch as we have all done, and find a lot of people who will help and encourage you in your efforts.
Loic
Copy link to clipboard
Copied
you are definitely right
unfortunately I have reached the age of 60 and I no longer have the ability to learn how to do these things, that's why I called for help, if someone can help me and welcome me otherwise I'm sorry and I leave it alone.
good day to all
Copy link to clipboard
Copied
60 is the new young !
Ok what is the "level" need. I am afraid I can't get the idea ?
Copy link to clipboard
Copied
Thanks for the compliment
the level has the name sharpen.
Copy link to clipboard
Copied
Let's rewind this. What app are you targeting exactly ? Photoshop ? If so the sharpen filter has its own ui so what would be the point of adding one ?
Copy link to clipboard
Copied
I should use it with photoshop cc2018
I put sharpen as a test name only
I try to use this code
the slider appears on html page but does not work
there must be an error that I can not see
code
js/main.js
// this instantiates the csInterface which allows us to communicate with the ExtendScript runtime
var csInterface = new CSInterface();
function sliderOnChange(value) {
// here we call call the "setLayerOpacity" function on the ExtendScript side
csInterface.evalScript("$.global.setActiveLayerOpacity(" + value + ")");
}
jsx/Photoshop.jsx
$.global.setActiveLayerOpacity = function (layerOpacity) {
if (!app.activeDocument || app.activeDocument.activeLayer) {
alert('Please select a layer!')
return
}
app.activeDocument.activeLayer.opacity = setLayerOpacity;
}
index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="./ext.js"></script>
<script src="./lib/CSInterface-4.0.0.js"></script>
<link id="ppstyle" rel="stylesheet" type="text/css" href="./style.css">
<title>Test</title>
</head>
<body>
<div id="content">
<input type="range" min="0" max="100" value="0" step="1" id="opacity" name="opacity" onChange="sliderOnChange(this.value)"/>
<script src="./js/main.js"></script>
</div>
</body>
</html>
Copy link to clipboard
Copied
You weren't that far
Copy link to clipboard
Copied
Loic.Aigon
the link does not work
Copy link to clipboard
Copied
Try again…
Copy link to clipboard
Copied
Now it's perfect
a question when I click on the reload button the slider goes to end of stroke but the opacity does not change
you can set that when I click on reload it brings me the opacity to 100.
if this change takes time, let it go.
Thanks for your help
Copy link to clipboard
Copied
The opaque slider works well for what I do
I would just like to add the percentage as in video
gentilmante can be added
thanks for everything
Copy link to clipboard
Copied
You could either use slider onchange function to update the text :
javascript - HTML5 Slider with onchange function - Stack Overflow ttps://stackoverflow.com/questions/13896685/html5-slider-with-onchange-function​
Or use Some fancy frameworks like Angular, Vue or React to have your text updated through model changes :
https://vuejsexamples.com/very-simple-vue-slider-bar-component/
Copy link to clipboard
Copied
Very helpful
very kind
Thank you