Computer Science Canada

using setscreen with vars for screen size

Author:  SuperGenius [ Sat May 01, 2004 10:42 am ]
Post subject:  using setscreen with vars for screen size

I was working on a web site today with Dreamweaver(mmm....) and I though it would be handy to have a WYSIWYG (What You See Is What You Get) graphics program for turing, similar to how the design mode of Dreamweaver works, which is to have you work in an enviornment like a word processor, and then convert your formatting into html tags. (basically, dont shoot me)

What I mean is that I want a user to be able to draw shapes using some basic drawing tools, and then have the parameters of each object outputted into a .txt file so that it can be pasted into turing.

I want to know if it is possible to have a user input the size of the screen they want, without having to code it into the program, like this, although this does not actually work.

code:

setscreen ("graphics" : xmax;ymax)

Author:  Paul [ Sat May 01, 2004 11:14 am ]
Post subject: 

code:

var screenx, screeny: string
var setscr: string
screenx:="max"%gives string value to x screensize
screeny:="max"%ditto
setscr:= "Graphics: "+screenx+";"+screeny %adds them up
setscreen (setscr)
put "hi"

or if u want user input size
code:

var screenx, screeny: string
var setscr: string
get screenx
get screeny
setscr:= "Graphics: "+screenx+";"+screeny
setscreen (setscr)
put "hi"

just to tell u, Delta already made a program that converts drawings in turing into turing code.

Author:  SuperGenius [ Sat May 01, 2004 11:51 am ]
Post subject: 

thanks, and damn i thought i had an origional idea. Oh well.

Another question... The results are saved in a .t file, so how would i go about using the include statement to make the program redraw everything the user has done so far so that if they are trying to draw a complex picture with different tools they will be able to?


: