Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 74 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. int mouse_clickTime
  2.  
  3. init {
  4.     // Init the Global
  5.     mouse_clickTime == 0
  6. }
  7.  
  8. main {
  9.    
  10.     if event_release(XB1_LT) {
  11.         //On Button Up Set Timestamp
  12.         mouse_clickTime = get_rtime()      
  13.     }
  14.    
  15.    
  16.     //Check if we have pressed MB2 within 200ms
  17.     if(mouse_clickTime >= 201 && get_val(XB1_RT)) {
  18.         //Button Pressed and Time Passed is over 200ms
  19.        
  20.         //Clear Global as to not Double Click again
  21.         mouse_clickTime = 0
  22.        
  23.         //Do Double Click
  24.         ...
  25.        
  26.     } else if(get_val(XB1_RT) && get_ptime(XB1_RT) <= 200) {       
  27.         //Button Pressed, but time since last click is not 200ms
  28.         mouse_clickTime = 0
  29.         //Do Hold Event
  30.         ...
  31.        
  32.     } else if(get_val(XB1_RT) {
  33.         //Do Single Click
  34.     }
  35.    
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top