Jump to content

Quick support question.


KXM
 Share

Recommended Posts

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 by KXM
Link to comment
Share on other sites

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

I get an error using both methods, using .12++

$message($eventstring) = "whatever"

...............^error

&

$message("eventstring") = "whatever"

...............^error

I 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

I get an error using both methods, using .12++

$message($eventstring) = "whatever"

...............^error

&

$message("eventstring") = "whatever"

...............^error

I 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=IMeedioMessage

And 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

I get an error using both methods, using .12++

$message($eventstring) = "whatever"

...............^error

&

$message("eventstring") = "whatever"

...............^error

I 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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...