Keyboard Shortcuts
Likes
Search
That Dr.Script thing - again!
HI All, Just joined. ? I am waiting to get the new WiFi module so that I can update my DR5000, but in the meantime I was wanting to try out Dr.Script which (allegedly) is built into the DR5000. I know that my setup is working properly because when I input a script like POWER OFF PAUSE 3000 POWER ON LOG "I Paused for 3 seconds" The unit powers on and off with the 3 second pause and I see the message in the log window. However none of the DCC concerned commands seem to work - for example I have tried many permutations of: including quoting and non quoting the slash, making the number "0209" and even adding the optional timeout value like.. ? TURNOUT 4000 209 | ? Am I correct in assuming that this facility was never really finished before Digikeijs folded? |
A few people have tried Dr Script over the years (search the forum for 'script') but I think you're right - its capabilities were limited at best and you'd struggle to achieve anything useful with it. Having said that, the TURNOUT command should work. Dennis and I tried it a while back and, whilst it had some issues, it would throw a turnout. See this post...
/g/Digikeijs/topic/93143502 Ian |
Yeah, that did it. Addressing Turnout 208 does it.? Since I believe that address 0 is? the broadcast-to-all address in DCC (?) this has to be a software bug and is probably indicative of the amount of testing that this software had - i.e. almost none! The Windows GUI for DR5000 was also not very extensively tested - for example on my rig (which seems to be one version behind the latest/last version which Digikeijs put out) when you try to save a CV set the software pops up the "Open file" windows dialog gadget not the "save " gadget. Consequently there seems no way to do that save. So, again, that function could not have been tested at all!? Hopefully Yamorc is on a more stable footing and the tremendous potential of that product set can now be exploited with some more solid software. ? Many thanks Ian. |
So, cos I am a sucker for a challenge i decided to see how far I could get with this (I now learn obsolete) version of Dr.Script.? I wrote three scripts, Two of which worked but the third one I just can't seem to get the variable to decerement.? - but I think I'm probably giving up on this now!? :-) 1====Works======= BEGIN: |
Alan,
|
Karst, Aha! so it's the market dominating companies introducing standards creep/corruption again then! Seen that so often in the IT world. On a similar notes, I was somewhat suprised to learn that a default (new out of box) decoder is not mandated to have address 3 at first power up. Several people have told me it was the standard, but I found the "Myths" list on NMRA and yep - it's a myth :-) |
What is this list on myths that NMRA has published? Can you post the link to it please? On Tue, 1 Aug 2023 at 20:37, AlanRailwayMan <alant123@...> wrote:
--
Many Thanks Iain Morrison |
That did it - thanks Ian.? Also I figured out the IF statement that was giving an error as well. So I think collectively we can say that the golden rules for dr.Script seem to be these: 1) $MYVAR accesses the contents of the variable but MYVAR assigns a value to it.
? 3=========Works Now========= Thanks for all the help guys, Not sure if this is worth anything now as Karst has confirmed that Yamorc will be doing a new and better implementation - but the info is here for the ages if anyone should need it! :-) |
Hi Alan, ? Did you ever see the Dr.Script Manual ?? ? Here a couple of lines about white-space :)? 2.3 Assignment linesTo assign values to pre-declared variables ( VAR ), an assignment line consists of: <left-hand> = <right-hand> Where <left-hand> is the name (case sensitive) of a previously defined variable Where ¡¯ = ¡¯ is the assignment operator, surrounded with white-space (at least 1 space or tab before and at least 1 space or tab behind the ¡®=¡®) Where <right-hand> is an expression of any literal, variable content or built-in function result. <right hand> may contain the operators : ¡®+¡¯, ¡®-¡¯, ¡®*¡¯, ¡®/¡¯. For addition, subtraction, multiplication and division. In case these operators exist, Dr.Scripts splits the expression from left to right and evaluates the split parts from right to left. ? Just if you don't have it, I attached it to this post :) Greets, Karst |
Feature request for YaMoRC!
When writing the manual on scripting, in addition to defining rules and variables etc could you please put in some real world examples, such as changing points\turnouts etc. It would really help someone like me with very limited experience in scripting, get started. Thank you! Adam |