mirror of
				https://github.com/bspeice/libcvautomation
				synced 2025-11-03 18:00:43 -05:00 
			
		
		
		
	Add the mousedown and mouseup functions to the BASH wrapper.
This commit is contained in:
		@ -63,6 +63,40 @@ err ()
 | 
				
			|||||||
#  Begin testing macros
 | 
					#  Begin testing macros
 | 
				
			||||||
#-------------------------------------------------------------------------------
 | 
					#-------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#---  FUNCTION  ----------------------------------------------------------------
 | 
				
			||||||
 | 
					#          NAME:  mousedown
 | 
				
			||||||
 | 
					#   DESCRIPTION:  Push the mouse button down, and leave it there.
 | 
				
			||||||
 | 
					#    PARAMETERS:  
 | 
				
			||||||
 | 
					#       RETURNS:  
 | 
				
			||||||
 | 
					#-------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mousedown ()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if [ -n "$1" ]; then
 | 
				
			||||||
 | 
							eval $CVAINPUT -s 'mousedown $1' >> $OUTFILE >> $OUTFILE
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							eval $CVAINPUT -s 'mousedown 1' >> $OUTFILE >> $OUTFILE
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
						return $?
 | 
				
			||||||
 | 
					}	# ----------  end of function mousedown  ----------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#---  FUNCTION  ----------------------------------------------------------------
 | 
				
			||||||
 | 
					#          NAME:  mouseup
 | 
				
			||||||
 | 
					#   DESCRIPTION:  Release a mouse button
 | 
				
			||||||
 | 
					#    PARAMETERS:  
 | 
				
			||||||
 | 
					#       RETURNS:  
 | 
				
			||||||
 | 
					#-------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mouseup ()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if [ -n "$1" ]; then
 | 
				
			||||||
 | 
							eval $CVAINPUT -s 'mouseup $1' >> $OUTFILE >> $OUTFILE
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							eval $CVAINPUT -s 'mouseup 1' >> $OUTFILE >> $OUTFILE
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
						return $?
 | 
				
			||||||
 | 
					}	# ----------  end of function mouseup  ----------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#---  FUNCTION  ----------------------------------------------------------------
 | 
					#---  FUNCTION  ----------------------------------------------------------------
 | 
				
			||||||
#          NAME:  click
 | 
					#          NAME:  click
 | 
				
			||||||
#   DESCRIPTION:  Click the mouse where it is currently located
 | 
					#   DESCRIPTION:  Click the mouse where it is currently located
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user