Sign in to follow this  
Followers 0
Guest sydullasyed

How to create an object, that reads XML file ,in AutoIT

4 posts in this topic

I need an object that reads a file in xml format. Autoit won't provide directly xml file object to load an xml file .Can anybody help me in the way how to create that object.

send me solution to my id

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I need an object that reads a file in xml format. Autoit won't provide directly xml file object to load an xml file .Can anybody help me in the way how to create that object.

send me solution to my id

As I recall about extensible markup Language it's a part of MS office packed and both ms words and frontpage can both convert end edit this file format and if so you can use an embedded componet to do the trick...

A simple msoffice embedded example

; Author:   Kåre Johansson
; AutoIt Version: 3.1.1.56
; Description: Very Simple example: Embedding MSOffice object
; Date: 7 jul 2005

#include <GUIConstants.au3>
#include <Word.au3>

Dim $w = 670, $h = 205
GUICreate ("Embed msoffice spreadsheet control", $w, $h, -1, -1,BitOr($WS_OVERLAPPEDWINDOW,$WS_VISIBLE,$WS_CLIPSIBLINGS))
$TagsPageC = GuiCtrlCreateLabel('Visit Tags Page', 5, $h - 20, 100, 15, $SS_CENTER)
GuiCtrlSetFont($TagsPageC,9,400,4)
GuiCtrlSetColor($TagsPageC,0x0000ff)
GuiCtrlSetCursor($TagsPageC,0)
$1C = GUICtrlCreateButton('Play',105,$h - 23,70,20)
$2C = GUICtrlCreateButton('Pause',175,$h - 23,70,20)
$3C = GUICtrlCreateButton('Showmenu',245,$h - 23,70,20)

$oRP = ObjCreate("OWC.Spreadsheet.9")
$GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , $w - 20 , $h -40 )
$Dummy = ObjEvent($oRP,"Event_","Dummy"); this is a dummy event handle

With $oRP; Object tag pool

EndWith

GUISetState ();Show GUI

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $TagsPageC
            Run(@ComSpec & ' /c start http://www.myplugins.info/guids/typeinfo/typeinfo.php?clsid={4C599241-6926-101B-9992-00000B65C6F9}','', @SW_HIDE)
        Case $msg = $1C
            $oRP.Play
        Case $msg = $2C
            $oRP.Pause
        Case $msg = $3C
            $oRP.ShowMenu(2)
    EndSelect
WEnd
$oRP = 0
GUIDelete ()
Exit

You can search this forum for other examples like use msword...

kjactive :D

Edited by kjactive

Share this post


Link to post
Share on other sites

Why can't you parse the file yourself using text functions?

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