<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help with dtksh in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505053#M21406</link>
    <description>Thanks for help.&lt;BR /&gt;&lt;BR /&gt;Mike, &lt;BR /&gt;In dtksh, how would I re-read the input file automatically in the script, say every 300 seconds, and force the values to be revaluated, and change colors if values changed ?&lt;BR /&gt;&lt;BR /&gt;Or should I reference the *.dtksh file from a normal shell script that is in a loop, destroying and remaking the window every 5 min ?</description>
    <pubDate>Tue, 20 Mar 2001 21:38:06 GMT</pubDate>
    <dc:creator>Robert Gamble</dc:creator>
    <dc:date>2001-03-20T21:38:06Z</dc:date>
    <item>
      <title>Help with dtksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505050#M21403</link>
      <description>I am hoping someone else has tried this before me and can share what they learned.&lt;BR /&gt;&lt;BR /&gt;I am not familar with dtksh, so it appears a very scary thing to me. =)&lt;BR /&gt;&lt;BR /&gt;I am hoping to find/create a dtksh script that creates a static GUI widget with buttons that can change color based on the state of file/flags.&lt;BR /&gt;&lt;BR /&gt;Example: a gui widget pops up with 3 buttons. one button labeled "process A" is red, other button labeled "process B" is yellow, and button "process C" is green.  processA's button is red because the script read in a flag_state from a file...&lt;BR /&gt;&lt;BR /&gt;Any ideas or script alreay out there similar to this logic ?&lt;BR /&gt;&lt;BR /&gt;Thanks In Advance for Any/All Help !</description>
      <pubDate>Wed, 14 Mar 2001 14:20:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505050#M21403</guid>
      <dc:creator>Robert Gamble</dc:creator>
      <dc:date>2001-03-14T14:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dtksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505051#M21404</link>
      <description>Hi Rob,&lt;BR /&gt;&lt;BR /&gt;I once looked at dtksh to see how it worked, and wrote a very little script that displays 3 buttons and exits when pressing on them, but I prefer perl/Tk :o) :&lt;BR /&gt;&lt;BR /&gt;--snip--&lt;BR /&gt;#!/usr/dt/bin/dtksh&lt;BR /&gt;&lt;BR /&gt;alias BUTTON_1_CB=exit&lt;BR /&gt;alias BUTTON_2_CB=exit&lt;BR /&gt;alias BUTTON_3_CB=exit&lt;BR /&gt;&lt;BR /&gt;XtInitialize TOPLEVEL my_form "My form" "$@"&lt;BR /&gt;XmCreateForm FORM $TOPLEVEL main_form width:320 height:150&lt;BR /&gt;&lt;BR /&gt;XmCreatePushButton BUTTON_1 $FORM button_1 labelString:"Process 1"         x:10 y:100 width:100 height:40&lt;BR /&gt;XtAddCallback $BUTTON_1 activateCallback BUTTON_1_CB&lt;BR /&gt;&lt;BR /&gt;XmCreatePushButton BUTTON_2 $FORM button_2 labelString:"Process 2"         x:110 y:100 width:100 height:40&lt;BR /&gt;XtAddCallback $BUTTON_2 activateCallback BUTTON_2_CB&lt;BR /&gt;&lt;BR /&gt;XmCreatePushButton BUTTON_3 $FORM button_3 labelString:"Process 3"         x:210 y:100 width:100 height:40&lt;BR /&gt;XtAddCallback $BUTTON_3 activateCallback BUTTON_3_CB&lt;BR /&gt;&lt;BR /&gt;XtManageChildren $BUTTON_1 $BUTTON_2 $BUTTON_3&lt;BR /&gt;XtManageChildren $FORM&lt;BR /&gt;XtRealizeWidget $TOPLEVEL&lt;BR /&gt;XtMainLoop&lt;BR /&gt;--snip--&lt;BR /&gt;&lt;BR /&gt;I found an example script (font_chooser.dtksh - see in attachment) that may help you (about different widgets that can be created and so on). If you know the X API, then dtksh shouldn't be a problem for you.&lt;BR /&gt;&lt;BR /&gt;Wishing you luck,&lt;BR /&gt;&lt;BR /&gt;Best regards.&lt;BR /&gt;&lt;BR /&gt;Fred.</description>
      <pubDate>Wed, 14 Mar 2001 16:59:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505051#M21404</guid>
      <dc:creator>Frederic Soriano</dc:creator>
      <dc:date>2001-03-14T16:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dtksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505052#M21405</link>
      <description>It is easy to set widget colors from dtksh.  If you are just displaying a color coded status then you should probably be using label widgets instead of pushbutton wigets.  A label widget does not imply that it will do something when you click on it.&lt;BR /&gt;I have attached an example that reads values from a file and sets different widget colors for different value ranges.</description>
      <pubDate>Thu, 15 Mar 2001 16:18:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505052#M21405</guid>
      <dc:creator>Mike Stroyan</dc:creator>
      <dc:date>2001-03-15T16:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dtksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505053#M21406</link>
      <description>Thanks for help.&lt;BR /&gt;&lt;BR /&gt;Mike, &lt;BR /&gt;In dtksh, how would I re-read the input file automatically in the script, say every 300 seconds, and force the values to be revaluated, and change colors if values changed ?&lt;BR /&gt;&lt;BR /&gt;Or should I reference the *.dtksh file from a normal shell script that is in a loop, destroying and remaking the window every 5 min ?</description>
      <pubDate>Tue, 20 Mar 2001 21:38:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505053#M21406</guid>
      <dc:creator>Robert Gamble</dc:creator>
      <dc:date>2001-03-20T21:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dtksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505054#M21407</link>
      <description>You can use XtAddTimeOut to make a dtksh script run a command after an interval.  You can chain one timeout after another to perform a repeating operation.  I have attached an example that rereads the status file every 5 minutes.  (There is a small memory leak of about 84 bytes per timeout callback, so a rapid timeout can lead to a shell process that gets too big.)&lt;BR /&gt;The example uses an associative array to keep track of which label widget represents each name from the status file.  That is a nice ksh93 feature that uses a string as an array index.  You can read more about that and other ksh93 features using "man ksh93" on HP-UX 10.20 or "man -M /usr/dt/share/man ksh" on HP-UX 11.00.&lt;BR /&gt;The example only accumulates widgets, so a status name that is removed from the file will continue to have a label.  You could use XtDestroyWidget to remove names that no longer appear in the status file.</description>
      <pubDate>Wed, 21 Mar 2001 18:02:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-dtksh/m-p/2505054#M21407</guid>
      <dc:creator>Mike Stroyan</dc:creator>
      <dc:date>2001-03-21T18:02:07Z</dc:date>
    </item>
  </channel>
</rss>

