Event Execution
Search
Event Execution
Hi guys,
is there a possibility to trigger an event of a shape by script?
kr
Michel
is there a possibility to trigger an event of a shape by script?
kr
Michel
Re: Event Execution
And is there a possiblity to read the current dollar values of another panel?
Re: Event Execution
Hello,
it is not possible to call a event of a shape from another script.
The QT events are only called when the user is interacting with the UI.
With the functions for the CTRL-debugger you can see the current value for $-parameters which are used at a panel.
For details please have a look at the online-help: CONTROL --> CTRL Debugger
Best Regards
Leopold Knipp
Senior Support Specialist
it is not possible to call a event of a shape from another script.
The QT events are only called when the user is interacting with the UI.
With the functions for the CTRL-debugger you can see the current value for $-parameters which are used at a panel.
For details please have a look at the online-help: CONTROL --> CTRL Debugger
Best Regards
Leopold Knipp
Senior Support Specialist
Re: Event Execution
Hello,
It's not possible to send event, would be possible to use the function mouse_event from the library user32.dll,
using userDefFunction like :
for example to move the cursor
userDefFunction("user32.dll","mouse_event",makeDynInt(0x01,x,y,0,0),makeDynInt());
or
#uses "user32.dll"
...
mouse_event(0x01,x,y,0,0);
...
I have ever tried, but nothing is working
- with #uses library is not correctly loaded!
- with userDefFunction, no error, but nothing happened!!
regards
Emmanuel
It's not possible to send event, would be possible to use the function mouse_event from the library user32.dll,
using userDefFunction like :
for example to move the cursor
userDefFunction("user32.dll","mouse_event",makeDynInt(0x01,x,y,0,0),makeDynInt());
or
#uses "user32.dll"
...
mouse_event(0x01,x,y,0,0);
...
I have ever tried, but nothing is working
- with #uses library is not correctly loaded!
- with userDefFunction, no error, but nothing happened!!
regards
Emmanuel
-
- Posts: 634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Event Execution
@Emmanuel, with these methods it is only possible to use specially for WinCC OA created libraries (dll's).
To use the functions of a foreign library a control extension has to be created. With the library 'libffi' it would be possible to create a dynamic interface to foreign libraries.
To use the functions of a foreign library a control extension has to be created. With the library 'libffi' it would be possible to create a dynamic interface to foreign libraries.
Re: Event Execution
Incidentally, I wrote such a Ctrl Extension some time ago, and it's available on github: https://github.com/mooware/CtrlFFI. It's lacking in documentation, and there are currently no prebuilt binaries, but that could be improved if someone is interested.To use the functions of a foreign library a control extension has to be created. With the library 'libffi' it would be possible to create a dynamic interface to foreign libraries.
-
- Posts: 634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Event Execution
@Markus, did you also manage to compile it under windows?
Re: Event Execution
Yes, it works on Windows and Linux, 32 and 64 Bit. libffi is a bit difficult to build on Windows; I think I had to make a few adjustments in their build.
-
- Posts: 634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Event Execution
@Markus, at GitHub I only see a makefile for linux. How did you built it on windows?
Re: Event Execution
Sorry, the Makefile probably doesn't even work on Linux, seeing as libffi isn't in it. The code is already a few years old, not sure how I built it then. Probably GNU Make on Windows as well. I'll try to get prebuilt binaries and a build system up sometime in the next few days.