Activate group {name} with expression?
So im trying to activate a group with an expression.. i just dont know if its possible.
Basically i want to input text such as this into an edit box.
"Activate group :wiggles"
Left$(string$( "Edit Box" ), 16) = "Activate group :"
->> activate group Mid$(string$( "Edit Box" ), 16, 100)
so basically i type the name of the group and it gets activated. not a manual activation but an activation based in an expression.
I hope my example of code helped describe exactly what i wanted.
IF its possible.
Re: Activate group {name} with expression?
Yes it should be possible.
I have done such things with loops before and it worked OK.
But you should check your syntax, it should work by simply activating group text(Editbox)
Re: Activate group {name} with expression?
problem is, i cant seem to get it into the expression editor.. every time i select the special object for activating a group, i ge t a popup window and have to select the group. how do i avoid that popup box?
Re: Activate group {name} with expression?
You might have to workaround this by using values or strings.
Re: Activate group {name} with expression?
There isn't a way to directly do this yet. You could request it, but the problem is that two groups can have the same name, so you would have to do it by number. Which means you'd need a 1D array to store the group names with thier indexes being thier IDs.
Re: Activate group {name} with expression?
How would i go about requesting this feature? IT would eliminate so many actions in my current program lol.
Maybe there is an easier way of doing it, but im not sure.
Basically i made an irc program based on the old example that was given. However my irc program is a bot and has specific things it needs to do upon recieving special commands.
Ive gotten it to do this, but for each command that i have, i need to activate and deactivate groups. I currently have about 30 groups to activate and deactivate and i have 3 commands for each group for deactivation and activation.
Just seems like a big mess. even though it works.
Id rather not post an example file right now as my source is quite valuable to a certian gaming community.
Re: Activate group {name} with expression?
Couldn't you just do:
If Editbox Text = "Activate group :wiggles"
Activate Group "wiggles"
:confused:
Re: Activate group {name} with expression?
I do that now, problem is, i have about 30 groups and
If Editbox Text = "Activate group :wiggles"
Activate Group "wiggles"
If Editbox Text = "Deactivate group :wiggles"
Deactivate Group "wiggles"
for each group is pretty time consuming.
Edit: i recounted my groups, i have 55 groups. so make that
110 activate / deactivate commands
that could be eliminated by TWO expressions
Left$(string$( "Edit Box" ), 16) = "Activate group :"
->> activate group Mid$(string$( "Edit Box" ), 16, 100)
Left$(string$( "Edit Box" ), 18) = "Deactivate group :"
->> deactivate group Mid$(string$( "Edit Box" ), 18, 100)
Re: Activate group {name} with expression?
I am sure it works with an expression, but I dont have mmf installed here to test. Isn't there an option to open groups by expression?
Re: Activate group {name} with expression?
There is no expression dialogue for openning/closing groups.
Re: Activate group {name} with expression?
I don't think the group names exist at runtime - they get IDs instead.
Re: Activate group {name} with expression?
even if i had to use the ID's theres got to be some sort of command to do this.i found an easier way of doing it by using loops instead of groups, but still...
activating groups by ID in an expression would be the bomb! i can think of a lot of things to do with it.