Fixed it: I opened the cmd file in wordpad, rather than notepad and the formatting came back and I then spotted that I’d lost the space after my IP address. Did another lwrf register, the box flashed (just green on the 930) and then I was up and going. I can now swith the light on with a batch file. Now have to explain to the wife why this is a good thing when we have a switch on the wall within reach of where I’m sitting!
I’ve now made a couple of batch files, and double clicking them works a great… However, if I trigger the batch file via intelliremote it flashes up on the screen but nothing happens… Almost identical batch files triggering broadcast.exe to send UDP to my bbsb online controller work fine. I’m obviously missing something, but I really can’t work out what I’m doing wrong. Any ideas anyone?
Is the lwrf.cmd file in your Windows PATH? I put mine in system32 folder, but it can go anywhere. It’s a hunch but it seems to me perhaps your batch file is not able to find the file from where it’s being called from?
My batch file has CD c:\systemautomation as the first line to address that problem, and dropping lwrf.cmd into system32 hasn’t fixed it. It’s fine if triggered from windows task scheduler, but from intelliremote, it just flashes the black box, but nothing happens!
Hmm I can’t think of anything. Does that program work ok with other batch files?
The batch file works fine from windows task scheduler, though that does have the concept of running in a specific directory… Also, other batch files behave normally.
I don’t suppose there’s any text to give any clues in that black box?
You can maybe try adding the word pause in the lwrf.cmd before it exits but it sounds like it’s either not finding the file or not interpreting it properly.
I noticed your comments about the file being opened in notepad/wordpad and wonder if there’s some issue with line endings… How did you download the file? It should have windows line endings and so be readable in notepad.
Incidentally, Notepad++ is an excellent notepad/wordpad replacement that will preserve intended line endings and let you switch between various formats. It’s free. Notepad should be ok to deal with windows batch files though so I’m confused why it wasn’t formatted properly for you.
I use notepad++ at work, but its not installed on that machine… I may do so… however what I have discovered is that the .cmd extension is mapped to Open in WordPad – I’m wondering if that could be the cause of the problem perhaps?
I may have done that myself – working on this stuff late at night isn’t always the best thing to do!
Could that be breaking the batch file running?
Is there any way of capturing what the command prompt window is trying to tell me before it disappears?
Adding the word pause before the end of the file is the only thing I can think of. Maybe your app doesn’t like the cmd extension. You could try changing it to bat
Did you download it from the GitHub page btw? There’s some old versions floating around in this thread and I can’t delete them.
Its the GitHub version, and it works perfectly in itself (many thanks… really great work!)
I’ll try playing with bat and cmd and see if it gets me anywhere.
Still stuck… I’ve tried renaming to .bat and overtly stating that in the batch file, but it still doesn’t work. I’ve also tried scripting from Intelliremote using the CommandLine command, but same behaviour.
Very weird and mysterious… I’m sure its something simple… just can’t find it.
Are you able to paste the batch file somewhere for me to have a look to see if I can spot anything?
This is the latest version:
lwrf.bat lounge inglenook on
The original was:
lwrf lounge inglenook on
I use things like this:
Without any problems.
All work if I double click them, but vial intelliremote (www.melloware.com) they don’t. the Melloware people are just as flummoxed…
So if you replaced the contents of that batch file with:
echo Hello World
Does the software launch the batch file and display the text?
You must be logged in to reply to this topic.