Jump to content

Recommended Posts

Posted

Oh and you're test with messagesboxes fails because when you come to the last element the array have been shuffled again.

You need to have the if condition I wrote at the end of the while loop.

Broken link? PM me and I'll send you the file!

Posted

I've tried:

Dim $strings[5]=["String 1","String 2","String 3","String 4","String 5"]
$strings=_RandomizeArray($strings)

Local $count=0
While 1
    Sleep(100)
    Send($strings[$count])
    $count+=1
    If $count=Ubound($strings)-1 Then
        $strings=_RandomizeArray($strings)
        $count=0
    EndIf
WEnd


Func _RandomizeArray($array)
    Local $out[Ubound($array)]
    For $element In $array
        Do
            $i=Random(0,Ubound($out)-1,1)
        Until $out[$i]=""
        $out[$i]=$element
    Next
    Return $out
EndFuncoÝ÷ ØpjÌ(®H§»­×bv}ý¶k n^u©e¶¹v'ßz·§¶Ëkx,jwh~׫¶­²Ö«¶·©y«b7ö÷«zZqçmæ¢÷¡×°Ør¢êåjË_ºw-ÛºÒ!iÖ§zºè®Æ²x*ºR¹»®*mºÇÂ+aÀ®¶²½ªâi¹^ªê-iº.¶Ø^Ó~¢éí"¶¬¦ºé¯z¼­ê®z{eÊV­zÆ©eË^ë"
bÅélyªÜ©Ý¶§¬zj/y«mçèºw¢Ý±»­Ûzg¶©®åzl²Ê%½çn²)àjrÆ«­¬´ß«Ú®ËZµéÐn¶«z+]¡ë'ßÛZºÚ"µÍ[H    ÌÍÜÝ[ÜÖÍWOVÉ][ÝÔÝ[ÈI][ÝË  ][ÝÔÝ[È][ÝË   ][ÝÔÝ[ÈÉ][ÝË ][ÝÔÝ[È
    ][ÝË  ][ÝÔÝ[È
I][Ý×BÌÍÜÝ[ÜÏWÔ[ÛZ^P^J    ÌÍÜÝ[ÜËÊBØØ[   ÌÍØÛÝ[LÚ[HBÛY
L
B   ÌÍØÛÝ[
ÏLBY   ÌÍØÛÝ[UXÝ[
    ÌÍÜÝ[ÜÊKLH[   ÌÍÜÝ[ÜÏWÔ[ÛZ^P^J    ÌÍÜÝ[ÜÊB  ÌÍØÛÝ[L[YRYØ^J    ÌÍØÛÝ[
H[ÙØÞ
    ][ÝÉ][ÝË    ÌÍÜÝ[ÜÖÉÌÍØÛÝ[JBQ[QÑ[[ÈÔ[ÛZ^P^JTY   ÌÍØ^K    ÌÍÛ][LÊBØØ[   ÌÍÜÚ^OUXÝ[
    ÌÍØ^JBÜ ÌÍØÜLHÈ    ÌÍÛ][Ü  ÌÍÚOLÈ  ÌÍÜÚ^KLB    ÌÍÜ[T[ÛJ    ÌÍÜÚ^KLKJB  ÌÍÝ[IÌÍØ^VÉÌÍÚWB  ÌÍØ^VÉÌÍÚWOIÌÍØ^VÉÌÍÜ[B   ÌÍØ^VÉÌÍÜ[OIÌÍÝ[^^[[

I run the script, it doesn't exit, but nothing happens (because he thinks $count is not an array).

Do you know how can I fix this?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...