• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Problem - /notify newvalue not working

dum_as_f

Active member
Joined
Jun 28, 2016
RedCents
87¢
I'm hoping there's an easy answer to this, but when I try to use the /notify command to try to update an editbox window, it just doesn't do anything. I've tried to use the /notify Window ChildEditBox newvalue, I've tried to click the child editbox to insert the cursor, this doesn't do anything either, and I've tried to send the enter command to the child editbox to no avail. Does anyone know if there's something I'm missing or if these aspects of the /notify command just don't work for updating an editbox?
 
You need to use the actual window name... like this:

/notify QuantityWnd QTYW_slider newvalue 10

To find out the names, you put your mouse over them and type:

/echo ${EverQuest.LastMouseOver.Name}
 
Sorry I wasn't more clear with the original post, I was trying to keep it as vague and generalized because it's changing/inserting values into the editboxes that I was mostly concerned about. But in particular, I am trying to work with the public notes editbox of the guild management window.

I can identify and parse out the contents of the editbox with /echo ${Window[GuildManagementWnd].Child[GT_PublicInput].Text}, so the actual window name and piece I'm trying to modify are valid.
But when I try to use the notify command to change the value in any way, nothing happens. No error message, but nothing changes in the editbox. This is the syntax I used, /notify GuildManagementWnd GT_PublicInput newvalue AnyStringHere with no luck.
 
That explains the issue, newvalue expects an integer value.

I'm not sure if there is a more elegant solution but the one i used was to set the cursor in the box and type in the string. It makes pandas sad doing it that way but I was in a hurry at the time i wrote the macro.
 
I haven't been able to get the cursor to be in the box, but I'd gladly use that work around if you can share it.
 
I've been working with window manipulation for a while. Pulling from Bazaar2.mac I use the following.
Code:
/notify BazaarSearchWnd BZR_ItemNameInput leftmouseup
/call ClearChat
/call TypeIn "${thisItem}"
/notify BazaarSearchWnd BZR_QueryButton leftmouseup

Then for clear chat and TypeIn
Code:
Sub ClearChat
 /while (${Window[BazaarSearchWnd].Child[BZR_ItemNameInput].Text.Length}>0) {
  /ctrlkey /shiftkey /keypress home chat
  /delay 5
  /ctrlkey /shiftkey /keypress delete chat
  /delay 5
 }
/return

Code:
Sub TypeIn(InStr)
 /declare char string local
 /declare i int local
 /for i 1 to ${InStr.Length}
  /varset char ${InStr.Mid[${i},1]}
  /if (!${char.Length}) {
   /nomodkey /keypress Space chat
  } else {
   /if (${char.Left[1].Equal[(]}) /return
   /if (${char.Left[1].Equal[)]}) /return
   /nomodkey /keypress ${char} chat
  }
 /next i
/return

This will not work when manually typed into the chatboxes or MQ2Chat window because the notify to left click the box will get focus of the window, if you press Enter, or otherwise click then type a command into the chat window it will lose focus once the command is sent, Therefore this must be done in a macro in order to function.

IE:
Code:
/notify GuildManagementWnd GT_PublicInput leftmouseup
/while (${Window[GuildManagementWnd].Child[GT_PublicInput].Text.Length) {
    /ctrlkey /shiftkey /keypress home chat
    /delay 5
    /ctrlkey /shiftkey /keypress delete chat
    /delay 5
}
/call TypeIn "SomeText"

Above I replaced my call with a manually typed entry because of the while statement not using a param for the parent and child windows, but just to show you what it would look like in the case of the guildmanagementwnd
 
Thanks for the macro snippets Chat, was exactly what I needed to get this to work. I play on an EMU and people generally play 12+ characters at a time and when we guild up, it's a pain in the ass to have to make a public note for each one. I cannibalized your code for ClearChat and TypeIn and used them in a macro to set what you want to set the Public Message in the Guild Management Window as. You issue the command from your control toon/main and it will iterate through every toon in the netbots channel that doesn't match your name and clear any existing Public Note and set it to whatever you tell it to. Note, there is a bit of a delay purposefully implemented in this because there's inherent lag in updating the public note in the Guild Management Window, you can adjust the delay values if this is not to your liking.

Code:
 #Event PublicNote "[MQ2] setpublicnote #1#"
 Sub Main()
  /bc Setting text into Guild Management Window, Publc Note
  /bc Use /echo setpublicnote YourTextHere
  /bc What would you like to insert?
  :Primeloop
   /doevents
  /goto :Primeloop
  /return
 
|==================================================================
| SUB: Event_PublicNote
|==================================================================
 Sub Event_PublicNote(Line, publicNote)
  /squelch /echo ${Window[GuildManagementWnd].DoOpen}
  /delay 3
  /notify GuildManagementWnd GT_Subwindows tabselect 2
  /delay 3
  /notify GuildManagementWnd GT_PublicInput leftmouseup
  /delay 3
  /call TypeIn "${publicNote}"
  /if (${Window[GuildManagementWnd].Child[GT_PublicInput].Text.Length}>0) {
   /end
  } else {
   /bc Nothing was updated, try again or /end macro if you are finished.
  }
 /return
  
|==================================================================
| SUB: ClearChat
|==================================================================
 Sub ClearChat
  /while (${Window[GuildManagementWnd].Child[GT_PublicInput].Text.Length}>0) {
   /ctrlkey /shiftkey /keypress home chat
   /delay 5
   /ctrlkey /shiftkey /keypress delete chat
   /delay 5
  }
 /return
 
|==================================================================
| SUB: TypeIn
|==================================================================
 Sub TypeIn(InStr)
  /declare char  string  local
  /declare i   int  local
  /declare index  int  local
  /declare j   int  local
 
  /for i 1 to ${NetBots.Counts}
   
   /if (${NetBots.Client[${i}].NotEqual[${Me}]}) {
    /notify GuildManagementWnd GT_MemberList listselect ${Window[GuildManagementWnd].Child[GT_MemberList].List[=${NetBots.Client[${i}]}]}
    /varset index ${Window[GuildManagementWnd].Child[GT_MemberList].List[=${NetBots.Client[${i}]}]}
    /bc Setting Guild Management Window index to ${index}
    /bc Setting note for ${NetBots.Client[${i}]}
   
    /if (${Window[GuildManagementWnd].Child[GT_MemberList].List[${index}].Equal[${NetBots.Client[${i}]}]}) {
   
     /call ClearChat
     /for j 1 to ${InStr.Length}
     
      /varset char ${InStr.Mid[${j},1]}
      /if (!${char.Length}) {
       /nomodkey /keypress Space chat
      } else {
       /if (${char.Left[1].Equal[(]}) /return
       /if (${char.Left[1].Equal[)]}) /return
       /if (${j}==1) {
        /shift /keypress ${char} chat
       } else {
        /nomodkey /keypress ${char} chat
       }
      }
     /next j
    }
    /notify GuildManagementWnd GT_UpdatePublicButton leftmouseup
   }
   /delay 2s
   
  /next i
 
 /return
 
Problem - /notify newvalue not working

Users who are viewing this thread

Back
Top
Cart