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

Run script by icon

Participant ,
Jul 02, 2017 Jul 02, 2017

Copy link to clipboard

Copied

Hi

Can I add toolbar icon and connect javascript to them

thanks

TOPICS
Scripting

Views

396

Translate

Translate

Report

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
Guide ,
Jul 02, 2017 Jul 02, 2017

Copy link to clipboard

Copied

There is no scripting support to create a tool, you'd need a C++ plugin.

Tool manager requires several configuration settings which can only be supplied during startup (icon, tool type, should it get added as sub-tool, is it about selection or creation, associated key).

A typical tool also introduces a new mouse cursor (separate resources) and associated trackers (e.g. working differently over a text window or specific page items), may be repeatedly called while you move the mouse (dynamic command), cause interactions with the touched areas (temporarily draw dedicated adornments - e.g. those handles and other highlights) or on top of them (draw sprites), have to handle scrolling (maintain active page), establish an own selection or influence the existing one, even be reflected in some larger panels such as the control strip or the info panel.

All doable with a plugin - actually above describes my first plugin, you could even trigger a script event on many occasions, but it would still be wired to a specific use scenario.

Votes

Translate

Translate

Report

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
Guru ,
Jul 03, 2017 Jul 03, 2017

Copy link to clipboard

Copied

Hi Robert,

If you don't need the icon to be added specifically to the tools bar (which it sounds very much like you do) then you can create an HTML extension to add an icon to the non-tools bar.

2017-07-03_14-57-47.png

Votes

Translate

Translate

Report

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
Participant ,
Jul 04, 2017 Jul 04, 2017

Copy link to clipboard

Copied

LATEST

how? any examples to create an HTML extension to add an icon to the non-tools bar.

Many Thanks!

Votes

Translate

Translate

Report

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