09-10-2015, 02:56 AM
On the button issue, that is easy
That is from the example program TinyTim I posted on this forum, in the Snippets section. When you want to enable it again:
Your other issue is trickier. The System$ command runs the parameter once and dumps its output to stdout, which yab can intercept and put into a string variable. The moment you grab that output and paste that onto a view, you'd get a snapshot, but then you lose access to that stream immediately.You want a continuous display, like a log, am I right?
I would redirect the muscled output to a logfile.
Then once every second or so, use the tail command to grab the last ten lines of that logfile. something like
Paste that onto the view, leave it for a second, wipe the view and repeat. It will flicker badly and if you get more than ten lines of output in a second you will lose information. But you can always have a function on the menu to display the entire logfile.
This is all off the top of my head, BTW. I am very far away from a yab installation right now. Debug, debug, debug!
Anybody else? If there is a way to pipe a Unix stream directly into, say, a listbox, I'm all ears.
Another approach would be to use the hey command to remove the tab from your Terminal window. That makes it a bit harder for the user to close it down. Also harder to move it around, so also use hey to position it somewhere in a corner and resize it.
Code:
option set "copyButton", "enabled", 0
That is from the example program TinyTim I posted on this forum, in the Snippets section. When you want to enable it again:
Code:
option set "copyButton", "enabled", 1
Your other issue is trickier. The System$ command runs the parameter once and dumps its output to stdout, which yab can intercept and put into a string variable. The moment you grab that output and paste that onto a view, you'd get a snapshot, but then you lose access to that stream immediately.You want a continuous display, like a log, am I right?
I would redirect the muscled output to a logfile.
Code:
system("muscled > ~/.muscled_log &")
Code:
a$ = system$("tail ~/.muscled_log")
This is all off the top of my head, BTW. I am very far away from a yab installation right now. Debug, debug, debug!
Anybody else? If there is a way to pipe a Unix stream directly into, say, a listbox, I'm all ears.
Another approach would be to use the hey command to remove the tab from your Terminal window. That makes it a bit harder for the user to close it down. Also harder to move it around, so also use hey to position it somewhere in a corner and resize it.