Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Utility Scripts
#1
Here is a File loader with spinner and progress bar that can be integrated in other scripts
Code:
var count, currentIndex, percent, a0, a1,a2,a3,dots, wait

varexists ext1
if varexists
   !wait=ext1
else
   !wait=10
endif

!percent=0
!count=0
!a0=|
!a1=/
!a2=~
!a3=\\
!dots=

while percent<100 do

   !currentIndex=count mod 4
   ? File Loading %dots%%a%currentIndex%% [%percent%%]
   wait 30

   !count=count+1
   rndint %wait%
   if rndint < 5
       !percent=percent+1
       if percent mod 5=0
           !dots=%dots%.
       endif
   endif
done
? File Loading %dots%. [%percent%%]

free count, currentIndex, percent, a0,a1,a2,a3,dots, wait, varexists, rndint
#2
A visualization of the random generator
safe as file random

compile thee script
Code:
compile random
 
and run with arguments [range of numbers] [number of random generations]

Code:
random 20 1000
 
Code:
var i,j,len,c,out

varexists ext1
!len=10
if varexists
    !len=ext1
endif

varexists ext2
!c=100
if varexists
    !c=ext2
endif

!i=0
while i<len do
    var rand_%i%
    !rand_%i%=
    !i=i+1
done

!j=0
while j<c do
//      clear
    rndint %len%
    !rand_%rndint%=%rand_%rndint%%#
    !i=0
    !out=####################\n
    while i<len do
        !out=%out%%i%:\t%rand_%i%%\n
        !i=i+1
    done
    !out=%out%####################
    ? %out%
    wait 10
    !j=j+1
done

!c=0
!i=0
while i<len do
    strlen rand_%i%
    !c=c+strlen
    free rand_%i%
    !i=i+1
done
say 0 sum: %c%

free i,j,len,c,out,strlen
#3
It is remarkable, rather the helpful information
#4
I apologise, but, in my opinion, you are mistaken. I can defend the position. Write to me in PM.
#5
Ist einverstanden, die sehr lustige Meinung


Forum Jump:


Users browsing this thread: 1 Guest(s)