Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Tip: using backticks

  1. #11
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,970
    Blog Entries
    18
    Rob,

    As it turns out, the reason is that running operating system commands is OS specific.

    As i mentioned in a previous reply, I have cygwin installed on windows.

    On windows you need to do it like this:

    ? "`cmd /c date /t`"
    ? "`cmd /c dir`"

    You are running cmd.exe which requires interactive input. You cannot run that using backpacks or the run command in Lianja.

    I will look into the crash but it makes no sense anyway to try and run an interactive command shell from within Lianja.

    If you have any issues like that with Lianja submit a ticket and the issue will be dealt with in due course.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  2. #12
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,970
    Blog Entries
    18
    Rob,

    I see no crash whatsoever.

    The interactive command window is probably behind the Lianja App Builder window.

    Name:  Screen Shot 2017-04-20 at 11.46.07 AM.jpg
Views: 67
Size:  70.3 KB
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #13
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    Yes Barry, this work fine!

    thanks
    Fabio

  4. #14
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,134
    To summarize:

    After select/copy/paste these examples in Console workspace on usual Windows:

    Code:
    ? "`cmd /c date /t`"    // works OK
    
    ? "Date is `date`"     // does not work

    Barry uses cygwin and both commands work for him.
    If it is not easy to find backtick on the keyboard, the code for backtick is ALT+96

    Josip
    Last edited by josipradnik; 2017-04-20 at 02:01.

  5. #15
    Member
    Join Date
    Sep 2013
    Location
    Bristol UK
    Posts
    95
    Barry,

    I've tested the proper formatted commands using back ticks and they work as expected.

    On further investigation I've found that it appears that when I "run cmd" from Lianja, it is cmd.exe that is hanging. Lianja is simply waiting for cmd.exe to finish. If I shut down cmd.exe from task manager, Lianja continues just fine.

    So the crash is definitely an issue with my system and, as you say, since I have no reason to ever need to this in my code, it's not even an issue.

    Once again, thanks for you efforts.

    Cheers,

    Rob C

  6. #16
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,970
    Blog Entries
    18
    I have simplified this behavior on Windows in Lianja 3.4RC14. You now no longer need to specify cmd /c you can just use the backticks but remember that the command itself must be a valid windows command that produces output.

    Code:
    ? "The date is `date /t`"
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us