Hi friends
is there any way to change moho auto tool selection after select layer?
or activating a tool from script?
active tool
Moderators: Víctor Paredes, Belgarath, slowtiger
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
active tool
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
- synthsin75
- Posts: 10047
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: active tool
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
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
Re: active tool
thanks. andsynthsin75 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
what is benefit of currentTool() ? can you tell me s simple example of usage of that?
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
- synthsin75
- Posts: 10047
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: active tool
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
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
Re: active tool
understood thanks.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
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش