ForMyFutures
2013-02-01 03:12:01
program GEBuyOption;
{$DEFINE SMART}
{$i srl/srl.Simba}
var
BuyOption, X, Y: Integer;
fonts, txt: TStringArray;
ItemChoice, BasicSearch: String;
begin
SetupSRL;
fonts :=['BigChars', 'SmallChars', 'FriendChars', 'CharsTrade', 'SmallCharsNS' ];
BuyOption := DTMFromString('mlwAAAHicY2dgYGAFYh4g5gRiNiBmZIAAdigfJM4CFWOGinEDcW0HM0OUvjDDpqNMDBuPMzEUx+gwJBoJMDgr8TLgA4x4MBQAAD28BwU=');
InputQuery('This is what your script will type', 'You do not have to type the full item name', BasicSearch);
InputQuery('This is what your script will look for', 'A string of characters that are not within the search item', ItemChoice);
txt :=[ItemChoice];
If FindDTM(BuyOption, X, Y , MSX1, MSY1, MSX2, MSY2) Then
begin
MMouse(X, Y, 10, 30);
ClickMouse2(Mouse_Left);
Wait(RandomRange(300, 700));
SendKeys(BasicSearch, RandomRange(250, 350), RandomRange(100, 150));
Wait(RandomRange(2000, 2100))
if FindTextEx(X, Y, txt, fonts, 66, 330, 492, 448) Then
begin
Wait(RandomRange(650, 1000));
WriteLn('We found the Item');
MMouse(X, Y, 5, 5);
Wait(RandomRange(300, 800));
WriteLn('Clicking item');
ClickMouse2(True);
end;
end;
FreeDTM(BuyOption);
end. [Updated]Its just a simple script that will click buy, type in the item, and click the name in the chat. Any suggestions would be lovely. :)