3 posts
                
             
            
                Posted 03 September 2013 - 02:32 AM
                http://pastebin.com/RVj6mAsvI need help with my Controlprogram. If I touch the monitor it doesen't change. Normaly the screenoutput must be switch into "Pause" or  "An".
Do you have a idea?
 
                
             
         
        
        
            
            
                
                    
                
                8543 posts
                
             
            
                Posted 03 September 2013 - 01:18 PM
                Split into new topic.
When you get a monitor_touch event, why do you immediately start waiting for a second monitor_touch event? You should remove the os.pullEvent("monitor_touch") so that you can actually use the first one. Assign your local variables (if necessary) from the event table containing the original monitor_touch event. Better yet, restructure your function so you can simply pass the whole event in rather than assigning those variables.
                
             
         
        
        
            
            
                
                    
                
                3 posts
                
             
            
                Posted 03 September 2013 - 01:36 PM
                My Program:
1 Input via BundledCable (for Emitting level of items (Applied Energistics))
1 Output to set a redstonesignal on or off for the factory
1 Monitor (Shows what Status is (on, off or paused[if Input false but Monitorinput says true via touch]))
My program get the input and i can touch it to activate the factory, but then the monitor don't update his infos and then he give no new output
I think he freezed in the os.pullEvent so i tried a timeout to update the infos via function.
PS Sorry if my english is not the best.
                
             
         
        
        
            
            
                
                    
                
                8543 posts
                
             
            
                Posted 03 September 2013 - 01:53 PM
                You have two os.pullEvent calls. Get rid of the e,side,x,y = os.pullEvent(). It is screwing things up. Use the event table that already has the monitor_touch event in it instead.
                
             
         
        
        
            
            
                
                    
                
                3 posts
                
             
            
                Posted 04 September 2013 - 01:05 PM
                I try to make a comment in line 42 but i can't do any touchinput. Can you write or link me how i can make a timeoutEvent to update the display and do touchinputs?
Edit: Problem solved I have a new code. I used a If Event term to solve this problem. No timeout.
thanks for tips