Autoaccept TaskAdd's?
Posted: Mon Oct 24, 2005 11:38 pm
Anyone come up with this yet?
Need to talk about MacroQuest to other MacroQuest users?
https://mq64.org/phpBB3/
Code: Select all
#Event Taskadd "#*#Expedition#*#"
Sub Main
:loop
/doevents
/goto :loop
/return
Sub Event_Taskadd
/delay 3s
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
/return
Code: Select all
Sub Main
:loop
/call Taskadd
/goto :loop
/return
Sub Taskadd
/delay 3s
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
/return
Code: Select all
|--------------------------------------------------------------------|
| Sub Wait_EXPD(int Sender_ID, string WHERE)
|--------------------------------------------------------------------|
|
| Sender_ID: NOT USED.
| WHERE: water, fire, mulk, out
| USAGE: /call Wait_EXPD 0 [water|fire|mulk|out]
| accepting a specific EXPD while rejecting the rest
| /call Wait_EXPD 0 out = exiting the current EXPD
| /call Wait_EXPD 0 mulk = accept the mulk expedition
|
Sub Wait_EXPD(int Sender_ID, string WHERE)
/declare water string local "Dranik's Hollows: Watering Hole"
/declare fire string local "Dranik's Hollows: Fire Pit"
/declare mulk string local "Dranik's Hollows: Murkglider Hive"
/declare out string local "OUT"
/declare EXPD string local
/declare TRIES int local 0
/if (${Defined[ACTION_TAKEN]}) /varset ACTION_TAKEN 1
/varset EXPD ${${WHERE}}
/if (${WHERE.Equal[OUT]}) {
/if (!${Window[DynamicZoneWnd]}) {
/nomodkey /keypress ALT+Z
/delay 30 ${Window[DynamicZoneWnd]}
}
/delay 10
/echo Quitting Expedition: ${Window[DynamicZoneWnd].Child[DZ_CurrentDZValue].Text}...
/nomodkey /notify DynamicZoneWnd DZ_Quit leftmouseup
/delay 20 ${Window[ConfirmationDialogBox]}
/nomodkey /notify ConfirmationDialogBox CD_Yes_Button leftmouseup
/nomodkey /keypress ALT+Z
/return
}
/echo Waiting for Expedition: ${EXPD}...
:Wait_Expedition
/delay 2
/if (!${Window[DynamicZoneWnd]}) /goto :Wait_Expedition
/if (${Window[DynamicZoneWnd].Child[DZ_CurrentDZValue].Text.Equal[${EXPD}]}) /goto :DONE
/varcalc TRIES ${TRIES}+1
/echo Try ${TRIES}: ${Window[DynamicZoneWnd].Child[DZ_CurrentDZValue].Text}...
/delay 5
/nomodkey /notify DynamicZoneWnd DZ_Quit leftmouseup
/delay 20 ${Window[ConfirmationDialogBox]}
/delay 5
/nomodkey /notify ConfirmationDialogBox CD_Yes_Button leftmouseup
/nomodkey /keypress ALT+Z
/delay 20 !${Window[DynamicZoneWnd]}
/goto :Wait_Expedition
:DONE
/varcalc TRIES ${TRIES}+1
/delay 2
/nomodkey /keypress ALT+Z
/delay 20 !${Window[DynamicZoneWnd]}
/echo Try ${TRIES}: ${Window[DynamicZoneWnd].Child[DZ_CurrentDZValue].Text} Success...
/return
yes, last time i checked MQ dont read the text content properly. here's how you read it, unless i misunderstood something of the manual :)A_Druid_00 wrote:Has anyone looked into parsing the text in the confirmation window? I know Wait4Rez also has this issue, and I was thinking about poking arounf the Confirmation window's different pieces to see if I could pull out the type of Confirmation via the Text.
Code: Select all
${Window[ConfirmationDialogBox].Child[CD_TextOutput].Text}Code: Select all
/if (${ChatText.Equal[clickyes]}) {
/if (${ChatSender.Equal[apredefinedsomebody]} || ${ChatSender.Equal[anotherpredefinedsomebody]}) {
/delay 2s
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
}
/return
}