Does anyone know how to de-select all objects programmatically?

Malcolm Boekhoff
20
Malcolm Boekhoff  
I want to write a script that d-eselects all objects in the main window so that I can attach it to a shortcut key (e.g. control+shift+A). Does anyone know how to do this in MQL4 code please? Otherwise, is there a way to attach a key to the "deselect all" menu item? I suppose I could send the approprite menu keys to the application via a script but I would like to call the proper function if there is one.
[Deleted]  
take a look codebase.mql4.com/5510
D0n
28
D0n  

Do you mean you want to remove the surrounding selection boxes from the objects on the chart?

I would do this (let's say there is only one object named "MyObject"):

ObjectSet("MyObject", OBJPROP_TIMEFRAMES, -1); //this will hide the object on all timeframes

ObjectSet("MyObject", OBJPROP_TIMEFRAMES, 0); //this will show object on all timeframes again, without the selection box

Of course you can make a loop for all of your objects, and you also can set different timeframe parameters if needed.