Results 1 to 3 of 3

Thread: spaces in filepath

  1. #1
    Newbie gold28's Avatar
    Join Date
    Jan 2008
    Location
    Madrid
    Posts
    38

    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. #2
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,717
    Blog Entries
    1
    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

  3. #3
    Newbie gold28's Avatar
    Join Date
    Jan 2008
    Location
    Madrid
    Posts
    38
    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

Similar Threads

  1. How do I Sync all my mp3s?
    By UntenOps in forum Off Topic
    Replies: 35
    Last Post: 01-31-2006, 11:31 PM
  2. What to use to fill in empty spaces?
    By nappyjim in forum Fabrication
    Replies: 4
    Last Post: 05-28-2005, 06:40 PM
  3. Heat dissipation inside dash or other enclosed spaces?
    By Arathranar in forum Power Supplies
    Replies: 1
    Last Post: 02-01-2005, 05:32 AM

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
  •