ID:154725
 
is there a way to have the command line in a button execute two tasks at the same time like a verb from within the game and having it execute a .winset operation at the same time? it'd be helpful if you could point me out to a library teaching this or pointing out where i should look under.
You can't have two procedures run at the same time because BYOND isn't a multi-threaded engine. You could set a command to the button and have the beginning of that command call the winset() and it will work, but it won't be running at the same time.
In response to Kumorii
Kumorii wrote:
You can't have two procedures run at the same time because BYOND isn't a multi-threaded engine. You could set a command to the button and have the beginning of that command call the winset() and it will work, but it won't be running at the same time.

here's the example i want, i want it to call the name verb and then change the child to show a different window inside of it how would i go about doing this?
In response to Halldor
make the proc and in the verb put

spawn proc()

is that you want? I didn't understood very well
For macros, you can use the '\n' newline macro to chain commands. However, it looks like it's being improperly escaped for the command property, but there's a workaround.

To run multiple commands in a macro/button, enter something like this:
.winset "default.background-color=#ff0000"\nverb1\nverb2

As you can see, you insert a "\n" between each command (which is the escape-code for a newline)

Then save the interface file, and open it in a text editor. Find the line where the button is defined, go to its command property, and change any occurrences of "\\n" to "\n". The \n won't be visible in the interface editor afterwards, but it will work.