Problem with turing
| Author |
Message |
Dan

|
Posted: Sat Dec 07, 2002 1:44 pm Post subject: hummm |
|
|
| i tested out your code by taking the code you have there andadding vars and it wroked fine. so i think the problem may be in a difrent part of your code. i whode sugeste look trow the code for the times when you use the var itemuseamazon and make shure you do not have a loop or somting that sets it back to 0 or somting. |
| Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
 |
Sponsor Sponsor

|
|
 |
krishon
|
Posted: Sat Dec 07, 2002 2:01 pm Post subject: (No subject) |
|
|
| could i just send u the code, cuz i looked ova it several times and i still cannot fix it. |
|
|
|
|
 |
krishon
|
Posted: Sat Dec 07, 2002 5:43 pm Post subject: (No subject) |
|
|
| tony or dan, how can i calibrate the slider thing made from the GUI. I found the code for the slider but i dun't know how control the volume. |
|
|
|
|
 |
Tony

|
Posted: Sat Dec 07, 2002 6:16 pm Post subject: (No subject) |
|
|
| code: |
import GUI in "%/oot/lib/GUI"
var slider : int
procedure SliderMoved(value:int)
locate(2,1)
put "Horizontal Slider:",value
end SliderMoved
slider:= GUI.CreateHorizontalSlider(10,10,250,50,150,50,SliderMoved)
loop
exit when GUI.ProcessEvent
end loop
|
Here's the working code
GUI.CreateHorizontalSlider(x,y,length,min,max,start, PROCEDURE)
the value of slider is passed on to the procedure SliderMoved and can be stored and/or displayed in there. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
krishon
|
Posted: Sat Dec 07, 2002 7:05 pm Post subject: (No subject) |
|
|
| i didn't phrase my question right, i'm sorry. I meant to say i already drew the slider, but i do not know how to use the slider to control the actual volume of the computer. My friend mentioned about calibrating the slider to the volume of the computer, but he does not know how to do it. |
|
|
|
|
 |
krishon
|
Posted: Sat Dec 07, 2002 9:40 pm Post subject: (No subject) |
|
|
could someone reply today or 2moro, cuz this is due on wednesday, thx  |
|
|
|
|
 |
Tony

|
Posted: Sat Dec 07, 2002 10:07 pm Post subject: (No subject) |
|
|
ya, well basically you obtain the value of the slider and the set volume level to that value.
The problem is, you can't do that in turing, as you need access to sound-card hardware and turing can't do that.
You can include some dlls for that in C++ and perhard reference them in VB as well if you need to do that. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
|
|