Computer Science Canada read n run another turing file from oneprogram??? |
Author: | xmen [ Sun Mar 28, 2004 3:38 pm ] |
Post subject: | read n run another turing file from oneprogram??? |
u see rite now im making screensaverS for an assignment. it starts with a "menu" (just simply with GUI buttons) for viewing the 5 screensavers, so the first button is screen 1 n etc but the problem is, if i was to copynpaste all 5 screensavers' codes and complie them into one program for this assignment, im thinking that i'll lag quite alot (especially with school computers). so i justwanna ask u if theres a command (for GUI button procedure) to read n run another turing file/program once i click GUI button 1,2,3...... so i'll hav 6 programs with 5 screensavers and one "menu" page |
Author: | Delos [ Sun Mar 28, 2004 3:45 pm ] | ||||||
Post subject: | |||||||
Quite simple, in more than 1 context. Case 1: Each screen saver is compiled as a seperate programme. In your menu, you will have x number of buttons. Each button has an associated procedure. In each procedure have a Sys.Exec (pathName) condition. I.e.:
Check out the F10 entry on Sys for more info. Case 2: Each screen saver is not compiled. In this case, modularize all your programmes and then import all modules into your menu file. In your GUI button procedures, call the modular reference.
That would be screen1.t
So there you go. I'm sure there are some good Module tutorials available for your viewing pleasure/leisure. |
Author: | sport [ Sun Mar 28, 2004 3:50 pm ] | ||||
Post subject: | Applications | ||||
The thing that you can do is open them as applications. For Internet Adress
For application
You have to describe the full path to the file |
Author: | xmen [ Sun Mar 28, 2004 3:59 pm ] |
Post subject: | |
well i didnt make standalone for the screensavers.....so i guess i should go with case2, but i dun reli get in can someone explain to me again??thankyou |
Author: | the_short1 [ Sun Mar 28, 2004 4:55 pm ] |
Post subject: | |
good stuff about the module... i kinda tried it for my virtual keyboard but i gave up cuz my stomach is growling and im hungry... meh!... thx foir the info... and sport... that is exactly what the person above u posted ![]() and im sorry i cant explain that module bussiness cuz i dont realy get it either at the moment.... ill work on it after supper (doing wahat that person said) and if i understand it more i will tell u more info... |
Author: | Delos [ Sun Mar 28, 2004 6:16 pm ] |
Post subject: | |
Hey short1, don't worry. I looked around, couldn't find one, so I made a tutorial for modules: http://www.compsci.ca/v2/viewtopic.php?t=4303 Hopefully that will ease you into their use. |
Author: | sport [ Sun Mar 28, 2004 9:09 pm ] |
Post subject: | |
When I started posting there was nothing I guess Delos posted while I was looking through the help and by the time I was finished Delos already posted. |
Author: | recneps [ Mon Mar 29, 2004 3:51 pm ] | ||
Post subject: | |||
or just do it the way i did for my school FP:
that way it can open several windows to view each screensaver, then closes the window when it finishes, and you can still view more without restarting prog. ![]() |
Author: | the_short1 [ Tue Mar 30, 2004 8:14 am ] |
Post subject: | |
u forgot something spencer.... %% boolean to exit program if true var exitprogram : boolean := false % proc to handle the exit button proc endprogram exitprogram := true end endprogram % The exit BUTTON var exitbtn := GUI.CreateButton (300,300,0,"Exit",endprogram) % Main loop so the program acually uses the buttons loop if GUI.ProcessEvent then %% BEST WAY TO DO THIS! end if exit when exitprogram = true end loop the turing reference suggests u do loop exit when GUI.ProcessEvent end loop but... say u have a game and if a button has not been pressed it WONT exit that loop and ur program gets stuck... loop game loop %%% would get stuck if u dont press a button.. exit when GUI.ProcessEvent end loop end loop hope that helpe... |