Jump to content

What is 'E3' and how do I get it out of my life?


Go to solution Solved by jaberwacky,

Recommended Posts

Using AutoItObject, I cannot make a method with the name 'E3'. The even more bizarre part is when I post the autoit code to this forum, the 'E3' is highlighted in red. See below.

#include <AutoItObject.au3>
OnAutoItExitRegister("EvtScriptExit")
_AutoItObject_StartUp()

Global $o=_AutoItObject_Create()

;BUG: Cannot seem to make a property-type method called E3, other names work however

MsgBox(0,'VarGetType($o)',VarGetType($o));checkit

;Change this to false to show the bug
Global $make_it_work=True

;#cs
If Not $make_it_work Then
  ;Make an E3 property and backer
  _AutoItObject_AddProperty($o,'_E3',$ELSCOPE_PUBLIC,'initialized')
  _AutoItObject_AddMethod($o,'E3','E3_property',False)
Else
  ;Make an F3 property and backer
  _AutoItObject_AddProperty($o,'_E3',$ELSCOPE_PUBLIC,'initialized')
  _AutoItObject_AddMethod($o,'F3','E3_property',False); THIS LINE DIFFERS IN NAME ONLY 'F3'
EndIf



If Not $make_it_work Then
  MsgBox(0,'$o.E3',$o.E3); ERROR Error in expression at $o.E3
Else
  MsgBox(0,'$o.F3',$o.F3); Not a problem
EndIf


Func E3_property($me,$value=-1)
  If @NumParams==2 Then
    $me._E3=$value
  Else
    Return $me._E3
  EndIf
EndFunc

Func EvtScriptExit()
  _AutoItObject_Shutdown()
EndFunc

Look at the E3 MsgBox line. So what is E3? Is there a ghost in the machine? I must admit, this is a bit freaky man.

Link to comment
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
 Share

×
×
  • Create New...