PDA

View Full Version : Passing Variables from VB to Girder



NeoMorph
September 2nd, 2007, 06:43 PM
I'm really in thicko mode here but I can't think what to search for when trying to figure out how to send vaiables from VB to Girder.

I want to eventually download emails in VB, Pass the text to Girder then get Girder to send the email as an SMS to me via the Nokia SMS plugin by Danward. I know the SMS plugin can accept lua variables but I can't get it into my head how to pass the variable over to Girder from VB. :confused:

I swear my IQ is dropping by 10 points per day here... :(

NeoMorph
September 2nd, 2007, 11:37 PM
OK... I have events appearing in the G5 logger along with the payloads so that part of things seems to actualy work now - I just got to figure out how to get those payloads to another part of Girder... namely the SMS plugin. I know you can parse lua variables in the Nokia SMS plugin but how do you go about passing the payloads over to lua?

NeoMorph
September 2nd, 2007, 11:58 PM
Once again I'm finding that something simple in G3 seems complicated in G4/G5... all I want to do is trigger an event from my vb program and getting nothing happening.

I have to say that I'm really not liking my experience with G5 compared to G3. G3 was soooooooo easy compared to G5.

Edit: OK... Final Countdown time.... Looks like if I can't figure out how to get a Girder Event from a VB program into a Girder Command then I'm going to give up... yes just give up. I just can't take the strain of trying to guess how to do something that should have clear indications in the help file (it doesn't as usual).

All I want is to simple be able to read the event that I see happening in the Girder Logger.... Read Payload 1 into the SMS Send Message event "Msg to send" field and then send the message. Sounds simple but I can't figure it out.

Here is what I have tried and nothing happens...

Got the command to popup the volume OSD... F5 pops it up ok.
I added an event to it...

Event Devices: Girder Events
Event String: Washpot
Event Filter: All Sources

My test VB program is this...

Private Sub Command1_Click()
Dim MyGirder As New GIRDERXLib.Girder
MyGirder.TriggerEvent "Washpot", 18, "This is the Payload", "2", "3", 0
End Sub

In G5 I see "Washpot" appear down the bottom left of the screen so G5 is definately receiving the event... Just seems to be that G5 is ignoring it.

I'm really beginning to hate programming! I used to find it so damned easy.

Rob H
September 3rd, 2007, 12:13 AM
I've not used Dan's Nokia plugin, but if it has a treescript action then you should be able to put the variable in square brackets.

NeoMorph
September 3rd, 2007, 12:31 AM
I've not used Dan's Nokia plugin, but if it has a treescript action then you should be able to put the variable in square brackets.

Thing is the event isn't even being triggered. I know about the square brackets bit... I just can't see why the event won't trigger.

Rob H
September 3rd, 2007, 12:37 AM
Try dragging the event from the logger to the action instead.

NeoMorph
September 3rd, 2007, 12:41 AM
OK tried that... AHAH... I though... Gotta work....

Nope... Nothing doing.

Why is it showing up in the log yet the command not being activated?

NeoMorph
September 3rd, 2007, 12:47 AM
ROFLMAO....

All sodding night... wasted due to a stupid oversight of mine...

demo.gml was disabled!

Talk about embarrasing....

Guess what... it works now and I got my first email to popup in a girder window so that means I will be able to get the SMS working too.

Oh well it's all well that ends well... Guess the bard was right eh?

OMG... 8:48am... I last looked at 4am... oops... irritation due to lack of morphine again... should have taken it at 8am

Rob H
September 3rd, 2007, 01:10 AM
It's often the simplest things

NeoMorph
September 3rd, 2007, 02:48 AM
It's often the simplest things

Actually you may want to think about greying out all the commands that are disabled... ie if the entire gml is disabled it should show all the commands as disabled. Because the gml title was disabled yet off screen I never thought to look there... mainly because all the commands showed as "enabled" which they most definately were not.

It's currently very misleading in this way.

Rob H
September 3rd, 2007, 03:41 AM
That sounds sensible to me