What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Simulate button clicks on specific GUI elements?

Okay! After some in game hunting (urghhh, lua) I've figured out that it's hopefully related to the following class:

Code:
public class ConfirmActionButton
{
    public ConfirmActionButton(string buttonRetrievalLua);

    public IntPtr ActionData { get; }
    public bool IsValid { get; }

    public void Click();

    public enum ConfirmButtonType
    {
        None = 0,
        SendMail = 1,
        CommitTrade = 2,
        DeleteItem = 3,
        SalvageItem = 4,
        EquipItem = 5,
        CraftingAbandon = 6,
        MarketplaceAuctionSellSubmit = 7,
        MarketplaceAuctionBuySubmit = 8,
        MarketplaceCommoditiesSubmit = 9,
        AccountClaimItem = 10,
        AccountTakeItem = 11,
        AccountGiftItem = 12,
        AccountGiftItemReturn = 13,
        CREDDExchangeSubmit = 14,
        AccountCreddRedeem = 15,
        CopyToClipboard = 16,
        MatchingGameRespondToPending = 17,
    }
}

So one cookie goes to the winner that can figure out:

Code:
string salad = "WHAT GOES HERE LOL";

ConfirmActionButton potato = new ConfirmActionButton(salad);
potato.Click();

// Attempted strings:
//
// string salad = "return Apollo.FindWindowByName('MailForm'):FindChild('CloseButton')"; 
//     isValid : true, 
//     ActionData : an actual IntPtr (lol),
//     Click() : memory error.

May the cookie race begin! Srsly, lua? Hate.
 
Last edited:
Code:
        public const string GetSendButtonLua =            @"local addon = Apollo.GetAddon('Mail')
if addon ~= nil then
    local compose = addon.luaComposeMail
    if compose ~= nil then
        return compose.wndSendBtn
    end
end
return nil
";

The reason Lua is used, is because we have to pull a specific object out of the Lua "userdata". Carbine basically hard-codes the Lua dependency into certain UI elements, to stop botters. (Which is fine, but fairly trivial to bypass)

In your specific case, you may want to use the "CurrentMailbox" class.
 
Ah! Yes!

It was just an example, but I didn't clue in to the part that the lua has an actual ConfirmActionButton class, so my attempts to make it work with 'CloseButton' (a regular Button) was failing gloriously!

Thanks for the help!

20120306_c2304_photo_en_10849.jpg


EDIT: LOL that thing is huge without resizing!
 
Back
Top