; Subs:
; En_Gump_Index <- creates an array Holding Info on all gumps details (Cycles through the gumps to do this).
; Also sets var %En_Gump_Index Containing names of all gumps found | separator and var %En_Gump_IndexCount
; EN_Gump_Count <- Tells you how many gumps exist.
; EN_Gump_Identify <- Identifys A Gump
; EN_Gump_InitializeDefinitions <- Initalize Gump Definitions, button locations (auto called from most functions if not already called)
; EN_Gump_PressButton <- Press button on open gump, return if successful
; EN_Gump_PressButtonContinue <- Press button on open gump if first var is true, return if successful.
; EN_gump_WaitFor <- Waitforgiven gump definition to display, return success failure
; EN_gump_WaitForContinue <- Waitforgiven gump definition to display, if first var is true, return if successful.
; EN_Gump_SetTop <- Scan all gumps looking for the Identification of a particular gump when found leave as top gump.
; EN_Gump_FindAndSetTop <- Past contname contsize x y - if scans gumps and sets requested to top returns true/falase
; ENs_EventMacroGumpOpen <- Uses event macro to open gumps that can be opened this way
; more to come....
; ------ Setup ENs Scripting Librarys for direct access
set %EN_SubScriptPath C:\EASYUO\EUO , #spc , Scripts\ENs-Script , #spc , Library
set %ENs_Subs_Gumps %EN_SubScriptPath , \ENs-Subs-Gumps.Txt ; setup path of gump library
; ------ END OF ENs SCRIPT LIBRARY SETUP
; presuming questlog gump is already opened, and you have run Ens Library setup code above or it will do nothing.
call %ENs_Subs_Gumps EN_Gump_SetTop QuestLog ; Find quest gump
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result Questlog Refuse ; If quest gump found click on Refuse button
call %ENs_Subs_Gumps EN_Gump_WaitForContinue #Result Questlog 10 ; if successful btn click wait for gump to reappear
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result Questlog Close ; if gump reappears click on close button
call %ENs_Subs_Gumps EN_Gump_Count
display ok Number of gumps open: #result
call %ENs_Subs_Gumps EN_Gump_Identify ; Will return not found if cannot identify
display ok Top Gump Identified as: #result
call %ENs_Subs_Gumps EN_Gump_Index
display ok %En_Gump_IndexCount Gumps Identified as: %EN_Gump_Index
call %ENs_Subs_Gumps ENs_EventMacroGumpOpen N/A N/A 8 1 paperdoll_gump ; open paperdoll Gump
call %ENs_Subs_Gumps EN_Gump_WaitFor PaperDoll ; wait for paperdoll to appear
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result PaperDoll Logout ; if paperdoll appeared press logout button
call %ENs_Subs_Gumps EN_Gump_WaitForContinue #Result YesNo ; wait for YesNo Gump to appear
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #result YesNo Okay ; if yesno gump appreared click Okay
Thx En's
I have tested the call %ENs_Subs_Gumps EN_Gump_SetTop QuestLog ; Find quest gump
And it work like I charm for my application.
Thx alot
call %ENs_Subs_Gumps EN_Gump_SetTop QuestLog ; Find quest gump
call %ENs_Subs_Gumps EN_Gump_PressButton Questlog Accept ; Accept the quest.
gosub EN_Gump_FindAndSetTop generic_gump 507 496 ; quest log - contname sizex sizey
if #result
display ok found the gump and set it to top.
if ! #result
display ok Boohoo didnt find the gump... wtf back to the drawing board.
halt
sub EN_Gump_FindAndSetTop ; Contname contsizex contsizey
set !ENGumpLPC #LPC
set #lpc 1000
set !GumpCount 0
Repeat
set !thiscontposx #Contposx
set !thiscontposy #Contposy
set !thiscontsizex #Contsizex
set !thiscontsizey #Contsizey
set !thiscontkind #Contkind
set !thiscontname #Contname
set !thiscontid #Contid
set !thisconttype #Conttype
set !thisconthp #Conthp
event conttop !GumpCount
set !GumpTheSame ( !thiscontposx = #Contposx && !thiscontposy = #Contposy && !thiscontsizex = #Contsizex && !thiscontsizey = #Contsizey && !thiscontkind = #Contkind && !thiscontname = #Contname && !thiscontid = #Contid && !thisconttype = #Conttype && !thisconthp = #Conthp ) && !GumpCount <> 0
set !GumpCount !GumpCount + 1
until ( #contname = %1 && #Contsizex = %2 && #Contsizey = %3 ) || !GumpTheSame ; || !GumpCount = 100
set #lpc !ENGumpLPC
return ( #contname = %1 && #Contsizex = %2 && #Contsizey = %3 ) ; result = did we find it
; ------ Setup ENs Scripting Librarys for direct access
set %EN_SubScriptPath C:\EASYUO\EUO , #spc , Scripts\ENs-Script , #spc , Library
set %ENs_Subs_Gumps %EN_SubScriptPath , \ENs-Subs-Gumps.Txt ; setup path of gump library
; ------ END OF ENs SCRIPT LIBRARY SETUP
call %ENs_Subs_Gumps EN_Gump_SetTop MoonGate ; Find Moongate Gump
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate Trammel
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate Felucca
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate Ilshenar
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate Malas
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate Tokuno
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate TerMur
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate Tokuno
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate Malas
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate Ilshenar
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate Felucca
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate Trammel
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City1
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City2
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City3
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City4
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City5
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City6
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City7
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City8
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City9
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City9
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City8
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City7
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City6
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City5
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City4
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City3
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City2
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result MoonGate City1
call %ENs_Subs_Gumps EN_Gump_SetTop QuestLog ; Find quest gump
call %ENs_Subs_Gumps EN_Gump_PressButton Questlog Accept ; Accept the quest.
[/quote]call %ENs_Subs_Gumps EN_Gump_SetTop QuestLog ; Find quest gump
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result Questlog Continue ; If quest gump found click on Refuse button
call %ENs_Subs_Gumps EN_Gump_WaitForContinue #Result Questlog 10 ; if successful btn click wait for gump to reappear
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result Questlog Accept ; if gump reappears click on Accept button
call %ENs_Subs_Gumps EN_Gump_SetTop QuestLog ; Find quest gump
if #result = #true
call %ENs_Subs_Gumps EN_Gump_PressButton Questlog Continue ; If quest gump found click on Refuse button
if #result = #true
call %ENs_Subs_Gumps EN_Gump_WaitFor Questlog 10 ; if successful btn click wait for gump to reappear
if #result = #true
call %ENs_Subs_Gumps EN_Gump_PressButton Questlog Accept ; if gump reappears click on Accept button
call %ENs_Subs_Gumps EN_Gump_SetTop QuestLog ; Find quest gump
gosub Waitingformygump contname generic_gump contize %SummarySize 50
gosub offsetclick 130 460
Wait 20
gosub offsetclick 130 460
wait 20
return
call %ENs_Subs_Gumps EN_Gump_SetTop QuestLog ; Find quest gump
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result Questlog Continue ; If quest gump found click on Refuse button
call %ENs_Subs_Gumps EN_Gump_WaitForContinue #Result Questlog 10 ; if successful btn click wait for gump to reappear
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result Questlog Accept ; if gump reappears click on Accept button
Return
it is click accept window but not the accept window.
So I have this working ATMCode: [Select]call %ENs_Subs_Gumps EN_Gump_SetTop QuestLog ; Find quest gump
gosub Waitingformygump contname generic_gump contize %SummarySize 50
gosub offsetclick 130 460
Wait 20
gosub offsetclick 130 460
wait 20
return
call %ENs_Subs_Gumps EN_Gump_SetTop QuestLog ; Find quest gump
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result Questlog Accept
call %ENs_Subs_Gumps EN_Gump_WaitForContinue #Result Questlog
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result Questlog Accept
wait 20 ; because you have it in your code above :)
Return
gosub EN_GUMP_Define CityStone #true 420 120 generic_gump LoginSizeName
gosub EN_GUMP_Define GateWarning #true 420 280 generic_gump LoginSizeName ;<------------------ New
gosub EN_GUMP_Define HouseMenu #true 420 440 generic_gump LoginSizeName
Gosub EN_Gump_DefineButtons Moongate RoyalCity 210 44 ValleyOfEodon 210 69
Gosub EN_Gump_DefineButtons gatewarning Okay 25 260 Cancel 255 260 ; <----------------
Gosub EN_Gump_DefineButtons CleanupPointExchange Deposit 30 118 Withdraw 30 138
Are there any examples on how to read rune names out of Runebook or Runic Atlas'?
Sorry, I'm trying to navigate around, but this looks like a really powerful sub