04-23-2018, 06:29 PM
I do not know if my method is valid / correct, this is my approach.
If someone else can provide better example please do so, I also could learn from it.
Macro Macro3
If someone else can provide better example please do so, I also could learn from it.
Macro Macro3
;;....................................................
;;. METHOD 1: 50/50 chance of either LEFT or RIGHT
;;....................................................
out
_s.RandomString(1 1 "0-1")
if(_s="1")
,out "Key left (method 1)"
,;key L ;; press key left
,;key (VK_LEFT) ;; other method of pressing key left (choose this or the above one)
if(_s="0")
,out "Key right (method 1)"
,;key R ;; press key right
,;key (VK_RIGHT) ;; other method of pressing key right (choose this or the above one)
;;....................................................
;;. METHOD 2: 60, gives 60 percent chance to LEFT
;;. (If you want to give 60 percent chance to RIGHT then switch the 2 lines 24/25 and 27/28
;;....................................................
int percent=60
_s.RandomString(1 2 "0-9") ;; generate a random string between 0 and 9 BUT it is 2 lenght so it is in essence between 0-99
int i=val(_s)+1 ;; convert to integer and because we generated between 0-99, we add +1 then result will be 1-100
if(i<=60)
,out "Key left (method 2, 60 percent given to LEFT)"
,;key L ;; press key left
,;key (VK_LEFT) ;; other method of pressing key left (choose this or the above one)
else
,out "Key right (method 2, 60 percent given to LEFT)"
,;key R ;; press key right
,;key (VK_RIGHT) ;; other method of pressing key right (choose this or the above one)