Page 1 of 1

Help with linking an item

Posted: Thu Aug 26, 2004 1:27 am
by EQCat
I have searched for every combination of keywords I can think of but haven't found anything that answers my question. (Although I have learned quite a bit :)

What I'm trying to do is autloot a corpse and have any no drop items automatically linked in group chat. I can get it to do the link but I cannot get it to hit enter -- it just sits at chat line with link and blinking cursor at the end of the link.

Here's the basics of the code:
#turbo
Sub Main

/notify LootWnd BroadcastButton leftmouseup
/notify ChatWindow CWChatInput enter
/keypress ESC
/return
I found one example that allowed me to use CWChatInput then type something in and hit enter. Unfortunately that all happened in the MQ Window, which of course makes me think I'm just not notifying the correct window, but I can't find any others listed under /windows that seems like it would be the correct one.

Does anyone have any suggestions? Thank you in advance.

Posted: Thu Aug 26, 2004 1:37 am
by mercdev

Code: Select all

#turbo 
Sub Main
     /notify LootWnd BroadcastButton leftmouseup 
     /notify ChatWindow CWChatInput
     /keypress Enter
/return 

Try that.

Posted: Thu Aug 26, 2004 2:37 am
by EQCat
Tried that and got the following error:
Syntax: <window|"item"> <contorl|0> <notification> [notification data]

Thanks for the suggestion tho!

Posted: Thu Aug 26, 2004 3:23 am
by mercdev
ok, teach me to skim! :oops:

From everything I see you've got the syntax correct as well as the correct ScreenID

Code: Select all

/notify ChatWindow CWChatInput enter
Not sure why it doesn't do what you want. You could alternately replace that line with

Code: Select all

/keypress enter
/keypress enter
Since the first enter should give that box focus, then the second would return the written text. I haven't tried it tho~

Posted: Thu Aug 26, 2004 3:34 am
by EQCat
That was actually one of the very first things I tried :cry:

It's driving me nuts, lol.

Posted: Thu Aug 26, 2004 3:58 am
by mercdev
err...yeah.... (edited content for retardation)

Posted: Thu Aug 26, 2004 5:01 am
by wassup
Talked with mercdev in IRC and discovered a few things:

To use /notify ChatWindow CWChatInput leftmouseup you must be using MQ2ChatWnd plugin.

Code: Select all

Sub Main
    /notify ChatWindow CWChatInput leftmouseup
    /keypress / chat
    /keypress r chat
    /keypress s chat
    /keypress space chat
    /notify LootWnd BroadcastButton leftmouseup
    /keypress enter chat
    /keypress ESC
/return
The above *should* send the loot links to the raid channel. Can modify it however.

Posted: Thu Aug 26, 2004 5:53 am
by Cr4zyb4rd
This came up recently in another thread where somebody wanted a keybind to enter "/i say " into the chat window as a prompt, much the same way the default bind for t)ell or r)eply does. I believe they came to the same conclusions as far as how to do it...

Is there no way extant to enter a string into a text window? (Short of direct memory writes, which are frowned upon for the obvious reasons.)

Might be worth writing a small plugin to add a command for this, even if it boils down to doing multiple /keypress commands. If there's interest let me know and I'll cobble something together...shouldn't take more than a minute or two to whip up something ugly and horribly inefficient that gets the job done. :)

Posted: Thu Aug 26, 2004 1:28 pm
by EQCat
Thanks Wassup, I'll try that when I get home from work tonight.

I did find this code which I tried just to see what would happen (It was originally trying to search a tradeskill recipe box):

Code: Select all

#turbo 
Sub Main 
   /notify ChatWindow CWChatInput leftmouseup 
   /delay 5 
   /call Type "steel boning" 
   /delay 40  
   /notify ChatWindow CWChatInput enter
/return 

| Type out the input string.  Only non-alphabetic character 
| currently handled is space. 
Sub Type(InStr) 
   /declare char local 
   /declare loopctr local 
   /for loopctr 1 to ${String[@InStr].Length} 
      /varset char ${String[@InStr].Mid[@loopctr,1]} 
      /if (!${String[@char].Length}) { 
         /keypress space chat 
      } else { 
         /keypress @char chat 
      } 
   /next loopctr 
/return 

This ended up writing "steel boning" in the MQ window and hitting return.
Just for my own education, any ideas why it didn't show up in the chat window. I'll try making sure the plugin is loaded tonight just in case that was the problem.

Thanks for trying to help!

Posted: Thu Aug 26, 2004 2:18 pm
by Cr4zyb4rd
Not sure, but just leading with
/keypress enter

instead of the /notify stuff works fine

Posted: Thu Aug 26, 2004 9:01 pm
by EQCat
Well I apologize, it looks as if I didn't have the MQ2ChatWnd plugin loaded... it seems to work just fine now.

Thank you for the help tho!

Posted: Thu Aug 26, 2004 11:21 pm
by mercdev
:shock: