Announcement

Collapse
No announcement yet.

spaces in filepath

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • spaces in filepath

    I am trying to put a photo edit button in my picviewer.skin

    What I want to be able to do is browse my photos in the picviewer skin, select a photo in the directory and open it in an external app to edit, ie open a photo in MSpaint and rotate and save it.

    The button code I am using is

    Code:
    B,60,332,155,52,"SETVARBYIND;CURRENTPIC;PICTURE||RUN;C:\WINDOWS\SYSTEM32\mspaint.exe|$CURRENTPIC$;PAINT;PAINT",
    now this does exactly what I want it to do bar one thing. If the filepath has a space in it, MSpaint cannot open it and gives me an error.

    So the question is...... Is there an easy work around for this space in the filepath problem?

    Thanks,

    Anthony
    Celica GT4 Pilot.
    My Skin Bluetab

  • #2
    When passing variables, you have to wrap them in quotes if there is a space in the variable.

    Setting a variable with the quote in it, and then wrapping the other variable with it will work like this:

    Code:
    B,60,332,155,52,"SETVAR;QUOTES;"||SETVARBYIND;CURRENTPIC;PICTURE||RUN;C:\WINDOWS\SYSTEM32\mspaint.exe|$QUOTES$$CURRENTPIC$$QUOTES$;PAINT;PAINT",
    If you use the quotes a lot, you can make the exectbl code a little cleaner by setting the quote variable in the ini.

    put this in your Skin.ini: (Or in the rr.ini if you want it to work for all skins)

    QUOTES="

    Code:
    B,60,332,155,52,"SETVARBYIND;CURRENTPIC;PICTURE||RUN;C:\WINDOWS\SYSTEM32\mspaint.exe|$QUOTES$$CURRENTPIC$$QUOTES$;PAINT;PAINT",
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

    Comment


    • #3
      John, your an absolute champ.

      straight forward (and understandable) explanations and codes that work, I couldn't ask for a better reply.

      thanks muchly.
      Celica GT4 Pilot.
      My Skin Bluetab

      Comment

      Working...
      X