KXM Posted April 22, 2005 Share Posted April 22, 2005 (edited) I wasn't sure if this should go in the genral au3 support forum, because it's a COM question. If this is posted incorrectly, sorry. For the question. I'm trying to convert a script from VBS to AutoIt3++. Here it is in VBS: dim client dim message set client = CreateObject( "MeedioClient.MeedioPluginClient" ) if client.Connect( "localhost" , 7501 , "" , 0 , 0 ) then 'Static Girder Event set message = client.NewMessage( "girder.event" ) message( "eventstring" ) = "WakeMee-Wake" message.Send WScript.Sleep( 1000 ) client.Flush end if And here's what I got in au3: $oMeedio = ObjCreate("MeedioClient.MeedioPluginClient") if $oMeedio.Connect( "localhost" , 7501 , "" , 0 , 0 ) Then call("main") Else MsgBox(0,"error","could not connect to Meedio") EndIf Func Main() ;Static Girder Event $message = $oMeedio.NewMessage( "girder.event") ;$message ( "eventstring" ) = "WakeMee-Wake" $message.Send Sleep(1000) $oMeedio.Flush EndFunc As you can see, the line that I can't figure out how to convert is this one: VBS: message( "eventstring" ) = "WakeMee-Wake" AU3: $message ( "eventstring" ) = "WakeMee-Wake"??? Any tips? TIA! Edited April 22, 2005 by KXM Link to comment Share on other sites More sharing options...
SvenP Posted April 22, 2005 Share Posted April 22, 2005 I wasn't sure if this should go in the genral au3 support forum, because it's a COM question. If this is posted incorrectly, sorry.For the question. I'm trying to convert a script from VBS to AutoIt3++.Here it is in VBS:....As you can see, the line that I can't figure out how to convert is this one:VBS: message( "eventstring" ) = "WakeMee-Wake"AU3: $messageĀ ( "eventstring" ) = "WakeMee-Wake"???Any tips?TIA!<{POST_SNAPBACK}>Hello, KXM,$message("eventstring")= "WakeMee-Wake" should work. However in some previous beta versions I had some problems with parameters to COM-functions. Be sure to download version 3.1.1.12.If it still doesn't work you could split the line into:$Eventstring="eventstring"$message($Eventstring)= "WakeMee-Wake" Regards,-Sven Link to comment Share on other sites More sharing options...
KXM Posted April 24, 2005 Author Share Posted April 24, 2005 I get an error using both methods, using .12++$message($eventstring) = "whatever"...............^error&$message("eventstring") = "whatever"...............^errorI don't know the error info off hand, but I think it's expected an =but if I put in and = I get another error. Link to comment Share on other sites More sharing options...
SvenP Posted April 24, 2005 Share Posted April 24, 2005 I get an error using both methods, using .12++$message($eventstring) = "whatever"...............^error&$message("eventstring") = "whatever"...............^errorI don't know the error info off hand, but I think it's expected an =but if I put in and = I get another error.<{POST_SNAPBACK}>KXM, Congratulations, you also found a bug in the COM code. Well, it is actually a NYIF ("Not Yet Implemented Feature").In technical terms that specific line uses the 'Default Property' of a COM Object. That means that $Object(<expression>) is internally equal to $Object.<name-of-default-property>(<expression>). I forgot to incorporate this in AutoIt. :-)I looked up the documentation for this MeedioClient object on:http://www.meedio.com/mdn/index.php?title=IMeedioMessageAnd found out that the 'default property' for this Object is: "Values". So the line should work when entering it as: $Message.Values("eventstring")= "whatever"Regards,-Sven Link to comment Share on other sites More sharing options...
SvenP Posted April 25, 2005 Share Posted April 25, 2005 I get an error using both methods, using .12++$message($eventstring) = "whatever"...............^error&$message("eventstring") = "whatever"...............^errorI don't know the error info off hand, but I think it's expected an =but if I put in and = I get another error.<{POST_SNAPBACK}>KXM,Beta version 3.1.1.14 has been release by JPM. Both of these methods should now work:$message("eventstring") = "whatever"and/or$Message.Values("eventstring")= "whatever"Regards,-Sven Link to comment Share on other sites More sharing options...
KXM Posted April 26, 2005 Author Share Posted April 26, 2005 WOW! Talk about support! THANK YOU SO MUCH for looking that up on Meedio's site! Also, thanks for adding the functionallty to AU3! I'll it as soon I get home. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now