Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Display an image thats file name is contained in a variable

  1. #1
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,689
    Blog Entries
    1

    Display an image thats file name is contained in a variable

    Anyone know of a way to display an image with a variable?

    This was my thought's, but it didn't work:

    IMG,13,187,55,60,"$icon01$",

    I set the image in a variable in the exectbl.ini, and :ran the code" to test it.

    I tried this:
    "SetIcons","SetVar;Icon01;=dvd.jpg"

    and this:
    "SetIcons","SetVar;Icon01;dvd.jpg"

    both with no luck....

    On another note, if there is a way to make this work, will the image change when the variable is changed/updated? Or will a reloadskin or something be needed.... I hope to not have to use reload the skin!
    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

  2. #2
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    I can add support for that to work.. but if you change the variable, you'd have to reload the at least the screen.

    Unsure if this would cut if for you, but you CAN ALREADY do something like this:

    I01,13,187,55,60,"FILE;$icon01$"

    then use commands like:

    "SETVAR;incon01;$skinpath$dvd.jpg"

    This would change on the fly without even needing to reload anything.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  3. #3
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Location
    Chicago area,IL
    Posts
    5,078
    Maybe add a "REFRESHSCR" command that would just reload/refresh the current screen?

    Just thinking out loud...
    RideRunner...The #1 FE, PERIOD.

    Current Project: DFXVoice [v1.0 Released]
    Next in line: RRMedia v2.0

    DFX 5.1.1 Skin
    Appstore Link

    My RideRunner Plugins
    RRMedia
    RRExtended
    DFXVoice

    "There are no bugs - only undocumented features."

  4. #4
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    LOADIMG and LDIMG can load variables.
    Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

  5. #5
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    Quote Originally Posted by Sal R. View Post
    LOADIMG and LDIMG can load variables.
    That's the purpose of it. I was just thinking in terms of accomplishing what he seemed to want (changing an image by just setting a variable)..
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  6. #6
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    Quote Originally Posted by guino View Post
    That's the purpose of it. I was just thinking in terms of accomplishing what he seemed to want (changing an image by just setting a variable)..
    A combination of a TIMER and LOADIMG/LDIMG command that is dependent on a variable will also work. At least, that's how I did it w/ my non-standard picviewer skin.

    However, I do like what you suggested. It's clean cut and you don't have to load a "blank" image prior to loading a new image in the same location. I'm gonna have to try out your commands next chance I get.
    Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

  7. #7
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    Quote Originally Posted by Sal R. View Post
    A combination of a TIMER and LOADIMG/LDIMG command that is dependent on a variable will also work. At least, that's how I did it w/ my non-standard picviewer skin.

    However, I do like what you suggested. It's clean cut and you don't have to load a "blank" image prior to loading a new image in the same location. I'm gonna have to try out your commands next chance I get.
    Wow, that's thinking outside the box! I didn't even consider the timer event as an option.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  8. #8
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,689
    Blog Entries
    1
    Thanks again Guino! That should work nicely!
    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

  9. #9
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    Quote Originally Posted by guino View Post
    I can add support for that to work.. but if you change the variable, you'd have to reload the at least the screen.

    Unsure if this would cut if for you, but you CAN ALREADY do something like this:

    I01,13,187,55,60,"FILE;$icon01$"

    then use commands like:

    "SETVAR;incon01;$skinpath$dvd.jpg"

    This would change on the fly without even needing to reload anything.
    Awesome! That worked beatifully.

    My icon viewer has a more picviewer functionality to it AND it maintains the pics aspect ratio (I've been messing w/ that aspect for awhile now).

    I've got a question, but first here's the skin layout:


    ...and the skin's code:

    Code:
    MEDIACAR Skin
    MEDIACAR mmi Skin
    MMI-05_1EMPTY.png,MMI-05_2OFF.png,MMI-05_3ON.png,MMI-05_4DOWN.png
    
    /,TMR,001
    
    /,INC,File
    INC,FONTCOLORDEFINITIONS.txt
    INC,FONTSYTLEDEFINITIONS.txt
    INC,STANDARDCMDS.skin
    INC,STANDARDCMDS2.skin
    INC,THEME_ARTBOX.skin
    INC,THEME_DLSLIDER.skin
    INC,THEME_RLIND.skin
    
    /, SD, Alignment;Alignment, Disp;MODE, Icon Width, Icon Heigth, Path
    SD,0,0,50,50,"$skinpath$","*.jpg;*.png;*.gif;*.bmp",TRUE
    
    /, B, x, y, w, h, Command;COMMANDCODES, Tooltip
    B21,0,550,89,50,"EXIT",""
    B09,600,121,113,50,"PGUP||SETVARBYCODE;imgfilename;LISTTEXT",
    B10,600,171,113,50,"UP||SETVARBYCODE;imgfilename;LISTTEXT",
    B13,600,372,114,50,"DOWN||SETVARBYCODE;imgfilename;LISTTEXT",
    B14,600,422,114,50,"PGDOWN||SETVARBYCODE;imgfilename;LISTTEXT",
    B18,0,82,87,206,"SETVAR;NEXTSCRN;GPS||BYVAR;showmmipopup;$NEXTSCRN$<<MMIPOPUP",
    B19,713,82,87,206,"SETVAR;NEXTSCRN;SETUPRR||BYVAR;showmmipopup;$NEXTSCRN$<<MMIPOPUP",
    B20,0,288,87,206,"SETVAR;NEXTSCRN;SOURCE||BYVAR;showmmipopup;$NEXTSCRN$<<MMIPOPUP",
    B21,713,288,87,206,"SETVAR;NEXTSCRN;MAIN||BYVAR;showmmipopup;$NEXTSCRN$<<MMIPOPUP",
    /,B14,356,500,88,50,"SETVARBYCODE;imgfilename;LISTTEXT||SETVAR;TEMPutilicon;$imgfilename$||EXIT",
    B14,356,500,88,50,"SETVARBYCODE;TEMPutilicon;LISTTEXT||EXIT",
    
    /, L, x, y, w, h, color R;RGB, G, B, font size;FONT, font name, Code;LABELCODES, Tooltip;LABELALIGNMENT
    /,L19,181,92,437,29,#MMITITLER#,#MMITITLEG#,#MMITITLEB#,#MMITITLESIZE01#,#MMITITLEFONT01#,"DLPATH","SCROLL-CENTER"
    L19,181,92,437,29,#MMITITLER#,#MMITITLEG#,#MMITITLEB#,#MMITITLESIZE01#,#MMITITLEFONT01#,"=Select Application Icon","SCROLL-CENTER"
    L33,8,494,198,50,#MAINR#,#MAING#,#MAINB#,#MMISIZE01#,#MMIFONT01#,"=Source","Left"
    L34,594,37,198,50,#MAINR#,#MAING#,#MAINB#,#MMISIZE01#,#MMIFONT01#,"=Setup","Right"
    L35,8,37,198,50,#MAINR#,#MAING#,#MAINB#,#MMISIZE01#,#MMIFONT01#,"=Navigation","Left"
    L36,594,494,198,50,#SUBR#,#SUBG#,#SUBB#,#MMISIZE01#,#MMIFONT01#,"=Utilities","Right"
    L20,356,510,88,30,#SUBR#,#SUBG#,#SUBB#,#MMINAVBARSIZE01#,#MMINAVBARFONT01#,"=Select","Center"
    
    /, S, x, y, w, h, fore R;RGB, G, B,  back R;RGB, G, B,  folder R;RGB, G, B,  file R;RGB, G, B, selected R;RGB, G, B, select R;RGB, G, B, trs, font pt;FONT, font name
    S01,310,135,286,326,#FORER#,#FOREG#,#FOREB#,#DUMMYR#,#DUMMYG#,#DUMMYB#,#FOLDERR#,#FOLDERG#,#FOLDERB#,#FILER#,#FILEG#,#FILEB#,#SELECTEDFORER#,#SELECTEDFOREG#,#SELECTEDFOREB#,#SELECTEDFONTR#,#SELECTEDFONTG#,#SELECTEDFONTB#,true,#LISTSIZE01#,#LISTFONT01#
    
    /, J, x, y, w, h
    I01,155,211,138,148,"FILE;$skinpath$$imgfilename$:A"
    
    /, IMG, x, y, w, h, File Name, Option;IMGLAYER
    IMG,0,500,89,50,"filler1.png",OUT
    IMG,89,500,89,50,"filler1.png",OUT
    IMG,178,500,89,50,"filler1.png",OUT
    IMG,267,500,89,50,"filler1.png",OUT
    IMG,444,500,89,50,"filler1.png",OUT
    IMG,533,500,89,50,"filler1.png",OUT
    IMG,622,500,89,50,"filler1.png",OUT
    IMG,711,500,89,50,"filler1.png",OUT
    
    END
    Whenever the UP/DOWN/PGUP/PGDOWN buttons are used, it updates the image "I01" just fine. However, if I select an image straight out of the DL list not using the buttons, it won't update.

    The TMR event that I commented out has this line in the skin's ExecTBL.ini:
    Code:
    "TIMER","SETVARBYCODE;imgfilename;LISTTEXT",LOGO_CONFIG_LOGOVIEWER.skin
    
    
    .
    I tried to use TMR to update the image variable, which it does, but for some reason, the pic does not maintain it's aspect ratio after it fires.

    Any other ideas to get around this issue? Thanks to you, I'm that much closer to cleaning up the functionality of this skin.



    EDIT: Nevermind! I editted the wrong TIMER entry in the ExecTBL.ini and it was still loading images using LOADIMG. Corrected the code and all is well.

    Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

  10. #10
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    You can also use the ONDLCLICK event of that screen to set the variable if you want.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

Page 1 of 2 12 LastLast

Similar Threads

  1. Archive
    By Bitoholic in forum Mobile Media Center
    Replies: 2358
    Last Post: 09-21-2006, 05:59 PM
  2. nlite image file
    By Cheekz185 in forum Software & Software Development
    Replies: 3
    Last Post: 05-04-2005, 08:30 AM
  3. MPL File Encoding issue
    By itonylee in forum CF Bug Reports
    Replies: 1
    Last Post: 03-04-2005, 04:51 PM
  4. yet another frodo install with problems.
    By Marsupial in forum FrodoPlayer
    Replies: 10
    Last Post: 08-27-2004, 06:28 AM
  5. DWW-7VGA won't display image
    By guf in forum LCD/Display
    Replies: 0
    Last Post: 05-08-2004, 05:06 PM

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
  •