Windows command line control

LightwaveRF Communi… > Forum > LightwaveRF Hackers > Windows command… > Page 7

LightwaveRF Community: Welcome Forums LightwaveRF Hackers Windows command line control

This topic contains 122 replies, has 12 voices, and was last updated by  jamieburchell 4 months ago.

Viewing 15 posts - 91 through 105 (of 123 total)
  • Author
    Posts
  • #19605
     jemhayward says:

    jemhayward
    Participant

    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!

    #19608
     jemhayward says:

    jemhayward
    Participant

    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?

    #19609
     jamieburchell says:

    jamieburchell
    Participant

    Hi

    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?

    Cheers
    Jamie

    #19610
     jemhayward says:

    jemhayward
    Participant

    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!

    #19611
     jamieburchell says:

    jamieburchell
    Participant

    Hmm I can’t think of anything. Does that program work ok with other batch files?

    #19612
     jemhayward says:

    jemhayward
    Participant

    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.

    #19613
     jamieburchell says:

    jamieburchell
    Participant

    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.

    #19614
     jamieburchell says:

    jamieburchell
    Participant

    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.

    #19615
     jemhayward says:

    jemhayward
    Participant

    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?

    #19616
     jamieburchell says:

    jamieburchell
    Participant

    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.

    #19617
     jemhayward says:

    jemhayward
    Participant

    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.

    #19619
     jemhayward says:

    jemhayward
    Participant

    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.

    #19620
     jamieburchell says:

    jamieburchell
    Participant

    Are you able to paste the batch file somewhere for me to have a look to see if I can spot anything?

    #19621
     jemhayward says:

    jemhayward
    Participant

    This is the latest version:

    C:\systemautomation
    lwrf.bat lounge inglenook on
    pause

    The original was:

    C:\systemautomation
    lwrf lounge inglenook on
    exit

    I use things like this:

    cd C:\systemautomation
    broadcast.exe D:1B09:E
    exit

    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…

    #19622
     jamieburchell says:

    jamieburchell
    Participant

    So if you replaced the contents of that batch file with:

    echo Hello World
    pause

    Does the software launch the batch file and display the text?

Viewing 15 posts - 91 through 105 (of 123 total)

You must be logged in to reply to this topic.