Home > Community > Forums > PCB SKILL > How to deal with backslash"\" in Skill Code

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to deal with backslash"\" in Skill Code 

Last post Tue, May 27 2014 6:25 PM by leonlee. 2 replies.
Started by leonlee 27 May 2014 02:22 AM. Topic has 2 replies and 1997 views
Page 1 of 1 (3 items)
Sort Posts:
  • Tue, May 27 2014 2:22 AM

    • leonlee
    • Top 200 Contributor
    • Joined on Mon, Jul 21 2008
    • Shanghai, Shanghai
    • Posts 38
    • Points 580
    How to deal with backslash"\" in Skill Code Reply

     Hi All,

    I met an problem about the backslash character, as it is "\\" in Skill language, and there is a line of code like below:

    axlShell( "system @rundll32.exe %SystemRoot%/System32/shimgvw.dll, ImageView_Fullscreen D:\test\test.jpg" )

    This is not support by Skill.

    axlShell( "system @rundll32.exe %SystemRoot%/System32/shimgvw.dll, ImageView_Fullscreen D:\\test\\test.jpg")

    This doesn't work either.

    axlShell( "system @rundll32.exe %SystemRoot%/System32/shimgvw.dll, ImageView_Fullscreen D:/test/test.jpg")

    cmd.exe supports: @rundll32.exe %SystemRoot%/System32/shimgvw.dll, ImageView_Fullscreen D:\test\test.jpg

    But Allegro CIW doesn't support system @rundll32.exe %SystemRoot%/System32/shimgvw.dll, ImageView_Fullscreen D:\test\test.jpg

    So, how convert "\\" into "\"?

    Thanks.

    • Post Points: 20
  • Tue, May 27 2014 10:03 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 10,080
    Re: How to deal with backslash"\" in Skill Code Reply

    Hi

    In the past I've created batch (.bat/.cmd) files and executed them using system instead. If you create the .bat file in a known location like currentWorkingDir then you know where to execute it from.

    To circumvent unc paths you can use info on http://en.wikipedia.org/wiki/Pushd_and_popd to create temp drives.

    Depending on what you're trying to do with the above commands there may be other ways to do the same without rundll32.exe 

    Best regards

    Ole 

    Best regards Ole
    • Post Points: 20
  • Tue, May 27 2014 6:25 PM

    • leonlee
    • Top 200 Contributor
    • Joined on Mon, Jul 21 2008
    • Shanghai, Shanghai
    • Posts 38
    • Points 580
    Re: How to deal with backslash"\" in Skill Code Reply

    Thanks Ole, for your suggestion. For a single task, it's a good solution to create temperary .bat file.

    In fact, my purpose is to run the task with variant. "D:\test\test.jpg" is just a sample, I'll write the variant in my codes.

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by leonlee at 27 May 2014 02:22 AM. Topic has 2 replies.