Opened 12 years ago

Closed 12 years ago

#2076 closed Bug (Fixed)

Object value can't be set True

Reported by: chrisg1941@… Owned by: trancexx
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


I have been trying to implement programming of Open Office through AutoIt. Open Office requires the passing of an object to its loadComponentFromURL function. This object consists of a Name and a Value, and is used to pass various information on the file, such as password (passes a string value) and Readonly (passes a boolean).

I have implemented a function to set up this up, based on several examples in these forums. However, I find that while this passes strings OK, it apparently cannot be used to set boolean values to true - whatever I try, it stays as false.

Here's a quick and dirty example which demonstrates this:

Dim $OpenPar

; This returns object with both fields correct
$OpenPar = MakePropertyValue("Password", "secret")

; This returns object with value False as requested
$OpenPar = MakePropertyValue("ReadOnly", False)

; This returns object with Vlue False, not True as reuqested
$OpenPar = MakePropertyValue("ReadOnly", True)


Func MakePropertyValue($cName, $uValue)
    $oSM = Objcreate("")
    $oPropertyValue = $oSM.Bridge_GetStruct("")
    $oPropertyValue.Name = $cName
    $oPropertyValue.Value = $uValue
    $setOOoProp = $oPropertyValue
    Return $setOOoProp

Attachments (0)

Change History (1)

comment:1 Changed 12 years ago by trancexx

  • Milestone set to
  • Owner set to trancexx
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [6571] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain trancexx.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.