Help with linking an item

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

EQCat
orc pawn
orc pawn
Posts: 29
Joined: Thu Aug 26, 2004 1:16 am

Help with linking an item

Post by EQCat » Thu Aug 26, 2004 1:27 am

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.

mercdev
a lesser mummy
a lesser mummy
Posts: 52
Joined: Thu Jul 29, 2004 7:22 pm

Post by mercdev » Thu Aug 26, 2004 1:37 am

Code: Select all

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

Try that.
1. [url=http://macroquest2.com/includes/manual.php]RTFM[/url]
2. [url=http://macroquest2.com/phpBB2/search.php]Search is your friend[/url]
3. [url=http://www.macroquest2.com/main.php?p=download]Download MQ2[/url]

EQCat
orc pawn
orc pawn
Posts: 29
Joined: Thu Aug 26, 2004 1:16 am

Post by EQCat » Thu Aug 26, 2004 2:37 am

Tried that and got the following error:
Syntax: <window|"item"> <contorl|0> <notification> [notification data]

Thanks for the suggestion tho!

mercdev
a lesser mummy
a lesser mummy
Posts: 52
Joined: Thu Jul 29, 2004 7:22 pm

Post by mercdev » Thu Aug 26, 2004 3:23 am

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~
1. [url=http://macroquest2.com/includes/manual.php]RTFM[/url]
2. [url=http://macroquest2.com/phpBB2/search.php]Search is your friend[/url]
3. [url=http://www.macroquest2.com/main.php?p=download]Download MQ2[/url]

EQCat
orc pawn
orc pawn
Posts: 29
Joined: Thu Aug 26, 2004 1:16 am

Post by EQCat » Thu Aug 26, 2004 3:34 am

That was actually one of the very first things I tried :cry:

It's driving me nuts, lol.

mercdev
a lesser mummy
a lesser mummy
Posts: 52
Joined: Thu Jul 29, 2004 7:22 pm

Post by mercdev » Thu Aug 26, 2004 3:58 am

err...yeah.... (edited content for retardation)
1. [url=http://macroquest2.com/includes/manual.php]RTFM[/url]
2. [url=http://macroquest2.com/phpBB2/search.php]Search is your friend[/url]
3. [url=http://www.macroquest2.com/main.php?p=download]Download MQ2[/url]

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Thu Aug 26, 2004 5:01 am

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.

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Thu Aug 26, 2004 5:53 am

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. :)

EQCat
orc pawn
orc pawn
Posts: 29
Joined: Thu Aug 26, 2004 1:16 am

Post by EQCat » Thu Aug 26, 2004 1:28 pm

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!

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Thu Aug 26, 2004 2:18 pm

Not sure, but just leading with
/keypress enter

instead of the /notify stuff works fine

EQCat
orc pawn
orc pawn
Posts: 29
Joined: Thu Aug 26, 2004 1:16 am

Post by EQCat » Thu Aug 26, 2004 9:01 pm

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!

mercdev
a lesser mummy
a lesser mummy
Posts: 52
Joined: Thu Jul 29, 2004 7:22 pm

Post by mercdev » Thu Aug 26, 2004 11:21 pm

:shock:
1. [url=http://macroquest2.com/includes/manual.php]RTFM[/url]
2. [url=http://macroquest2.com/phpBB2/search.php]Search is your friend[/url]
3. [url=http://www.macroquest2.com/main.php?p=download]Download MQ2[/url]