[directmusic] Re: Script Weirdness II

  • From: "Ciaran Walsh" <ciaran@xxxxxxxxxxxxxx>
  • To: <directmusic@xxxxxxxxxxxxx>
  • Date: Mon, 27 Jan 2003 12:31:31 -0000

I'm glad I could be of some help, even if it was in the most oblique fashion
;)

your point about VB vs. AudioVB raises something I've often wondered but
never found the time to investigate properly...

What is it that you can do with VB script that you can't do with AudioVB? (I
have never done any VB programming so forgive my ignorance) As I understand
it, AudioVB is a stripped down version of VB so presumably there is some
trade off in terms of functionality.

What is the difference in performance between the two?
Any points of view on the pros and cons of each would be most welcome,
Cheers,
Ciaran

-----Original Message-----
From: directmusic-bounce@xxxxxxxxxxxxx
[mailto:directmusic-bounce@xxxxxxxxxxxxx]On Behalf Of Kenneth Young
Sent: 27 January 2003 12:31
To: directmusic@xxxxxxxxxxxxx
Subject: [directmusic] Re: Script Weirdness II


Thanks Ciaran,

I created a simple demo with which to prove you wrong (or so I thought), but
everything worked as expected!

Then I realised what I had done wrong; I had a VB Script passing a variable
to an AudioVB script (doh!). The two of them don't seem to communicate
properly.

Changing all my scripts to VBScript solves the problem.

Cheers,

Kenny

----- Original Message -----
From: "Ciaran Walsh" <ciaran@xxxxxxxxxxxxxx>
To: <directmusic@xxxxxxxxxxxxx>
Sent: Monday, January 27, 2003 11:30 AM
Subject: [directmusic] Re: Script Weirdness II


>
> I had to break up my scripts into about 5 components in my last project,
one
> master script and various sub scripts dedicated to specific areas of
> functionality. I was able to set a variable in one script from a routine
in
> another, prefixing the target script name to the variable name, as you
would
> to call a routine, thus:
>
>
> sub Init
> Def = 0
> PLevel = 0
> SLevel = 0
> Stopped = 1
> Internal.X = 0
> Internal.FT = 0
> Internal.PTrans = 0
> DScript.DStatus = 0
> DScript.DFuse = 0
> DScript.Seen = 0
> SScript.SStatus = 0
> Internal.CMode = 0
> Grooves.GL = 0
> SetMasterGrooveLevel Grooves.GL
> SetMasterVolume 0
> end sub
>
> was an initialisation routine in my main script that set the initial
values
> of variables in 4 other scripts.
>
> I hope that's helpful,
> Ciaran
>
> -----Original Message-----
> From: directmusic-bounce@xxxxxxxxxxxxx
> [mailto:directmusic-bounce@xxxxxxxxxxxxx]On Behalf Of Kenneth Young
> Sent: 25 January 2003 23:37
> To: directmusic@xxxxxxxxxxxxx
> Subject: [directmusic] Script Weirdness II
>
>
> Hey folks,
>
> Things have been quiet around here recently; I hope everyone is doing
ok?!!
>
> My script has been getting rather obese recently, and I found that I had
> reached a limit on its size.
> So, I've begun converting my project into multiple scripts (oh joy
unbound).
>
> I've found that passing a variable to another script, where that variable
is
> then being checked by an if statement, results in this error:
>
> <0001> Script error in script.spp, line 244
> <0001> Microsoft AudioVBScript Runtime Error: Type Mismatch: the condition
> of an if statement did not evaluate to a numeric True/False value
> <0001> Error Code: 0x88781224
>
> My solution to this is to call a subroutine in the destination script
which
> "manually" changes the variable.
> Whilst this solves the problem, and I have everything working, I was
> wondering if I was missing something fundamental?
>
> Cheers,
>
>
> Kenny
>


-- Binary/unsupported file stripped by Ecartis --
-- Type: application/x-zip-compressed
-- File: Script Weirdness II.zip




Other related posts: