1. Problem with onScroll
- Posted by Andy Briggs <briggsan at HOTMAIL.COM> Jan 02, 2000
- 414 views
Hi, i'm totally new to this language and I am trying to make a GUI program that prints the value of the position of the slider under the slider itself. The program works except that the value that is printing to the screen seems to somehow be accumulating itself and every time it prints the value of the position of the slider, it prints all of its previous values first. It's a very strange phenomena, moving the pointer not only causes itself to updata to it's new position, but the onScroll procedure is being rum many times with previous values of of the scroller's position. I would really appreciate any help I can get. Thanks... Andy
2. Re: Problem with onScroll
- Posted by Brian Broker <bkb at CNW.COM> Jan 02, 2000
- 373 views
- Last edited Jan 03, 2000
On Sun, 2 Jan 2000 17:57:58 -0500, Andy Briggs wrote: >Hi, i'm totally new to this language and I am trying to make a GUI program >that prints the value of the position of the slider under the slider >itself. The program works except that the value that is printing to the >screen seems to somehow be accumulating itself and every time it prints >the value of the position of the slider, it prints all of its previous >values first. It's a very strange phenomena, moving the pointer not only >causes itself to updata to it's new position, but the onScroll procedure >is being rum many times with previous values of of the scroller's >position. I would really appreciate any help I can get. Thanks... Since you haven't provided any code for us to ponder, I thought I'd share a little example using scroll bars that I wrote when I was learning Euphoria and Win32Lib. There are three scroll bars representing values for Red, Green, and Blue. Values are shown above the bars and the color is updated for each onScroll event. Hopefully this example will help you figure out your problem. -- Brian -- RGBview.exw -- view palette RGB values include win32lib.ew without warning constant Version = "0.1" -- These integers hold the RGB color components integer red, green, blue red = 128 green = 128 blue = 128 constant BGcolor = getSysColor( COLOR_BTNFACE ), RGBWin = create( Window, "RGBview", 0, Default, Default, 475, 200, 0 ), About = create( DefPushButton, "About", RGBWin, 360, 10, 80, 30, 0 ), -- RGB value display buffers RedVal = create( Pixmap, "", 0, 0, 0, 85, 15, 0 ), GreenVal = create( Pixmap, "", 0, 0, 0, 85, 15, 0 ), BlueVal = create( Pixmap, "", 0, 0, 0, 85, 15, 0 ), -- create scroll controls RedScroll = create( HScroll, "", RGBWin, 10, 50, 305, 16, 0 ), GreenScroll = create( HScroll, "", RGBWin, 10, 100, 305, 16, 0 ), BlueScroll = create( HScroll, "", RGBWin, 10, 150, 305, 16, 0 ) -------------------------------------------------------------------------- -- Misc. procedures -- -------------------------------------------------------------------------- procedure draw_Border( integer x1, integer y1, integer x2, integer y2 ) -- draw a windows-like border -- integer c setPenColor( RGBWin, Black ) drawLine( RGBWin, (x1-1), (y1-1), (x2+1), (y1-1) ) drawLine( RGBWin, (x1-1), (y1-1), (x1-1), (y2+1) ) c = rgb( 128, 128, 128 ) setPenColor( RGBWin, c ) drawLine( RGBWin, (x1-2), (y1-2), (x2+2), (y1-2) ) drawLine( RGBWin, (x1-2), (y1-2), (x1-2), (y2+2) ) c = rgb( 224, 224, 224 ) setPenColor( RGBWin, c ) drawLine( RGBWin, x2, y2, (x1-1), y2 ) drawLine( RGBWin, x2, y2, x2, (y1-1) ) setPenColor( RGBWin, BrightWhite ) drawLine( RGBWin, (x2+1), (y2+1), (x1-2), (y2+1) ) drawLine( RGBWin, (x2+1), (y2+1), (x2+1), (y1-2) ) end procedure ------------------------------------------------------------ procedure update_Color() -- updates color view window -- integer color color = rgb( red, green, blue ) setPenColor( RGBWin, color) drawRectangle( RGBWin, 1, 350, 58, 450, 158 ) end procedure ------------------------------------------------------------ procedure update_Buffer( integer id, integer color, sequence string ) sequence extent -- clear buffer setPenColor( id, BGcolor ) extent = getExtent( id ) drawRectangle( id, 1, 0, 0, extent[1], extent[2] ) -- print new value in buffer setTextColor( id, color ) wPuts( id, string ) end procedure -------------------------------------------------------------------------- -- procedures for handling scroll bars -- -------------------------------------------------------------------------- procedure onScroll_Red( integer value ) -- handle Red scroll bar -- red = value - 1 update_Color() update_Buffer( RedVal, BrightRed, sprintf( "%3d = #%02x", {red, red} ) ) copyBlt( RGBWin, 120, 30, RedVal ) end procedure onScroll[RedScroll] = routine_id( "onScroll_Red" ) ------------------------------------------------------------ procedure onScroll_Green( integer value ) -- handle Green scroll bar -- green = value - 1 update_Color() update_Buffer( GreenVal, Green, sprintf( "%3d = #%02x", {green, green} ) ) copyBlt( RGBWin, 120, 80, GreenVal ) end procedure onScroll[GreenScroll] = routine_id( "onScroll_Green" ) ------------------------------------------------------------ procedure onScroll_Blue( integer value ) -- handle Blue scroll bar -- blue = value - 1 update_Color() update_Buffer( BlueVal, BrightBlue, sprintf( "%3d = #%02x", {blue, blue} ) ) copyBlt( RGBWin, 120, 130, BlueVal ) end procedure onScroll[BlueScroll] = routine_id( "onScroll_Blue" ) ------------------------------------------------------------ procedure aboutButton() integer result result = message_box( "RGBview, Version " & Version & "\n\n" & "by Brian K. Broker\n\n" & "Developed using David Cuny's Win32Lib", "About...", MB_ICONINFORMATION+MB_APPLMODAL ) end procedure onClick[About] = routine_id( "aboutButton" ) -------------------------------------------------------------------------- procedure onPaint_RGBWin( integer x1, integer y1, integer x2, integer y2 ) -- handle window refresh -- draw_Border( 350, 58, 450, 158 ) update_Color() setTextColor( RGBWin, Black ) setFont( RGBWin, "Courier", 14, Bold+Underline ) setPosition( RGBWin, 120, 5 ) wPrintf( RGBWin, "DEC", {} ) setPosition( RGBWin, 173, 5 ) wPrintf( RGBWin, "HEX", {} ) setFont( RGBWin, "Arial", 14, Bold ) setTextColor( RGBWin, BrightRed ) setPosition( RGBWin, 10, 25 ) wPrintf( RGBWin, "Red:", {} ) copyBlt( RGBWin, 120, 30, RedVal ) setTextColor( RGBWin, Green ) setPosition( RGBWin, 10, 75 ) wPrintf( RGBWin, "Green:", {} ) copyBlt( RGBWin, 120, 80, GreenVal ) setTextColor( RGBWin, BrightBlue ) setPosition( RGBWin, 10, 125 ) wPrintf( RGBWin, "Blue:", {} ) copyBlt( RGBWin, 120, 130, BlueVal ) end procedure onPaint[RGBWin] = routine_id( "onPaint_RGBWin" ) -------------------------------------------------------------------------- -- set up Window and controls procedure onOpen_RGBWin() -- change the window background color setWindowBackColor( RGBWin, BGcolor ) setFont( RedVal, "Courier", 12, 0 ) setFont( GreenVal, "Courier", 12, 0 ) setFont( BlueVal, "Courier", 12, 0 ) setTextColor( RedVal, BrightRed ) setTextColor( GreenVal, Green ) setTextColor( BlueVal, BrightBlue ) -- change the window color setWindowBackColor( RGBWin, BGcolor ) -- set range of scroll bar setScrollRange( RedScroll, 1, 256 ) setScrollRange( GreenScroll, 1, 256 ) setScrollRange( BlueScroll, 1, 256 ) -- set scroll line/page up/down increments setScrollChange( RedScroll, 1, 16 ) setScrollChange( GreenScroll, 1, 16 ) setScrollChange( BlueScroll, 1, 16 ) -- scroll to default colors setScrollPos( RedScroll, red ) setScrollPos( GreenScroll, green ) setScrollPos( BlueScroll, blue ) end procedure onOpen[RGBWin] = routine_id( "onOpen_RGBWin" ) ------------------------- --------- start --------- WinMain( RGBWin, Normal ) -------------------------
3. Re: Problem with onScroll
- Posted by Andy Briggs <briggsan at HOTMAIL.COM> Jan 03, 2000
- 377 views
- Last edited Jan 04, 2000
Thank you very much Brian, after seeing your program I immediately found the problem. I was re-Creating the object that displays the value of the pointer each time the onScroll event occurred. It works fine now. My goal is to be able to place the value of the scroll position on the parallel ports data lines. Do you or anyone else who may be reading this know of a simple way to access the parallel port in Euphoria. I must tell you all that after using Euphoria for only about a month now, I have fallen absolutely head over heals in love with it. I have written a few rather advanced graphics games that would have been far beyond my ability in all the other languages that I have ever used ("advanced" is a relative term; I have very little experience in programming). Two thumbs up so far!!! This is my first attempt at a windows program though. Here is the code so far. I have had little time to insert any comments yet, so it'll probably be a little hard to follow. I would appreciate any comments or suggestions on how to place the value of the scroll on the paralle ports data bus. Here it is: --This is My Cool Little 8-Bit Parallel Port Program So Far... --by Andy Briggs --Saint John --NewBrunswick --Canada include win32lib.ew global integer val,button1,button2,button3,button4,button5,button6,button7,button8,slider,text1,decValue constant AndyWin = create( Window, "Windows Parallel Port Program", 0, Default, Default, 400, 300, 0 ) val=0 button1 = create(4,"button1", AndyWin, 10,10 ,12,14, 0 ) procedure onClick_button1() --Add or subtract bit value from val depending on active state if isChecked(button1) then val=val+1 else val=val-1 end if setScrollPos( slider, val ) if val=0 then setScrollPos( slider, 1 ) end if end procedure onClick[button1] = routine_id("onClick_button1") button2 = create(4,"button2", AndyWin, 10,30 ,12,14, 0 ) procedure onClick_button2() --Add or subtract bit value from val depending on active state if isChecked(button2) then val=val+2 else val=val-2 end if setScrollPos( slider, val ) if val=0 then setScrollPos( slider, 1 ) end if end procedure onClick[button2] = routine_id("onClick_button2") button3 = create(4,"button3", AndyWin, 10,50 ,12,14, 0 ) procedure onClick_button3() --Add or subtract bit value from val depending on active state if isChecked(button3) then val=val+4 else val=val-4 end if setScrollPos( slider, val ) if val=0 then setScrollPos( slider, 1 ) end if end procedure onClick[button3] = routine_id("onClick_button3") button4 = create(4,"button4", AndyWin, 10,70 ,12,14, 0 ) procedure onClick_button4() --Add or subtract bit value from val depending on active state if isChecked(button4) then val=val+8 else val=val-8 end if setScrollPos( slider, val ) if val=0 then setScrollPos( slider, 1 ) end if end procedure onClick[button4] = routine_id("onClick_button4") button5 = create(4,"button5", AndyWin, 10,90 ,12,14, 0 ) procedure onClick_button5() --Add or subtract bit value from val depending on active state if isChecked(button5) then val=val+16 else val=val-16 end if setScrollPos( slider, val ) if val=0 then setScrollPos( slider, 1 ) end if end procedure onClick[button5] = routine_id("onClick_button5") button6 = create(4,"button6", AndyWin, 10,110 ,12,14, 0 ) procedure onClick_button6() --Add or subtract bit value from val depending on active state if isChecked(button6) then val=val+32 else val=val-32 end if setScrollPos( slider, val ) if val=0 then setScrollPos( slider, 1 ) end if end procedure onClick[button6] = routine_id("onClick_button6") button7 = create(4,"button7", AndyWin, 10,130 ,12,14, 0 ) procedure onClick_button7() --Add or subtract bit value from val depending on active state if isChecked(button7) then val=val+64 else val=val-64 end if setScrollPos( slider, val ) if val=0 then setScrollPos( slider, 1 ) end if end procedure onClick[button7] = routine_id("onClick_button7") button8 = create(4,"button8", AndyWin, 10,150 ,12,14, 0 ) procedure onClick_button8() --Add or subtract bit value from val depending on active state if isChecked(button8) then val=val+128 else val=val-128 end if setScrollPos( slider, val ) if val=0 then setScrollPos( slider, 1 ) end if end procedure onClick[button8] = routine_id("onClick_button8") decValue = create(16,"", AndyWin, 10,165 ,40,14, 0 ) slider = create(VScroll,"", AndyWin, 28,10 ,10,150, 0 ) setScrollRange( slider, 1, 255 ) procedure onScroll_slider(integer pos) integer result setText(decValue,sprint(pos)) result=pos+1 --Calculate new binary code if result-128>0 then result=result-128 setCheck(button8,1) else setCheck(button8,0) end if if result-64>0 then result=result-64 setCheck(button7,1) else setCheck(button7,0) end if if result-32>0 then result=result-32 setCheck(button6,1) else setCheck(button6,0) end if if result-16>0 then result=result-16 setCheck(button5,1) else setCheck(button5,0) end if if result-8>0 then result=result-8 setCheck(button4,1) else setCheck(button4,0) end if if result-4>0 then result=result-4 setCheck(button3,1) else setCheck(button3,0) end if if result-2>0 then result=result-2 setCheck(button2,1) else setCheck(button2,0) end if if result-1>0 then result=result-1 setCheck(button1,1) else setCheck(button1,0) end if val=pos end procedure onScroll[slider] = routine_id("onScroll_slider") WinMain( AndyWin, Normal )
4. Re: Problem with onScroll
- Posted by "E.Allen Soard" <esp.software at EXCITE.COM> Jan 03, 2000
- 361 views
The parallel ports can be programed entirely with pokes peeks. You could do a web search on "parallel port programming" (say that 10 times fast) to find out the addresses. I know I have a printout somewhere but my desk looks like a tornado went through it, how about that, a tornado in california Happy programming, E.Allen Soard On Mon, 3 Jan 2000 19:59:53 -0500, Euphoria Programming for MS-DOS wrote: > Thank you very much Brian, after seeing your program > I immediately found the problem. I was re-Creating the > object that displays the value of the pointer each time the > onScroll event occurred. It works fine now. My goal is > to be able to place the value of the scroll position on the > parallel ports data lines. Do you or anyone else who > may be reading this know of a simple way to access the > parallel port in Euphoria. > > I must tell you all that after using Euphoria for only about > a month now, I have fallen absolutely head over heals > in love with it. I have written a few rather advanced > graphics games that would have been far beyond my ability > in all the other languages that I have ever used ("advanced" > is a relative term; I have very little experience in programming). > Two thumbs up so far!!! > This is my first attempt at a windows program though. > Here is the code so far. I have had little time to > insert any comments yet, so it'll probably be a little hard to > follow. > I would appreciate any comments or suggestions on how to > place the value of the scroll on the paralle ports data bus. > > Here it is: > > --This is My Cool Little 8-Bit Parallel Port Program So Far... > --by Andy Briggs > > --Saint John > --NewBrunswick > --Canada > > include win32lib.ew > > global integer > constant AndyWin = create( Window, "Windows Parallel Port Program", 0, Default, Default, 400, 300, 0 ) > val=0 > > button1 = create(4,"button1", AndyWin, 10,10 ,12,14, 0 ) > procedure onClick_button1() > > --Add or subtract bit value from val depending on active state > if isChecked(button1) then > val=val+1 > else > val=val-1 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button1] = routine_id("onClick_button1") > > button2 = create(4,"button2", AndyWin, 10,30 ,12,14, 0 ) > procedure onClick_button2() > > --Add or subtract bit value from val depending on active state > if isChecked(button2) then > val=val+2 > else > val=val-2 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button2] = routine_id("onClick_button2") > > button3 = create(4,"button3", AndyWin, 10,50 ,12,14, 0 ) > procedure onClick_button3() > > --Add or subtract bit value from val depending on active state > if isChecked(button3) then > val=val+4 > else > val=val-4 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button3] = routine_id("onClick_button3") > > button4 = create(4,"button4", AndyWin, 10,70 ,12,14, 0 ) > procedure onClick_button4() > > --Add or subtract bit value from val depending on active state > if isChecked(button4) then > val=val+8 > else > val=val-8 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button4] = routine_id("onClick_button4") > > button5 = create(4,"button5", AndyWin, 10,90 ,12,14, 0 ) > procedure onClick_button5() > > --Add or subtract bit value from val depending on active state > if isChecked(button5) then > val=val+16 > else > val=val-16 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button5] = routine_id("onClick_button5") > > button6 = create(4,"button6", AndyWin, 10,110 ,12,14, 0 ) > procedure onClick_button6() > > --Add or subtract bit value from val depending on active state > if isChecked(button6) then > val=val+32 > else > val=val-32 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button6] = routine_id("onClick_button6") > > button7 = create(4,"button7", AndyWin, 10,130 ,12,14, 0 ) > procedure onClick_button7() > > --Add or subtract bit value from val depending on active state > if isChecked(button7) then > val=val+64 > else > val=val-64 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button7] = routine_id("onClick_button7") > > button8 = create(4,"button8", AndyWin, 10,150 ,12,14, 0 ) > procedure onClick_button8() > > --Add or subtract bit value from val depending on active state > if isChecked(button8) then > val=val+128 > else > val=val-128 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button8] = routine_id("onClick_button8") > > decValue = create(16,"", AndyWin, 10,165 ,40,14, 0 ) > slider = create(VScroll,"", AndyWin, 28,10 ,10,150, 0 ) > setScrollRange( slider, 1, 255 ) > procedure onScroll_slider(integer pos) > integer result > setText(decValue,sprint(pos)) > result=pos+1 > --Calculate new binary code > if result-128>0 then > result=result-128 > setCheck(button8,1) > else > setCheck(button8,0) > end if > if result-64>0 then > result=result-64 > setCheck(button7,1) > else > setCheck(button7,0) > end if > if result-32>0 then > result=result-32 > setCheck(button6,1) > else > setCheck(button6,0) > end if > if result-16>0 then > result=result-16 > setCheck(button5,1) > else > setCheck(button5,0) > end if > if result-8>0 then > result=result-8 > setCheck(button4,1) > else > setCheck(button4,0) > end if > if result-4>0 then > result=result-4 > setCheck(button3,1) > else > setCheck(button3,0) > end if > if result-2>0 then > result=result-2 > setCheck(button2,1) > else > setCheck(button2,0) > end if > if result-1>0 then > result=result-1 > setCheck(button1,1) > else > setCheck(button1,0) > end if > val=pos > end procedure > onScroll[slider] = routine_id("onScroll_slider") > > > WinMain( AndyWin, Normal ) _______________________________________________________ Visit Excite Shopping at http://shopping.excite.com The fastest way to find your Holiday gift this season
5. Re: Problem with onScroll
- Posted by "E.Allen Soard" <esp.software at EXCITE.COM> Jan 03, 2000
- 383 views
On Mon, 3 Jan 2000 19:59:53 -0500, Euphoria Programming for MS-DOS wrote: > Thank you very much Brian, after seeing your program > I immediately found the problem. I was re-Creating the > object that displays the value of the pointer each time the > onScroll event occurred. It works fine now. My goal is > to be able to place the value of the scroll position on the > parallel ports data lines. Do you or anyone else who > may be reading this know of a simple way to access the > parallel port in Euphoria. > > I must tell you all that after using Euphoria for only about > a month now, I have fallen absolutely head over heals > in love with it. I have written a few rather advanced > graphics games that would have been far beyond my ability > in all the other languages that I have ever used ("advanced" > is a relative term; I have very little experience in programming). > Two thumbs up so far!!! > This is my first attempt at a windows program though. > Here is the code so far. I have had little time to > insert any comments yet, so it'll probably be a little hard to > follow. > I would appreciate any comments or suggestions on how to > place the value of the scroll on the paralle ports data bus. > > Here it is: > > --This is My Cool Little 8-Bit Parallel Port Program So Far... > --by Andy Briggs > > --Saint John > --NewBrunswick > --Canada > > include win32lib.ew > > global integer > constant AndyWin = create( Window, "Windows Parallel Port Program", 0, Default, Default, 400, 300, 0 ) > val=0 > > button1 = create(4,"button1", AndyWin, 10,10 ,12,14, 0 ) > procedure onClick_button1() > > --Add or subtract bit value from val depending on active state > if isChecked(button1) then > val=val+1 > else > val=val-1 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button1] = routine_id("onClick_button1") > > button2 = create(4,"button2", AndyWin, 10,30 ,12,14, 0 ) > procedure onClick_button2() > > --Add or subtract bit value from val depending on active state > if isChecked(button2) then > val=val+2 > else > val=val-2 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button2] = routine_id("onClick_button2") > > button3 = create(4,"button3", AndyWin, 10,50 ,12,14, 0 ) > procedure onClick_button3() > > --Add or subtract bit value from val depending on active state > if isChecked(button3) then > val=val+4 > else > val=val-4 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button3] = routine_id("onClick_button3") > > button4 = create(4,"button4", AndyWin, 10,70 ,12,14, 0 ) > procedure onClick_button4() > > --Add or subtract bit value from val depending on active state > if isChecked(button4) then > val=val+8 > else > val=val-8 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button4] = routine_id("onClick_button4") > > button5 = create(4,"button5", AndyWin, 10,90 ,12,14, 0 ) > procedure onClick_button5() > > --Add or subtract bit value from val depending on active state > if isChecked(button5) then > val=val+16 > else > val=val-16 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button5] = routine_id("onClick_button5") > > button6 = create(4,"button6", AndyWin, 10,110 ,12,14, 0 ) > procedure onClick_button6() > > --Add or subtract bit value from val depending on active state > if isChecked(button6) then > val=val+32 > else > val=val-32 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button6] = routine_id("onClick_button6") > > button7 = create(4,"button7", AndyWin, 10,130 ,12,14, 0 ) > procedure onClick_button7() > > --Add or subtract bit value from val depending on active state > if isChecked(button7) then > val=val+64 > else > val=val-64 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button7] = routine_id("onClick_button7") > > button8 = create(4,"button8", AndyWin, 10,150 ,12,14, 0 ) > procedure onClick_button8() > > --Add or subtract bit value from val depending on active state > if isChecked(button8) then > val=val+128 > else > val=val-128 > end if > setScrollPos( slider, val ) > if val=0 then setScrollPos( slider, 1 ) end if > end procedure > onClick[button8] = routine_id("onClick_button8") > > decValue = create(16,"", AndyWin, 10,165 ,40,14, 0 ) > slider = create(VScroll,"", AndyWin, 28,10 ,10,150, 0 ) > setScrollRange( slider, 1, 255 ) > procedure onScroll_slider(integer pos) > integer result > setText(decValue,sprint(pos)) > result=pos+1 > --Calculate new binary code > if result-128>0 then > result=result-128 > setCheck(button8,1) > else > setCheck(button8,0) > end if > if result-64>0 then > result=result-64 > setCheck(button7,1) > else > setCheck(button7,0) > end if > if result-32>0 then > result=result-32 > setCheck(button6,1) > else > setCheck(button6,0) > end if > if result-16>0 then > result=result-16 > setCheck(button5,1) > else > setCheck(button5,0) > end if > if result-8>0 then > result=result-8 > setCheck(button4,1) > else > setCheck(button4,0) > end if > if result-4>0 then > result=result-4 > setCheck(button3,1) > else > setCheck(button3,0) > end if > if result-2>0 then > result=result-2 > setCheck(button2,1) > else > setCheck(button2,0) > end if > if result-1>0 then > result=result-1 > setCheck(button1,1) > else > setCheck(button1,0) > end if > val=pos > end procedure > onScroll[slider] = routine_id("onScroll_slider") > > > WinMain( AndyWin, Normal ) _______________________________________________________ Visit Excite Shopping at http://shopping.excite.com The fastest way to find your Holiday gift this season
6. Re: Problem with onScroll
- Posted by Brian Broker <bkb at CNW.COM> Jan 03, 2000
- 392 views
- Last edited Jan 04, 2000
On Mon, 3 Jan 2000 19:59:53 -0500, Andy Briggs asked: >Do you or anyone else who may be reading this know of a simple way to >access the parallel port in Euphoria. I have not personally done anything with the parallel port but if you search for 'parallel port' in the archives you will find a package by Monty King that includes a DLL for accessing ports in Windows 9x. This should also teach you how to work with Windows DLLs... Also, you might be able to access the parallel port by using Euphoria's 'open' command. Refer to Eu's reference documentation to learn more. -- Brian
7. Re: Problem with onScroll
- Posted by Kat <KSMiTH at PELL.NET> Jan 03, 2000
- 369 views
- Last edited Jan 04, 2000
----- Original Message ----- From: Brian Broker <bkb at CNW.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Monday, January 03, 2000 8:17 PM Subject: Re: Problem with onScroll > On Mon, 3 Jan 2000 19:59:53 -0500, Andy Briggs asked: > > >Do you or anyone else who may be reading this know of a simple way to > >access the parallel port in Euphoria. > > I have not personally done anything with the parallel port but if you > search for 'parallel port' in the archives you will find a package by Monty > King that includes a DLL for accessing ports in Windows 9x. This should > also teach you how to work with Windows DLLs... > > Also, you might be able to access the parallel port by using > Euphoria's 'open' command. Refer to Eu's reference documentation to learn > more. The only parallel port referenced in Eu docs is: "PRN" - the printer on the parallel port and i didn't want to print something, i wanted a custom interface to a custom i/o card. The parallel port is also configureable as to what pins are input, output or tristated, as well as switching on/off the cpu interrupt, etc.. So how does Eu do that stuff? Kat
8. Re: Problem with onScroll
- Posted by Rolf Schroeder <schroeder at DESY.DE> Jan 04, 2000
- 381 views
Kat wrote: > The only parallel port referenced in Eu docs is: > "PRN" - the printer on the parallel port > and i didn't want to print something, i wanted a custom interface to a > custom i/o card. The parallel port is also configureable as to what pins are > input, output or tristated, as well as switching on/off the cpu interrupt, > etc.. So how does Eu do that stuff? > > Kat Hi Kat, look at this: http://members.aol.com/easyio/home.html Hope this helps. Rolf
9. Re: Problem with onScroll
- Posted by Kat <KSMiTH at PELL.NET> Jan 04, 2000
- 386 views
----- Original Message ----- From: Rolf Schroeder <schroeder at DESY.DE> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Tuesday, January 04, 2000 8:45 AM Subject: Re: Problem with onScroll > Kat wrote: > > > The only parallel port referenced in Eu docs is: > > "PRN" - the printer on the parallel port > > and i didn't want to print something, i wanted a custom interface to a > > custom i/o card. The parallel port is also configureable as to what pins are > > input, output or tristated, as well as switching on/off the cpu interrupt, > > etc.. So how does Eu do that stuff? > > > > Kat > > Hi Kat, > look at this: > > http://members.aol.com/easyio/home.html You are telling me that i must enable ActiveX on my puter, pay $70, and not be able to change status of the lines, and not write it in Eu (but do stop everything else i am doing and learn to call routines in DLLs?)? ouch! Kat
10. Re: Problem with onScroll
- Posted by Rolf Schroeder <schroeder at DESY.DE> Jan 05, 2000
- 425 views
Hi Kat, inside the software is a dll containing functions like putb, getb, putw, getw - or similar - which have to be called via the EU-functions: open_dll(), define_c_function(), and c_func(). Look at these functions in the EU-lib-manual. There are other pages in the web offering free ISA-port access under WinNT. Search for "port I/O NT ...". Have a nice day, Rolf Kat wrote: > ----- Original Message ----- > From: Rolf Schroeder <schroeder at DESY.DE> > To: <EUPHORIA at LISTSERV.MUOHIO.EDU> > Sent: Tuesday, January 04, 2000 8:45 AM > Subject: Re: Problem with onScroll > > > Kat wrote: > > > > > The only parallel port referenced in Eu docs is: > > > "PRN" - the printer on the parallel port > > > and i didn't want to print something, i wanted a custom interface to a > > > custom i/o card. The parallel port is also configureable as to what pins > are > > > input, output or tristated, as well as switching on/off the cpu > interrupt, > > > etc.. So how does Eu do that stuff? > > > > > > Kat > > > > Hi Kat, > > look at this: > > > > http://members.aol.com/easyio/home.html > > You are telling me that i must enable ActiveX on my puter, pay $70, and not > be able to change status of the lines, and not write it in Eu (but do stop > everything else i am doing and learn to call routines in DLLs?)? > > ouch! > > Kat