Changeset 10524 for trunk/winbin


Ignore:
Timestamp:
2005-08-17T15:18:26+12:00 (19 years ago)
Author:
chi
Message:

Modifications of parsing file pathname.

Location:
trunk/winbin/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/winbin/bin/pptextract.frm

    r10492 r10524  
    4949    meta = False
    5050   
     51    'cmdln = "-g " & Chr(34) & "C:\chi\gsdl\collect\PPTTest2\import\16-A.ppt" & Chr(34) & Chr(34) & "C:\chi\gsdl\collect\PPTTest2\tmp\16-A" & Chr(34)
    5152    cmdln = Command()
     53    'MsgBox ("Command:" + cmdln)
    5254    'cmdln = "-g H:\chi\Visual Basic\ForumPres270404.ppt H:\chi\Visual Basic\tmp\ForumPres270404"
    5355    outputdir = getoutput(cmdln)
    5456    File = Left(cmdln, InStr(cmdln, ".ppt") + 3)
     57    'MsgBox ("File:" + File)
    5558    item_file = Left(cmdln, InStr(cmdln, ".ppt"))
    5659    args = getargs(File)
     60    'MsgBox ("agr:" + args)
    5761    direc = getdir(File)
     62    'MsgBox ("direc:" + direc)
    5863    File = getfile(File)
     64    'MsgBox ("File:" + File)
     65   
    5966    item_file = getfile(item_file)
    60    
     67       
    6168    If InStr(args, "h") Then htm = True
    6269    If InStr(args, "j") Then jpg = True
     
    7279   
    7380    ' Modified for apply to GSII environment setting
     81    'MsgBox ("OUTPUT_dir:" + outputdir)
    7482    output_tmp = Left(outputdir, InStr(outputdir, "\tmp") + 3)
     83    'output_tmp = Mid(outputdir, 2, InStr(outputdir, "\tmp") + 3)
     84    'MsgBox ("OUTPUT_TMP:" + output_tmp)
     85   
    7586    If Not fso.FolderExists(output_tmp) Then
    7687       fso.CreateFolder (output_tmp)
     
    96107    item.WriteLine ("<PagedDocument>")
    97108    'item.WriteText "<PagedDocument>", 1
    98     source = direc + File
    99     ppts.Open (source)
     109    Source = direc + File
     110    'MsgBox ("Src:" + Source)
     111    ppts.Open (Source)
    100112                           
    101113    'do stuff
     
    211223    cmdln = line
    212224    While InStr(cmdln, ".ppt")
    213         cmdln = LTrim(RTrim(Right(cmdln, Len(cmdln) - (InStr(cmdln, ".ppt") + 3))))
     225        'cmdln = LTrim(RTrim(Right(cmdln, Len(cmdln) - (InStr(cmdln, ".ppt") + 4))))
     226        cmdln = Trim(Right(cmdln, Len(cmdln) - (InStr(cmdln, ".ppt") + 4)))
     227        cmdln = Trim(Mid(cmdln, 2, Len(cmdln) - 2))
    214228    Wend
    215229    getoutput = cmdln
     230    'MsgBox ("OUTPUTDIR:" + getoutput)
    216231End Function
    217232Function getargs(line)
     
    222237End Function
    223238Function getdir(line)
    224     x = LTrim(Right(line, Len(line) - Len(getargs(line))))
     239    x = LTrim(Right(line, Len(line) - Len(getargs(line)) - 1))
    225240    If InStr(x, ":") <> 2 Then
    226241        direc = CurDir
     
    233248    Wend
    234249    getdir = direc
     250    'MsgBox ("GetDIr:" + getdir)
    235251End Function
    236252Function getfile(line)
     
    240256    Wend
    241257    getfile = x
    242 End Function
     258    End Function
    243259Sub itemxml(out_item, thisfile, txtfile, num, slide_title)
    244260    out_item.WriteLine ("   <Page pagenum=" + Chr(34) + CStr(num) + Chr(34) + " imgfile=" + Chr(34) + thisfile + Chr(34) + " txtfile=" + Chr(34) + txtfile + Chr(34) + ">")
Note: See TracChangeset for help on using the changeset viewer.