Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
fixed it up all fancy with proper coding and detection of open windows and what not.
working on /maybe :P
cpp:// MQ2Yes.cpp // Will attempt to say to most windows that ask for confirmation, good for boxing. // ------------------------------------------------------------------------------- // Super many thanks to eqmule, knightly, brainiac and wired420 for helping me // figure this stuff out, i am so in deep water, but they helped alot. // ------------------------------------------------------------------------------- // 01-10-2019 Kaen01: Cleanup and possible fixes // 01-11-2019 Kaen01: rewrite to use proper code and calls. // 01-12-2019 Kaen01: another complete rewrite to make it super awesome // 01-12-2019 Kaen01: Added a /no command #include "../MQ2Plugin.h" PreSetup("MQ2Yes"); inline bool ClickTheThing(PCHAR MyWndName, PCHAR MyButton) { if (CSidlScreenWnd* pMyWnd = (CSidlScreenWnd*)FindMQ2Window(MyWndName)) { if (pMyWnd->dShow && pMyWnd->Enabled) { if (CXWnd* pWnd = pMyWnd->GetChildItem(MyButton)) { SendWndClick2(pWnd, "leftmouseup"); WriteChatf("\ag[MQ2Yes] \awClicked \at%s \awon \ag%s", MyButton, MyWndName); } } return false; } return false; } VOID YesCommand(PSPAWNINFO pChar, PCHAR szLine) { //CXWnd *pWnd = 0; ClickTheThing("LargeDialogWindow", "LDW_YesButton"); ClickTheThing("LargeDialogWindow", "LDW_OKButton"); ClickTheThing("ConfirmationDialogBox", "CD_Yes_Button"); ClickTheThing("ConfirmationDialogBox", "CD_OK_Button"); ClickTheThing("TradeWND", "TRDW_Trade_Button"); ClickTheThing("GiveWnd", "GVW_Give_Button"); ClickTheThing("ProgressionSelectionWnd", "ProgressionTemplateSelectAcceptButton"); ClickTheThing("TaskSelectWnd", "TSEL_AcceptButton"); ClickTheThing("RaidWindow", "RAID_AcceptButton"); } VOID NoCommand(PSPAWNINFO pChar, PCHAR szLine) { //CXWnd *pWnd = 0; ClickTheThing("LargeDialogWindow", "LDW_NoButton"); ClickTheThing("ConfirmationDialogBox", "CD_No_Button"); ClickTheThing("ConfirmationDialogBox", "CD_Cancel_Button"); ClickTheThing("TradeWND", "TRDW_Cancel_Button"); ClickTheThing("GiveWnd", "GVW_Cancel_Button"); ClickTheThing("ProgressionSelectionWnd", "ProgressionTemplateSelectCancelButton"); ClickTheThing("TaskSelectWnd", "TSEL_DeclineButton"); ClickTheThing("RaidWindow", "RAID_DeclineButton"); } // Called once, when the plugin is to initialize PLUGIN_API VOID InitializePlugin() { AddCommand("/yes", YesCommand); AddCommand("/no", NoCommand); } // Called once, when the plugin is to shutdown PLUGIN_API VOID ShutdownPlugin() { RemoveCommand("/yes"); RemoveCommand("/no"); }
cpp:// MQ2Yes.cpp // Will attempt to say Yes or Ok to most windows that ask for confirmation, good for boxing. // 01-10-2019 Kaen01: Cleanup and possible fixes #include "../MQ2Plugin.h" PreSetup("MQ2Yes"); VOID YesCommand(PSPAWNINFO pChar, PCHAR szLine) { DoCommand(GetCharInfo()->pSpawn,"/squelch /notify LargeDialogWindow LDW_YesButton leftmouseup"); DoCommand(GetCharInfo()->pSpawn,"/squelch /notify LargeDialogWindow LDW_OkButton leftmouseup"); DoCommand(GetCharInfo()->pSpawn,"/squelch /notify ConfirmationDialogBox CD_Yes_Button leftmouseup"); DoCommand(GetCharInfo()->pSpawn,"/squelch /notify ConfirmationDialogBox CD_OK_Button leftmouseup"); DoCommand(GetCharInfo()->pSpawn,"/squelch /notify TradeWND TRDW_Trade_Button leftmouseup"); DoCommand(GetCharInfo()->pSpawn,"/squelch /notify GiveWnd GVW_Give_Button leftmouseup"); DoCommand(GetCharInfo()->pSpawn,"/squelch /notify ProgressionSelectionWnd ProgressionTemplateSelectAcceptButton leftmouseup"); DoCommand(GetCharInfo()->pSpawn,"/squelch /notify TaskSelectWnd TSEL_AcceptButton leftmouseup"); DoCommand(GetCharInfo()->pSpawn,"/squelch /notify RaidWindow RAID_AcceptButton leftmouseup"); } // Called once, when the plugin is to initialize PLUGIN_API VOID InitializePlugin() { AddCommand("/yes",YesCommand); } // Called once, when the plugin is to shutdown PLUGIN_API VOID ShutdownPlugin() { RemoveCommand("/yes"); } }
man redbot could you compile this and send to me so i can test it like alot.
edit1: cleaned up the code a bit.