Hi was wondering, could a GUI associated with a dll raise an event that will cause a Metatrader script to call a dll routine to get data or input that the GUI has collected from a user?
thanks,
MilfordT
Hi milfordT,
Correct me if I'm wrong, in short, could dll call a script ? Yes, by setting hotkey for the script (or CI or EA) and run keyboard event function in dll. In MetaEditor 5 see include/VirtualKeys, and in MetaEditor 4 see include/WinUser32. Here's MSDN of keyboard event http://msdn.microsoft.com/en-us/library/windows/desktop/ms646304(v=vs.85).aspx.
I never use keyboard event in dll though, and annoying thing is, we probably have to make the chart or even the MT, an active window first :(.
:D
- msdn.microsoft.com
Hi milfordT,
Correct me if I'm wrong, in short, could dll call a script ? Yes, by setting hotkey for the script (or CI or EA) and run keyboard event function in dll. In MetaEditor 5 see include/VirtualKeys, and in MetaEditor 4 see include/WinUser32. Here's MSDN of keyboard event http://msdn.microsoft.com/en-us/library/windows/desktop/ms646304(v=vs.85).aspx.
I never use keyboard event in dll though, and annoying thing is, we probably have to make the chart or even the MT, an active window first :(.
:D
thanks again onewithzachy.
I'm thinking I could use a hot key to start the following sequence:
1) run script
2) script calls some dll routine that brings up GUI
3) user inputs parameters
4) after clicking some button on GUI, dll or GUI, then creates some event that will cause script to know data is ready and then script will call another dll routine to retrieve user inputs
Does this look feasible to you? or can you suggest an easier solution?
thanks again onewithzachy.
I'm thinking I could use a hot key to start the following sequence:
1) run script
2) script calls some dll routine that brings up GUI
3) user inputs parameters
4) after clicking some button on GUI, dll or GUI, then creates some event that will cause script to know data is ready and then script will call another dll routine to retrieve user inputs
Does this look feasible to you? or can you suggest an easier solution?
Hi milfordT,
Is it like this http://msdn.microsoft.com/en-us/library/windows/desktop/ms632588(v=vs.85).aspx ?, Of course it's feasible.
However script can also accept user input by adding "#property script_show_inputs"
//#property script_show_confirm //<<-- Are you sure thing #property script_show_inputs //<<-- show me the input input double double_your_loss=0.0; input int integreedy_input=7; input string any_kind_a_string="abcdefghijklmnopqrstuvwxyz"; input ulong wear_short=1;
:D
- msdn.microsoft.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi was wondering, could a GUI associated with a dll raise an event that will cause a Metatrader script to call a dll routine to get data or input that the GUI has collected from a user?
thanks,
MilfordT