is there any way to make simba randomise what numbers or letters it types?
is there any way to make simba randomise what numbers or letters it types?
Could you elaborate on what you are specifically trying to do? Else, this is a pretty literal example of what you're asking.
Simba Code:program randomTyper;
const
MSG_LENGTH = 10;
POSSIBLE_CHARS = '1234567890abcdefghijklmnopqrstuvwxyz';
var
i: integer;
randomChar: char;
begin
for i := 0 to (MSG_LENGTH - 1) do
begin
randomChar := POSSIBLE_CHARS[random(0, length(POSSIBLE_CHARS) - 1)];
writeln(randomChar);
sendKeys(randomChar, 60 + random(60), 60 + random(60));
end;
end.
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
just like that what i was wanting to do, thanks
Simba Code:program randomTyper;
const
MSG_LENGTH = 10;
POSSIBLE_CHARS = '1234567890abcdefghijklmnopqrstuvwxyz';
var
i: integer;
randomChar: char;
Procedure random;
begin
for i := 0 to (MSG_LENGTH - 1) do
begin
randomChar := POSSIBLE_CHARS[random(0, length(POSSIBLE_CHARS) - 1)];
writeln(randomChar);
sendKeys(randomChar, 60 + random(60), 60 + random(60));
// after it types the random sentence, do something here...
end;
end;
begin
repeat
random;
until(false);
end.
Random() is already defined, so you should probably use a better name...
Also bad practice to keep 'i' as a global variable.
@Clarity, your example will not behave as expected, since POSSIBLE_CHARS is treated as a string, i.e. indexed from 1, not 0.
@OP, here is an alternative answer:
Simba Code:program RandomTyper;
procedure TypeRandomMessage(const MessageLength: UInt32);
const
CHARS: String = '0123456789abcdefghijklmnopqrstuvwxyz';
var
i: UInt32;
S: String;
begin
SetLength(S, MessageLength);
for i := 1 to MessageLength do
S[i] := CHARS[Random(1, Length(CHARS))];
SendKeys(S, Random(70, 100), Random(60, 90));
end;
begin
ClearDebug();
TypeRandomMessage(14);
end.
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
There are currently 1 users browsing this thread. (0 members and 1 guests)