Page 1 of 1

active tool

Posted: Sun Dec 26, 2021 4:25 pm
by davoodice2
Hi friends
is there any way to change moho auto tool selection after select layer?
or activating a tool from script?

Re: active tool

Posted: Sun Dec 26, 2021 8:24 pm
by synthsin75
No, not without an external app to hit tool shortcuts. All Lua scripting can do is tell you the active tool: https://mohoscripting.com/methods/1227

Re: active tool

Posted: Sun Dec 26, 2021 9:09 pm
by davoodice2
synthsin75 wrote: Sun Dec 26, 2021 8:24 pm No, not without an external app to hit tool shortcuts. All Lua scripting can do is tell you the active tool: https://mohoscripting.com/methods/1227
thanks. and
what is benefit of currentTool() ? can you tell me s simple example of usage of that?

Re: active tool

Posted: Sun Dec 26, 2021 10:06 pm
by synthsin75
The create shape and add points tools use it like this:

Code: Select all

	if (moho:CurrentTool() ~= "LM_AddPoint") then
		return -- this could get called when doing a double-tap on a multitouch Wacom device with a different active tool
	end

Re: active tool

Posted: Mon Dec 27, 2021 1:03 pm
by davoodice2
synthsin75 wrote: Sun Dec 26, 2021 10:06 pm The create shape and add points tools use it like this:

Code: Select all

	if (moho:CurrentTool() ~= "LM_AddPoint") then
		return -- this could get called when doing a double-tap on a multitouch Wacom device with a different active tool
	end
understood thanks.