Toolbar custom button to run a script

 
Is it possible to run a script from a user created button placed on a toolbar, as distinct from the screen?
 
AFAIK WinAPI only
 
qjol:
AFAIK WinAPI only

Seems so. Too bad.

It would be useful that MT4 at least provided a few extra toolbar buttons that the user could code to run scripts . Maybe an alternative to to using Hotkeys.

 
rod178:
Is it possible to run a script from a user created button placed on a toolbar, as distinct from the screen?
Why not use the Favorites ?
 
rod178:

Seems so. Too bad.

It would be useful that MT4 at least provided a few extra toolbar buttons that the user could code to run scripts . Maybe an alternative to to using Hotkeys.

is it so bad to use winapi ?
 
qjol:
is it so bad to use winapi ?

WinAPI is overkill and favirites too limiting

Decided to develop a pseudo toolbar in a new pane using MT4's 'now availanle OBJ_BUTTON, OnChartEvent(), CHARTEVENT_OBJECT_CLICK.

 

Right click your script > set hotkey.



1221


 

already have numerous Hotkeys attached to scripts, too many actually. Prefer a GUI alternative.

The nice aspect of using the Buttons is that they provide feedback as to 'state'

 
Yes, you can use object and create it in subwindow. Works like a charm.
Reason: