Sign in to follow this  
Followers 0
myspacee

Reading XML nodes (Return with conditional operator)

14 posts in this topic

Hello,

try to read simple XML and i decided to make generic script.

I've a value (140403_0_21_00_XX_C044C021_00N_00F) and i MUST retrieve a value in same node id (="21")

<PubPlain>
  <spread0 id="1" pdfname="140403_0_01_54_MN_M048C001_00N_00F" />
  <spread1 id="2" pdfname="140403_0_02_00_XX_C002C047_00N_00F" />
  <spread2 id="3" pdfname="140403_0_03_54_XX_CL16C003_00N_00F" />
  <spread3 id="4" pdfname="140403_0_04_54_XX_C004CL15_00N_00F" />
  <spread4 id="5" pdfname="140403_0_05_54_XX_ML14M005_00N_00F" />
  <spread5 id="6" pdfname="140403_0_06_54_XX_C006CL13_00N_00F" />
  <spread6 id="7" pdfname="140403_0_07_54_XX_CL12C007_00N_00F" />
  <spread7 id="8" pdfname="140403_0_08_54_XX_C008CL11_00N_00F" />
  <spread8 id="9" pdfname="140403_0_09_54_XX_CL10C009_00N_00F" />
  <spread9 id="10" pdfname="140403_0_10_54_XX_M010CL09_00N_00F" />
  <spread10 id="11" pdfname="140403_0_11_54_XX_CL08C011_00N_00F" />
  <spread11 id="12" pdfname="140403_0_12_54_XX_C012CL07_00N_00F" />
  <spread12 id="13" pdfname="140403_0_13_54_XX_CL06C013_00N_00F" />
  <spread13 id="14" pdfname="140403_0_14_54_XX_C014CL05_00N_00F" />
  <spread14 id="15" pdfname="140403_0_15_54_XX_CL04C015_00N_00F" />
  <spread15 id="16" pdfname="140403_0_16_54_XX_C016CL03_00N_00F" />
  <spread16 id="17" pdfname="140403_0_17_54_XX_CL02C017_00N_00F" />
  <spread17 id="18" pdfname="140403_0_18_54_XX_C018CL01_00N_00F" />
  <spread18 id="19" pdfname="140403_0_19_00_XX_C046C019_00N_00F" />
  <spread19 id="20" pdfname="140403_0_20_00_XX_C020C045_00N_00F" />
  <spread20 id="21" pdfname="140403_0_21_00_XX_C044C021_00N_00F" />
  <spread21 id="22" pdfname="140403_0_22_00_XX_M022C043_00N_00F" />
  <spread22 id="23" pdfname="140403_0_23_00_XX_C042C023_00N_00F" />
  <spread23 id="24" pdfname="140403_0_24_00_XX_C024C041_00N_00F" />
  <spread24 id="25" pdfname="140403_0_25_00_XX_M040C025_00N_00F" />
  <spread25 id="26" pdfname="140403_0_26_00_XX_C026C039_00N_00F" />
  <spread26 id="27" pdfname="140403_0_27_00_XX_C038C027_00N_00F" />
  <spread27 id="28" pdfname="140403_0_28_00_XX_C028C037_00N_00F" />
  <spread28 id="29" pdfname="140403_0_29_00_XX_C036C029_00N_00F" />
  <spread29 id="30" pdfname="140403_0_30_00_XX_C030C035_00N_00F" />
  <spread30 id="31" pdfname="140403_0_31_00_XX_M034C031_00N_00F" />
  <spread31 id="32" pdfname="140403_0_32_00_XX_C032C033_00N_00F" />
</PubPlain>

My XMLs are simple but tend to vary in certain conditions. So i haven't any sure foothold, I must read XML everytime.

I've read several approaches to XML reading but can't determine which best.

(dead?) _XMLDomWrapper.au3 seems to be the best choice;

can you suggest best way to implement XML reading in AI ?

Thank you,

m.

Share this post


Link to post
Share on other sites



This is with no error handling...your script will blowup if the 'pdfname' is not found...you can break it out, and do the error handling yourself:

$file = @DesktopDir & "\temp.xml"
$oXML = ObjCreate("Microsoft.XMLDOM")
$oXML.load($file)
$id = $oXML.selectSingleNode("//PubPlain/*[@pdfname='140403_0_21_00_XX_C044C021_00N_00F']").GetAttribute("id")
ConsoleWrite($id & @CRLF)

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

i have been trying to get this to work using a code that you gave me in another thread but its not working at all  i want to search the xml by  ID=2 for example

$file = "<channels><channel ID='2' url='http://videe.com/index.php/channel/3a9a071' name='Guest1588664 live from Android' quality='best'/> <channel ID='3' url='http://videe.com/index.php/channel/ea579cc92d' name='boulon live' quality='best'/> <channel ID='4' url='http://videe.com/index.php/channel/290a3a52b' name='frank11262' quality='best'/> <channel ID='5' url='http://videe.com/index.php/channel/ab6c066e' name='REAL MADRID  #  LIVERPOOL 19:45 gmt' quality='best'/> </channels>"


$oXML = ObjCreate("Microsoft.XMLDOM")
$oXML.load($file)
$id = $oXML.selectSingleNode("//channels/*[@ID='2']").GetAttribute("url")
msgbox(4096, "test", $id)

but i am getting nothing back

what am i doing wrong?

Share this post


Link to post
Share on other sites

use .load() when you are loading a file...when loading a string...

$file = "<channels><channel ID='2' url='http://videe.com/index.php/channel/3a9a071' name='Guest1588664 live from Android' quality='best'/> <channel ID='3' url='http://videe.com/index.php/channel/ea579cc92d' name='boulon live' quality='best'/> <channel ID='4' url='http://videe.com/index.php/channel/290a3a52b' name='frank11262' quality='best'/> <channel ID='5' url='http://videe.com/index.php/channel/ab6c066e' name='REAL MADRID  #  LIVERPOOL 19:45 gmt' quality='best'/> </channels>"

$oXML = ObjCreate("Microsoft.XMLDOM")
$oXML.loadxml($file)
$id = $oXML.selectSingleNode("//channels/*[@ID='2']").GetAttribute("url")
msgbox(4096, "test", $id)
1 person likes this

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

well now after further testing  when i try to load a XML file it come back blank and this is the code i used and XML looks the same in the variable above.

$xml = @ScriptDir &  "\videe.xml"
msgbox(4096, "test", $xml)


$oXML = ObjCreate("Microsoft.XMLDOM")
$oXML.load($xml)
$id = $oXML.selectSingleNode("//channels/*[@ID='41']").GetAttribute("url")
; $id = $oXML.selectSingleNode("//*[@ID='41']").GetAttribute("url")

msgbox(4096, "test", $id & @CRLF)

is it cause the variable you used above is like all 1 line of XML?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

If the XML is not valid, then you can't use the xmldom.

Put consolewrite($oXML.xml & @crlf) after you load in the xml...if it's empty, then the XML is not valid.  Otherwise, I can't read minds, or files on outside computers.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

the xml i have is just as we had above and looks like this:

<channels>
<channel ID='2' url='http://videe.com/index.php/channel/3a9a071' name='Guest1588664 live from Android' quality='best'/>
<channel ID='3' url='http://videe.com/index.php/channel/ea579cc92d' name='boulon live' quality='best'/>
<channel ID='4' url='http://videe.com/index.php/channel/290a3a52b' name='frank11262' quality='best'/>
<channel ID='5' url='http://videe.com/index.php/channel/ab6c066e' name='REAL MADRID  #  LIVERPOOL 19:45 gmt' quality='best'/>
</channels>

you had this above

$file = "<channels><channel ID='2' url='http://videe.com/index.php/channel/3a9a071' name='Guest1588664 live from Android' quality='best'/> <channel ID='3' url='http://videe.com/index.php/channel/ea579cc92d' name='boulon live' quality='best'/> <channel ID='4' url='http://videe.com/index.php/channel/290a3a52b' name='frank11262' quality='best'/> <channel ID='5' url='http://videe.com/index.php/channel/ab6c066e' name='REAL MADRID  #  LIVERPOOL 19:45 gmt' quality='best'/> </channels>"

i do not get what is the difference in these files?  but its coming back  

>"C:Program FilesAutoIt3SciTE..autoit3.exe" /ErrorStdOut "C:Documents and SettingssettopDesktopsearch XML.au3" 

 

Share this post


Link to post
Share on other sites

That doesn't help...again, can't read minds, or your consol output...you only provided a small portion of a total picture that's needed to provide any constructive help.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

sorry but i gave you exactly what i was working with and what the console said which was blank...

i came up with a way to get it to work for now and since the XML may be formatted incorrectly it is the way i get it.

so i did this and it seems to work 

#include <Process.au3>
#include <Constants.au3>
#include <String.au3>
#include <Array.au3>

   Local Const $xmlFile = 'C:\Documents and Settings\settop\Desktop\videe.xml'
   $xml=FileRead($xmlFile)
   $colName ="2"
   $sSearch=_StringBetween($xml,"<channel ID='" & $colName & "'","/>")
   $sResult=_ArrayToString($sSearch,"")

   Local $splitXML = StringSplit($sResult, "'")
   For $i = 1 To $splitXML[0]
   Next

   msgbox(0, "URL",  $splitXML[2] & @CRLF)
   msgbox(0, "Name",  $splitXML[4] & @CRLF)
   msgbox(0, "Quality",  $splitXML[6] & @CRLF)

and once again the "xml" looks like this:

<channels>
<channel ID='2' url='http://videe.com/index.php/channel/3a9a071' name='Guest1588664 live from Android' quality='best'/> 
<channel ID='3' url='http://videe.com/index.php/channel/ea579cc92d' name='boulon live' quality='best'/> 
<channel ID='4' url='http://videe.com/index.php/channel/290a3a52b' name='frank11262' quality='best'/> 
<channel ID='5' url='http://videe.com/index.php/channel/ab6c066e' name='REAL MADRID  #  LIVERPOOL 19:45 gmt' quality='best'/> 
</channels>

it must not be reading it as XML .   do you see what i did and is there an easier way to do it?

Share this post


Link to post
Share on other sites

Works fine for me:

ConsoleWrite(FileRead("some.xml") & @CRLF)
$oXML = ObjCreate("Microsoft.XMLDOM")
$oXML.load("some.xml")
ConsoleWrite($oXML.xml & @CRLF)
$id = $oXML.selectSingleNode("//channels/*[@ID='2']").GetAttribute("url")
ConsoleWrite($id & @CRLF)

output:

<channels>
<channel ID='2' url='http://videe.com/index.php/channel/3a9a071' name='Guest1588664 live from Android' quality='best'/>
<channel ID='3' url='http://videe.com/index.php/channel/ea579cc92d' name='boulon live' quality='best'/>
<channel ID='4' url='http://videe.com/index.php/channel/290a3a52b' name='frank11262' quality='best'/>
<channel ID='5' url='http://videe.com/index.php/channel/ab6c066e' name='REAL MADRID  #  LIVERPOOL 19:45 gmt' quality='best'/>
</channels>
<channels>
 <channel ID="2" url="http://videe.com/index.php/channel/3a9a071" name="Guest1588664 live from Android" quality="best"/>
 <channel ID="3" url="http://videe.com/index.php/channel/ea579cc92d" name="boulon live" quality="best"/>
 <channel ID="4" url="http://videe.com/index.php/channel/290a3a52b" name="frank11262" quality="best"/>
 <channel ID="5" url="http://videe.com/index.php/channel/ab6c066e" name="REAL MADRID  #  LIVERPOOL 19:45 gmt" quality="best"/>
</channels>

http://videe.com/index.php/channel/3a9a071


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

 that is strange,  am i missing an include file or something?

cause it fails printing to console on the second console write command here:

$oXML.load("C:\Documents and Settings\settop\Desktop\videe.xml")
ConsoleWrite($oXML.xml & @CRLF)

or is it just correct xml?

the first one works and prints out just fine

Edited by dynamitemedia

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

No includes are necessary...and you are still not posting back enough information...why didn't you include the fileread output?

I want the output from the consol, not what you think the file contains.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

sorry cause honestly totally new to this and not 100% what i am supposed to show... i am only getting the 1st one showing in console and second one shows nothing   

this is the whole code, the fileread output works just fine but its a lot so i commented it out

;ConsoleWrite(FileRead("C:\Documents and Settings\settop\Desktop\videe.xml") & @CRLF)
$oXML = ObjCreate("Microsoft.XMLDOM")
$oXML.load("C:\Documents and Settings\settop\Desktop\Desktop\videe.xml")
ConsoleWrite($oXML.xml & @CRLF)
$id = $oXML.selectSingleNode("//channels/*[@ID='2']").GetAttribute("url")
ConsoleWrite($id & @CRLF)

console read this:

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\settop\Desktop\test.au3"    


>Exit code: 0    Time: 0.3512

If that is not what your asking for i am sorry cause i just started using this 2 days ago i am used to bat and echo etc...  i was using Notepad++ till yesterday as well.   Not trying to be difficult just not familiar with the program yet 

Edited by dynamitemedia

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Well, obviously, your xml does not contain exactly what you posted above...and since I can't see it, I assume it's faulty.

Good luck.

Keep going the regular expression route...I'm not the best at those, so would leave it to others to answer.

Edited by jdelaney
1 person likes this

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • Simpel
      By Simpel
      Hi. I'm trying to write a xml. Here is my code:
      #include <_XMLDomWrapper.au3> #include <Date.au3> Global $g_sXMLFileName Global $g_sDestPath = @DesktopDir & "\" Global $g_sReturnedBID = "A10829" _makeXML() _AddXML(1, "A10829_Thomas/wav/T001.wav") _AddXML(2, "A10829_Thomas/wav/T002.wav") Exit Func _makeXML() Local $sXMLtime = StringReplace(StringReplace(StringReplace(_NowCalc()," ","_"),":","-"),"/","-") ; in yyyy-mm-dd_hh-mm-ss $g_sXMLFileName = $g_sDestPath & $g_sReturnedBID & "_" & "EB-Ton-Upload" & "_" & $sXMLtime & ".xml" _XMLCreateFile($g_sXMLFileName, "gemagvl", 1,1) _XMLFileOpen($g_sXMLFileName) EndFunc Func _AddXML($iCount, $sDateiname) _XMLCreateRootNodeWAttr("row", "count", $iCount, "") _XMLCreateChildNode("//row", "picklistenname", $g_sReturnedBID & "_EB-Ton-Upload") _XMLCreateChildNode("//row", "picklisteninfo") _XMLCreateChildNode("//row", "bid", $g_sReturnedBID) _XMLCreateChildNode("//row", "audiodateiname", $sDateiname) _XMLCreateChildNode("//row", "titel", StringTrimRight(StringTrimLeft($sDateiname, 7), 4)) _XMLCreateChildNode("//row", "interpret", "EB") _XMLCreateChildNode("//row", "quelle", "Ton") EndFunc It returns:
      <?xml version="1.0" encoding="UTF-8"?><gemagvl> <row count="1"> <picklistenname>A10829_EB-Ton-Upload</picklistenname> <picklisteninfo/> <bid>A10829</bid> <audiodateiname>A10829_Thomas/wav/T001.wav</audiodateiname> <titel>Thomas/wav/T002</titel> <interpret>EB</interpret> <quelle>Ton</quelle> <picklistenname>A10829_EB-Ton-Upload</picklistenname> <picklisteninfo/> <bid>A10829</bid> <audiodateiname>A10829_Thomas/wav/T002.wav</audiodateiname> <titel>Thomas/wav/T003</titel> <interpret>EB</interpret> <quelle>Ton</quelle> </row> <row count="2"> <picklistenname>A10829_EB-Ton-Upload</picklistenname> <picklisteninfo/> <bid>A10829</bid> <audiodateiname>A10829_Thomas/wav/T002.wav</audiodateiname> <titel>Thomas/wav/T003</titel> <interpret>EB</interpret> <quelle>Ton</quelle> </row> </gemagvl> But it should return:
      <?xml version="1.0" encoding="UTF-8"?><gemagvl> <row count="1"> <picklistenname>A10829_EB-Ton-Upload</picklistenname> <picklisteninfo/> <bid>A10829</bid> <audiodateiname>A10829_Thomas/wav/T001.wav</audiodateiname> <titel>Thomas/wav/T002</titel> <interpret>EB</interpret> <quelle>Ton</quelle> </row> <row count="2"> <picklistenname>A10829_EB-Ton-Upload</picklistenname> <picklisteninfo/> <bid>A10829</bid> <audiodateiname>A10829_Thomas/wav/T002.wav</audiodateiname> <titel>Thomas/wav/T003</titel> <interpret>EB</interpret> <quelle>Ton</quelle> </row> </gemagvl> The second inserted nodes are double. How will it be going right?
      Regards, Conrad
    • rootx
      By rootx
      I need help to read in a loop the DVD id child and subchild. Thx
      Example...
      DVD001 - PAL - EN,FR,DE,ES,IT and filter the right title & descri language.  I tried with $oXML.SelectSingleNode but without success
      <?xml version="1.0" encoding="UTF-8"?> <datafile xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mydvd.xsd"> <dvd name="My dvd title"> <id>DVD001</id> <region>PAL</region> <languages>EN,FR,DE,ES,IT</languages> <locale lang="EN"> <title>title en</title> <descri>descri en</descri> </locale> <locale lang="FR"> <title>title fr</title> <descri>descri fr </descri> </locale> <locale lang="DE"> <title>title de</title> <descri>descri de </descri> </locale> <locale lang="ES"> <title>title es</title> <descri>descri es</descri> </locale> <locale lang="IT"> <title>title it</title> <descri>descri it</descri> </locale> </dvd> <dvd name="My dvd title 2"> <id>DVD002</id> <region>USA</region> <languages>EN</languages> <locale lang="EN"> <title>title en</title> <descri>descri en</descri> </locale> </dvd> </datafile> #include <File.au3> $xml = @ScriptDir&"\test.xml" Local $oXML = ObjCreate("Microsoft.XMLDOM") $oXML.load($xml) $id = $oXML.SelectNodes("//dvd") For $ids In $id ConsoleWrite($ids.text &@CRLF) Next  
    • mLipok
      By mLipok
      I was asking @eltorro serveral times for any support  for XML DOM wrapper (COM) - with no success  
          So I took matters into my hands ..... I want to present XMLWrapperEx.au3 - BETA Version
      Want to join to the project ?
       
      Here is some description:
      ; #INDEX# ======================================================================================================================= ; Title .........: XMLWrapperEx.au3 ; AutoIt Version : 3.3.10.2++ ; Language ......: English ; Description ...: Functions to use for reading and writing XML using msxml. ; Remarks .......: BETA Version ; Author ........: mLipok ; Version .......: "1.1.1.01" ; _XML_MiscProperty_UDFVersion() #CS This UDF is created on the basis of: https://www.autoitscript.com/forum/topic/19848-xml-dom-wrapper-com/ For this reason, I attach also the last known (to me) previous version ($_XMLUDFVER = "1.0.3.98" _XMLDomWrapper_1.0.3.98_CN.au3 ) For the same reason I continue to recognize the achievements of the work of my predecessors (they are still noted in each Function header). . . . . !!!!!!!!! This is BETA VERSION (all could be changed) !!!!!!!!! . . . WORK IN PROGRES INFORMATION: For now 2015-09-01 the descripion (Function Header) can not entirely correctly describe the function. TODO: in many places I used "TODO" as a keyword to find what should be done in future . I want to: PREVENT THIS: The unfortunate nature of both the scripts is that the func return results are strings or arrays instead of objects. .     I want to: USE THIS CONCEPT:     .   All function should use Refernce to the object as first Function parameter     .   All function should return in most cases objects. There should be separate functions to Change Object collection to array     .   All function should use COM Error Handler in local scope.     .   All function should return @error which are defined in #Region XMLWrapperEx.au3 - @ERROR Enums     .    All function should have the same naming convention     .    All variables should have the same naming convention     .    There should not to be any Global Variable - exception is $g__oXMLDOM_Events     .   It should be possible easy to use XML DOM Events     .        https://msdn.microsoft.com/en-us/library/ms764697(v=vs.85).aspx     .   It should be possible easy to Debug     .    Ultimately, you should be able to do anything with your XML without having to use your own Error Handler. #CE  
      More info inside zip archive.
      This UDF can be downloaded from here:
      REMARK:
      This UDF was formerly named:   XMLWrapperEx.au3 
       
    • 31290
      By 31290
      Hi Guys, 
      Since I'm able to get a Dell equipment warranty status thanks to my API key, I'm using an UDF to extract data from an XML file and get the end date. > 
      Thing is, when using InetGet, the original file is in JSON format and the UDF is not working anymore, even if I download the file with the xml extension. Therefore, and when I manually download the page with Chrome, I have a proper XML file where the UDF is working fine.
      Here's my code:
      I even tried to convert the json to xml > https://www.autoitscript.com/forum/topic/185717-js-json-to-xml/
      I took a look here https://www.autoitscript.com/forum/topic/104150-json-udf-library-fully-rfc4627-compliant/ but I don't understand anything :/
       
      The XML read UDF is just perfect for my needs but I'm stuck here... 
      Thanks for any help you can provide
      -31290-
      3MTXM12.json
      3MTXM12.xml
    • Zaroz
      By Zaroz
      Alright, this is going to be a rather long explanation so bear with me.
      What I am trying to to is build a GUI program that, in the end, will look like this:
      The middle Frame is for displaying a desktop icon and the right frame is for displaying a selected image.
      The XML file I am using looks like this:
      <list> <item id="1"> <ico>Path\to\icon1<\ico> <img>Path\to\image1<\img> <exe>Path\to\program1<\exe> <label>UserDefinedLabel1<\label> <\item> <item id="2"> <ico>Path\to\icon2<\ico> <img>Path\to\image2<\img> <exe>Path\to\program2<\exe> <label>UserDefinedLabel2<\label> <\item> <\list> What I want this program to do is when I highlight an item in the listbox (which btw is displaying the <label> value associated with the item) I want the displayed icon and image to change to the ones associated with that entry. 
      Also I would like to include an additional dialog to open when the 'ADD' button is clicked that will add entries to the XML file that looks like this:

       
      The main problem I am running into is that I do not know much about XML and how to parse it into dynamic variables that can change based off of selection.
      Any help is appreciated.
       
       
       
      10-29-16 EDIT: For all intents and purposes, I basically want to create something similar to PStart, but with a preview pane with a customizable image for each item in it.