<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>With version 4.9x s it possible trough a Script to automatically change the background color when I switch between S/P and Run?</div><div><br></div><div>Some years ago someone posted a script for version 4.2.</div><div>Some days ago i upgraded to v 4.9.</div><div>Now i've tried to operate that script but it doesn't work (maybe i've had some mistakes producing the script).</div><div><br></div><div>This is the code:</div><div><br></div><div><snip><br>if (wtApp:IsPostKeyProcess()) then<br> if (wtQso:IsOperatingModeRun()) then<br> wtApp:SetWindowColor(-1, 0, 165, 165);<br> else<br> wtApp:SetWindowColor(-1, 128,128,128);<br> end;<br> else<br> return 1; -- Triggers a post key process call<br> end;<br><snip></div><div><br></div><div>Could someone help me how to let it works on v. 4.9x?</div><div><br></div><div>Thank you in advance.</div><div><br></div><div>73</div><div>Franco, IZ4MJP</div><div><br></div><div><br></div><div><br></div><div><blockquote type="cite">Message: 6<br>Date: Wed, 09 Sep 2009 23:17:19 +0000<br>From: Clive Whelan <<a href="mailto:clive.whelan@btinternet.com">clive.whelan@btinternet.com</a>><br>Subject: Re: [WT-support] RunSPSwitch.wts<br>To: <a href="mailto:support@win-test.com">support@win-test.com</a>, Ron Castro <<a href="mailto:ronc@sonic.net">ronc@sonic.net</a>><br>Message-ID: <<a href="mailto:4AA8377F.609@btinternet.com">4AA8377F.609@btinternet.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Ron<br><br>Firstly ensure that you have an adequate supply of Valium and Prozac to <br>hand ;-)<br><br>Then download v 4.2.0-dev rev 168 from the nightly build directory, <br>dated 2009/09/07 and install it .<br><br>Then save this chunk of code ( from the release notes file) between the <br>snips as RunSPSwitch.wts in the scripts directory ( use Notepad say or <br>your favourite text editor) , which is at c:\Documents and Settings\All <br>Users\Application Data\Win-test\Scripts<br><br><snip><br>if (wtApp:IsPostKeyProcess()) then<br> if (wtQso:IsOperatingModeRun()) then<br> wtApp:SetWindowColor(-1, 0, 165, 165);<br> else<br> wtApp:SetWindowColor(-1, 128,128,128);<br> end;<br> else<br> return 1; -- Triggers a post key process call<br> end;<br><br><snip><br><br>As an aside I personally don't like those colours so my own are respectively<br><br>(-1, 255, 255, 0)<br><br>and<br><br>(-1, 200,200,255)<br><br>being yellow for run and lilac for S&P. This is very personal of course, <br>and the three last groups of digits represent R,G,B respectively. so <br>that (-1,0,0,0) would be white I think. With a little experimentation <br>you can brew your own palette.<br><br>Now in WT go to Tools|Script Manager and you should see the <br>RunSPSwitch.wts script you have just saved listed there. You can then <br>just assign this to Ctrl-Tab ( or another combo if you prefer). Then <br>switching in the usual way should change the colour of the log window to <br>what you have set. This is regardless of whether you are using ESM or <br>otherwise.<br><br>I think I've got this right from memory, but it's after midnight local <br>time here now, so if not, that's where the Valium and Prozac in step one <br>will come in handy! Don't worry if you don't get it right first time, as <br>I almost never do, but then I'm challenged in the cybernetics department <br>so you'll probably do better.<br><br><br>73<br><br><br>Clive<br>GW3NJW<br></blockquote></div></body></html>