script learning

Smart people ~ Great Scripts
pugman 1
Captain
Posts: 1555
Joined: 21 May 2009, 19:26
Type the number ten into the box: 0
Location: Germany

script learning

Post by pugman 1 »

HI Froo , ralph here, i thought this should be here.maybe this takes a while.
The tutorial is a power point script_tut.what i would like to learn is how to make plugins but first i must
learn scripting . but i have no idea. I reed lot of stuff here and think , you are the man.
only if you have time to help. thanks for evey thing hope to here from you :bananacheers:
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: script learning

Post by froo »

Hi Ralph.
Good to hear we've got another scriptor/plugin developer onboard!
There's other scriptors here too; I'm not the only one by far! But we
all work together.

I will have to locate some good links and post them; they may already be here, not sure.
Or, at this website, which you ought to subscribe to as well:

truespaceplugins.com

I'll try to get some stuff together.
pugman 1
Captain
Posts: 1555
Joined: 21 May 2009, 19:26
Type the number ten into the box: 0
Location: Germany

Re: script learning

Post by pugman 1 »

Thanks Froo, I must first learn all this,it could take a long time,but i will keep at it 8-)
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: script learning

Post by froo »

no prob pugman. :D

As the docs say, the best way to learn scripting is to just do it!

Froo
pugman 1
Captain
Posts: 1555
Joined: 21 May 2009, 19:26
Type the number ten into the box: 0
Location: Germany

Re: script learning

Post by pugman 1 »

HI to everyone, what i am looking for is a guide on how to start making a plugin.Ithink i have everything
i need , i have kens tutorial but this is for use with the 5.1 SDK.
thanks Ralph..
weedhunter
Chief Petty Officer
Posts: 105
Joined: 03 Dec 2009, 14:06
Type the number ten into the box: 0
Location: Russian Hell

Re: script learning

Post by weedhunter »

i would like to learn how to make my own plugin too.
i know the fundelmentals of C++ and some basic scripting.
i know a little jscript. i learn some while learning HTML.

i have ts 7.6.1 b8

so if you dont mind. may you ponit me in the right diriction? :bananathumb:
ty
My future project is to have tS work on Mac!!
Learning C and Cocoa rite now!!
Wigand
Senior Chief Petty Officer
Posts: 204
Joined: 21 May 2009, 17:38

Re: script learning

Post by Wigand »

To find a starting point for scripting, I think it is a good idea to use the
macro recorder. Then you can learn much from what TS is doing under
the surface. This is one side of the coin.
On the other side it is important to learn the programming language you
want to use. But now you encounter difficulties. To learn each side at the same time
can be very hard and frustrating. :bananasad: If you first read in the TS doxygen
you will understand nearly nothing. No, I don't want to discourage you.

My suggestion:
Try this:
1. Become familiar with the scripted objects in the LE. Change the position
of textboxes, resize them, look into their properties, see how they are
connected to variables, or activities.
2. Look how attributes are made and changed, look what kind of types are possible.
Understand for what strings, numbers and ints are used.

3. Create 3 attributes (orange triangle). Two Inputs, one Output, all numbers
4. Create 3 Edit Controls assign them to your in and outs
5. Jump into your object (orange triangle) Look into the methods, you will find something like
this (VB script)

Code: Select all

' OnComputeOutputs 
' Called to compute values of all output connectors
Sub OnComputeOutputs(params)
	Dim EingangA, EingangB, Ausgang
	EingangA = params.ConValue("EingangA")
	EingangB = params.ConValue("EingangB")

	' TODO: put your computation here


	 params.ConValue("Ausgang") = EingangA + EingangB
End Sub
Look what I have done: I take the numbers of input "EingangA" and input "EingangB" into
two variables EingangA and EingangB.
Then I add EingangA to EingangB and send the result to my output ("Ausgang")


I think this is one of the most easy programs.
Later you can check what happens if you change "+" to "&" or other functions.

Now, if you have any question ask. :bananahi:
weedhunter
Chief Petty Officer
Posts: 105
Joined: 03 Dec 2009, 14:06
Type the number ten into the box: 0
Location: Russian Hell

Re: script learning

Post by weedhunter »

i havnt tried the script yet but using the '&' would be a bad syntax. wouldnt it be? cuase '&' is not a prober operater. or is it. im not very Fimalier with VB. but i wont mind learning it in the future.
My future project is to have tS work on Mac!!
Learning C and Cocoa rite now!!
Wigand
Senior Chief Petty Officer
Posts: 204
Joined: 21 May 2009, 17:38

Re: script learning

Post by Wigand »

The & is used to join strings together.
If you use 15 + 20 you get 35. VB thinks you use numbers
If you use 15 & 20 you get 1520. VB thinks you use strings

This is VB script, you always have to know what you want to do with the inputs.
weedhunter
Chief Petty Officer
Posts: 105
Joined: 03 Dec 2009, 14:06
Type the number ten into the box: 0
Location: Russian Hell

Re: script learning

Post by weedhunter »

& is a operator.

im learning c rite now and my goal is going to get truespace to work on Mac OS X
My future project is to have tS work on Mac!!
Learning C and Cocoa rite now!!

Return to “Scripts and SDK”