Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Make lasso the active tool trough javascript

New Here ,
Aug 31, 2014 Aug 31, 2014

Hello,

ok, i know almost nothing about javascript but i am trying to collect some javascripts from the net to use as actions.

i am using some scripts in photoshop as actions. What i want to do is use the lasso tool in between actions. But i cant make yhe lasso tool the active tool trough actions forcing me to select it manually.

does anyone know if you can do this with a simple script?

Another problem is that i dont know how to set a brush hardness to 0% with script.

What i would also like to know is if it is possible to make a select all function in the active textlayer..

The internet isn't really helpfull with these questions. I hope someone could help me with this

thanks in advance for helping!

TOPICS
Actions and scripting
990
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Aug 31, 2014 Aug 31, 2014

If its for you own machine and environment you can select the lasso tool in an action simple by creating a preset for the Lasso tool naming it something like SelectLasso.  The record Select Tool Preset "SelectLasso". You could also use Action Manager code in a script to do the same.

Capture.jpg

The Problem is you can not make the action public because it relies on there being a preset for the lasso tool with that name. You can not record an action to create the lasso tool preset.  It need to be done manually, but once created it can be used in actions....

You can also create Brush presets and use them in actions.

You may find some useful info in my package here

Crafting Actions PackageUPDATED Aug 10, 2014 Added Conditional Action steps to Action Palette Tips.
Contains

Example
Download

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 02, 2014 Sep 02, 2014

Thank you for your quick reaction.

however, i cant record the lasso tool unless i use it to make a selection. Can't i just make it the active pallet tool with an or code? Because I don't know the javascript that targets it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 02, 2014 Sep 02, 2014

Your wrong as I wrote its simple.  Open Photoshop. Select The Lasso tool to activate the tool. Use the first icon in the tool option bar little down point triangle to pop-open the pull-down menu. In that menu on the top right you will see a gear icon and an icon below it click on that icon to save a new Preset. Name the new preset SelectLasso.  Next select the move tool. Then in the bottom of the Actions palette click on the icon the looks like a folder.  Name the new Action Set SelectPreset.  Next click on the icon next to the one that looked like a folder the one before the trash icon.  Name the new Action SelectLasso and the click the record button in the new action dialog.   Next use the first icon in the tool option bar little down pointing triangle to open the pull-down menu.  If you do not see all tools preset you have on your system. Un-Check the Current Tool Only check box in the bottom of the pull down menu. Then click the SelectLasso preset name. That should be recorded into the Action.  In the bottom of the Actions Palette click the stop button the action is complete.  Select any tool other the the lasso in the tool palette to activate. Then highlight the SelectLasso Action in the Action Set SelectPreset and click the play button.  The Lasso tool should become active.

In the following you should see the Line tool is currently Active tool. The Preset Named SelectLasso and the action set SelectPreset and the action SelectLasso. Then when I highlight the Action SelectLasso and click the play button that the Lasso tool becomes active.  View the image in a new browser tab or window and scale to actual size. This site scale image poorly many are unreadable.

Capture.jpg

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 03, 2014 Sep 03, 2014
LATEST

I see,

Thank you for the clear explanation. I didn't know that you could make and select tool presets that way.

It works great now!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines