From: Junkone Date: 2008-01-09T06:59:59+09:00 Subject: Re: prob only with ruby On Jan 8, 4:00 pm, John Wells wrote: > On Jan 8, 2008 3:10 PM, Junkone wrote: > > > Hello > > i am using ole automation to drive some of my processes. the following > > code would run properly in other languages like vbscript. but it fails > > only in ruby > > application = WIN32OLE.new("Broker.Application") > > >   analysis=application.analysis() > > > analysis.Filter(0, "market") = 3  # use nasdaq only          << ruby > > does not allow setting values like this. it errors syntax error, > > unexpected '=', expecting $end. however this assignmetn is valid in > > vbscript for the same object. is there any other way of doing it. > > I'm not a vbscript guy, but did you try: > > myvar = analysis.Filter(0, "market") > myvar = 3 > > ? Nope. it does not work b=analysis.Filter(0, "market") #= 3 # use nasdaq only b=3 It does not change anything at all. However if i ran a similar code in vbscript, it does the magic. set application = CreateObject("Broker.Application") application.visible=1 set analysis=application.analysis() analysis.Filter( 0, "market" ) = 3 so something is wrong with the way ruby does automation.