Sign in to follow this  
Followers 0
xsienix

Citect | Calling a function with a push of a button

2 posts in this topic

Hello all,

I'm new to Citect.

Question:
How can i call a function with use of a pushbutton?

What i did:

What i try to accomplish is this:

I have a genie with an array of different colors.
In my genie i have a text stated %fill in lighttag%, where the lighttag is a local variable.
I have a pushbutton and a light symbol.

Now i have made a litte cicode script, where i make a function GetLight()
In the appropiate field of the button, i will call the function, and my function will return a value that i putt on a tag.

Problem:
It seems that the function get called, no mather what.



Many thanks,
X.

Stay healthy folks....

 

Share this post


Link to post
Share on other sites
On 10-4-2020 at 11:02 AM, xsienix said:

Hello all,

I'm new to Citect.

Question:
How can i call a function with use of a pushbutton?

What i did:

What i try to accomplish is this:

I have a genie with an array of different colors.
In my genie i have a text stated %fill in lighttag%, where the lighttag is a local variable.
I have a pushbutton and a light symbol.

Now i have made a litte cicode script, where i make a function GetLight()
In the appropiate field of the button, i will call the function, and my function will return a value that i putt on a tag.

Problem:
It seems that the function get called, no mather what.



Many thanks,
X.

Stay healthy folks....

 

After much struggle and i do no why, the whole thing work!
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0