I have seen lots of posts about the "Chatfilter Module".
Anyone got a link, or something that leads to this?
It's not directly linked to in the op, but if you click other versions (browse server files), go to modules, the newest api (currently 7), and the chatfilter is in there
you install it by placing it in mods/macros/modules
it can be accessed in game from the "file?" menu, up in the top left corner
How does the mod decide where to draw the limit for variables?
i somehow ended up with a messy one and it's not working out as i need it to
right now my variable is %#e%#t%%#e%%
should be a counter that's named e11, e12, e13, e21, e22, e23, and so on; the first number being %#t% and the second %#e%
but it doesn't quite work that way
i'll try to find another way, but i'm still interested in how it decides for future reference
How does the mod decide where to draw the limit for variables?
i somehow ended up with a messy one and it's not working out as i need it to
right now my variable is %#e%#t%%#e%%
should be a counter that's named e11, e12, e13, e21, e22, e23, and so on; the first number being %#t% and the second %#e%
but it doesn't quite work that way
i'll try to find another way, but i'm still interested in how it decides for future reference
I ran into a strange issue with the chatfilter module. When another player literally says something like %CHAT% or %CHATCLEAN% in modified chat, I think the filter actually tries to put the contents of the global variable they said. So, for example, I used chat filter to color my favorite server's local channel to yellow. Someone says in local "%CHATCLEAN%" or "%CHAT%" literally. The filter actually tries to replace "%CHATCLEAN%" with what CHATCLEAN was, but since CHATCLEAN contains "%CHATCLEAN%", it tries to replace THAT, creating sort of an infinite loop that, for some people, spammed their chat like crazy, or, in my case, crashed my client. I know this is confusing, and I hope it made any sense, just something I would like to report.
Hmm, that's pretty serious. I can think of a few ways to mitigate it but obviously want to mitigate it in such a way that it doesn't nerf the intentional ability to include variable expansion inside other variables. Unforseen stuff like this though is precisely why I will never include file read/write abilities into the mod.
In terms of mitigation, I think I can add the following measures to prevent this from happening:
Limiting recursion in variable expansion to a certain depth like I do with other functions, so maybe 10 recursions and then it fails
Checking for the existence of the variable name inside itself and replacing with a temporary marker until replacement is done, then restoring it afterward
Vetting text variables incoming via chat for strings that could cause issues like this
Oh, and while I'm posting here, any reason ITEMIDDMG doesn't show the damage values of tools?
This is because "damage" values have 2 uses in the game. They are used to mean literal "damage" on an item (the inverse of durability) and also to differentiate items that have sub-types, like wool and half slabs. You can access the item id via ITEM and the durability via DURABILITY, but this doesn't give you an easy way to compare items with each other (eg. comparing blue wool with blue wool) or knowing what item to PICK when you mean the item you're aiming at.
ITEMIDDMG is there to give you the id and damage of an item were you to wish to spawn it using /give or set it using worldedit. Thus it returns the damage value where this is used as a sub-type identifier, and zero for items that use the damage value to mean durability. Hope that makes sense.
Incoming yes, outgoing no
for incoming chat you need the chatfilter module
to use color codes in log messages or labels or such, use the & sign
for example, &agreen text is now &lbold &afor no reason,&r have fun!
OK, thanks. I already know about the color codes, just needed to know how to access them! As for outgoing strings, that's sad. I could think of a lot of uses for altering messages you send, or stopping them completely. *sigh* Whatevs.
The Meaning of Life, the Universe, and Everything.
Join Date:
1/29/2012
Posts:
90
Minecraft:
rookie1024
Member Details
Your mod is great, I love the features, but can you hurry with the wiki?? know what half of the stuff does. Arrays? Icons? You say your mod uses regex...which parts of regex are supported and which parts aren't Hopefully things will improve with a wiki.
EDIT: Made the tone less...harsh.
If I can put what I am typing in a string, I'll put in a button a thing like
$${ECHO("%&string%&a$$!");}$$
, and so on...
Thank you,
Paul.
Very hard to understand, but if you mean a random word in front of what you wrote..., yes and no
there is no outgoing chat filter, so you can't use the chat screen; nor the chat history
but if that's fine, you can use a prompt, write it to a variable, do anything you want to it, then echo it out
Snip to hide discriminating record of original message
that's half of what this thread is for, so you can ask and learn about stuff
a wiki IS on the way, and one of the top priorities, but it's not easy to write a good one about such a wide subject
pretty much all of regex is supported in regex operations
arrays are grouped variables
&list[1]
&list[2]
&list[3]
they're like separate variables, but they have the bonus that
a) you can use FOREACH();NEXT to go through them all and only have to write the code once
b) they can change size dynamically, your script won't have to keep track of it, nor will you have to precreate all the variables you may need
c) they're easier to delete when you're done working with them
useful for lists, queues, stuff like that
Icons are tiny images you can attach to "homes" and "places" list items, $$h and $$p
Updates do mean something, the changelogs provide enough information to easily figure out all the commands as they are added
If you're having trouble learning it, ask about stuff you need on this thread, it's what we're here for...
optionally you can add me on msn if you want quicker replies to simple questions (such as "what was that command again?")
i'm available most of the time, GMT +2
...unless there's school
Your mod is great, I love the features, etc. etc. etc. Lemme cut straight to the point: Great mod, lots of practical uses for me, FIX THE DOCUMENTATION!!
There is a lot of documentation it's just not centralised in any way, I'm working on that. Currently everything except very minor things is covered by the readme.txt and the changelog. That will get you 95% of what you need to know. Everything else just ask, because I know the documentation isn't easily accessible I answer questions here.
Arrays? Since when were they added and how do they work?
They were added in the very latest update and work exactly like you'd expect arrays to work, you just suffix the array index in [] following the variable name. The other commands like INDEXOF are mentioned in the changelog, or covered in a bit more detail in this post.
You say your mod uses regex...which parts of regex are supported and which parts aren't?
Everything supported by the java regex engine, which in all honesty is pretty much everything except for named capturing subpatterns. Regex functions in the mod default to case-insensitive though being the only difference.
I would not mind a delayed update if it meant better documentation.
I work on both at the same time, but as you probably appreciate there's a lot to document, and another fragmented source is not what I want to provide since fragmented sources already exist. So I'm working on a solid source but that's meant starting from the ground up, it's taking time.
Updates mean absolutely nothing unless I know how to use them, which is considerably harder with the documentation provided.
This is not really true, since a lot of the things I add benefit a large number of users, plus I diligently keep on top of Minecraft updates and usually have releases the same day as MC updates. Not to mention fixing bugs etc. Plus I get the feeling there are some users who actually enjoy working out the new stuff for themselves, just like with Minecraft there's always something left to discover.
If the readme, the changelog, and my youtube videos don't provide the vast majority of what you need, then I don't really know what you're expecting. But suffice to say I'm not going to layer on more incomplete documentation which is why I'm sitting on this wiki until it's complete to my satisfaction. Besides it's not like I leave people in the dark, the amount of time I spend answering PM's and forum posts should be a testament to that :/
Not to be a hater, but I am extremely frustrated right now... Take nothing of this personally.
Well I'm sorry you're frustrated, and it's hard not to take it personally since, unlike code that I'm paid to write, this is a personal project and I do it for my own enjoyment. Take the time to read back through some of my posts and you'll see I try to support people as much as I can.
There is a lot of documentation it's just not centralised in any way, I'm working on that. Currently everything except very minor things is covered by the readme.txt and the changelog. That will get you 95% of what you need to know. Everything else just ask, because I know the documentation isn't easily accessible I answer questions here.
Just ask.
They were added in the very latest update and work exactly like you'd expect arrays to work, you just suffix the array index in [] following the variable name. The other commands like INDEXOF are mentioned in the changelog, or covered in a bit more detail in this post.
They're used for homes, towns and warps lists, you can make custom ones by taking ingame screenshots if you want but that's an optional thing.
Everything supported by the java regex engine, which in all honesty is pretty much everything except for named capturing subpatterns. Regex functions in the mod default to case-insensitive though being the only difference.
I work on both at the same time, but as you probably appreciate there's a lot to document, and another fragmented source is not what I want to provide since fragmented sources already exist. So I'm working on a solid source but that's meant starting from the ground up, it's taking time.
This is not really true, since a lot of the things I add benefit a large number of users, plus I diligently keep on top of Minecraft updates and usually have releases the same day as MC updates. Not to mention fixing bugs etc. Plus I get the feeling there are some users who actually enjoy working out the new stuff for themselves, just like with Minecraft there's always something left to discover.
If the readme, the changelog, and my youtube videos don't provide the vast majority of what you need, then I don't really know what you're expecting. But suffice to say I'm not going to layer on more incomplete documentation which is why I'm sitting on this wiki until it's complete to my satisfaction. Besides it's not like I leave people in the dark, the amount of time I spend answering PM's and forum posts should be a testament to that :/
Well I'm sorry you're frustrated, and it's hard not to take it personally since, unlike code that I'm paid to write, this is a personal project and I do it for my own enjoyment. Take the time to read back through some of my posts and you'll see I try to support people as much as I can.
Sorry about the tone of my post. I spent a whole bunch of time searching through the thread etc. trying to figure out how to get from point A to point B. I'm sorry...
Thank you SOO much . One last quick question...how do I add icons to places?? the + button doesn't seem to do anything .
Wait...did you say YouTube videos?? Cool!!
[All emoticons used here are to indicate my actual tone. That post sounded more angry when I read it over a second time.]
One last quick question...how do I add icons to places?? the + button doesn't seem to do anything .
Places don't currently support custom icons, this dates back quite a while to when they were first implemented and to support multiple fields in a single list item I had to implement them slightly differently than the other lists. The list functionality is due a big rewrite which will both expand the number of available lists to almost unlimited and also support things like assigning custom icons to places.
As you can see, trying to balance adding all the things people want against creating a comprehensive library of documentation becomes a tricky proposition very quickly I literally only get about 2 feature requests a week on average, but over the year that soon adds up.
Places don't currently support custom icons, this dates back quite a while to when they were first implemented and to support multiple fields in a single list item I had to implement them slightly differently than the other lists. The list functionality is due a big rewrite which will both expand the number of available lists to almost unlimited and also support things like assigning custom icons to places.
As you can see, trying to balance adding all the things people want against creating a comprehensive library of documentation becomes a tricky proposition very quickly I literally only get about 2 feature requests a week on average, but over the year that soon adds up.
OK, thanks! Also... sorry to be such a bother, but if you get the time, could you explain the $$- tags? I'm having a hard time trying to figure out what they do, with one person saying one thing and another saying something else...
OK, thanks! Also... sorry to be such a bother, but if you get the time, could you explain the $$- tags? I'm having a hard time trying to figure out what they do, with one person saying one thing and another saying something else...
$$?
$$[name]
$$[title[item1,item2]
$$u
$$i
and most othersask you to specify something, and will replace all instances of themselves with it
for example
/tp mart3323 $$u
will ask me for a user, replace $$u with that user, then send, for example, /tp mart3323 jackalope4
$$<file.txt> gets replaced with whatever is in the file
$$! opens the chat GUI and puts everything preceding it into the chat box for you to edit, doesn't send the message
$${ }$$ script tags surround anything you want to be treated as a script
messages don't get sent from those except for those that are in an Echo(message) command
I tried but it just closed the chat and nothing after :/
Ok, I'll repeat
As you can see on the screenshot, I have opened the chat. On the inChat Gui I have a list of buttons containing all color codes. I wrote in the chat bar "I want to put a string [...]" . What I want to do is when I click on a button, it add a color code ("&a" by example) after what I am writing. However, I also want to be able to continue my message writing.
So what I thunk is :
-I write something in the chat bar.
-If the user clicks on a button, it takes what is written on the chat bar in a string (&string), and add to this string the color code corresponding to the button.
-After, it does ECHO("%&string%$$!");.
$$! because I want to be able to continue the text writing.
What Mumfrey suggested was another way to do it, just by putting TYPE("&a"); in each button ("&a" depends of the button, it can be "&b" or "&5"...). But I don't know why it just close the chat :/
I'm so sorry about my english... :/
Thanks.
That's okay, thanks for trying, and if i may offer some advice; examples are always useful when trying to explain something, so thanks
you need to check "don't close GUI on click" in the button's options (would you like a screenshot of the process?)
---
Does Echo(stuff$$!) really work?
that's cool
Type() sends a series of simple keypresses, as if typing a message, so they should interact with your chat as you'd expect them to
What Mumfrey suggested was another way to do it, just by putting TYPE("&a"); in each button ("&a" depends of the button, it can be "&b" or "&5"...). But I don't know why it just close the chat :/
Aha, yes I did have the right idea then. It should work to do what you want if you just set the button to not close the GUI on click since TYPE just directly injects characters into the keyboard buffer as if you'd typed the letters yourself.
As of 0.9.7 you can also use variables inside TYPE as well, so imagine the possibilities for inserting your current coordinates, health, hunger, sexual orientation, shoe size, etc. Okay maybe not the last two but you get the idea
OK, thanks! Also... sorry to be such a bother, but if you get the time, could you explain the $$- tags? I'm having a hard time trying to figure out what they do, with one person saying one thing and another saying something else...
Stuff starting with $$ is called a "parameter", these are distinct from variables in that they are basically just a marker in the macro to insert some stuff there. The letters following the $$ tell the macro processor what you want to insert there.
Parameter values are always gathered before the macro is actually "run", so when you hit the key the first thing that happens is all the parameters are asked for and then inserted, once that's done the macro is run.
Variables are different in that they can change value whilst the macro is running, just like traditional variables in other languages, and can thus allow you to do dynamic stuff like loops and such. Because parameters are "filled in" before the macro is run, you can do basically anything with them. Like this example:
$${ECHO("$$u is a noob")}$$
This macro contains a parameter $$u which is an online user parameter. When you run the macro the mod first prompts you to select a user, and then inserts the value into the macro. So if you choose "Dave" from the list your final macro looks like this:
$${ECHO("Dave is a noob")}$$
This means that you cannot change these values or assign anything to them since they are just markers in the macro script that tell things to be inserted.
Variables on the other hand can change during the course of the macro actually running. Take this example
$${
&player = "Dave";
ECHO("%&player% is a noob");
}$$
In that example we assign a string variable called &player the value of "Dave" and then echo it, notice that now it's necessary to use % signs to tell the mod "when you see this, insert the value", since variables are not expanded unless you explicitly tell them to be.
It's functionally identical to the previous example though, except that with a variable the value can change part-way through the script:
$${
&player = "Dave";
ECHO("%&player% is a noob");
&player = "Steve";
ECHO("%&player% is 1337");
}$$
Now because parameters are "filled in" before the macro is run, you can use a parameter to populate a variable by just doing an assignment like above, but supply a parameter as the assignment value:
$${
&player = "$$u";
}$$
This will prompt for the player when you run the macro, and then assign it to a variable allowing you to do more funky things with it.
Hope that makes sense.
As before I also recommend you and on parameters because they explain everything in exhaustive detail. They are linked in the OP of the thread, plus other tutorials like how to use different parts of the mod and all kinds of things, I urge you to at least watch some of them. I know they're quite long but the mod is quite complex.
$$?
$$[name]
$$[title[item1,item2]
$$u
$$i
and most othersask you to specify something, and will replace all instances of themselves with it
for example
Ok, thought I might be missing something there...Found a slight bug: when turning on a modifier key and setting "always override" to true on a keybind*, it seems to stop the other bind but not run the macro when I do not press the modifier key. This shouldn't happen, or is is supposed to?
Everything supported by the java regex engine, which in all honesty is pretty much everything except for named capturing subpatterns. Regex functions in the mod default to case-insensitive though being the only difference.
Hey, found http://www.regular-e.../reference.html which gives a simple, easy-to-read reference on Java regex. Maybe you could look it over and put it on the OP? From the point of view of one, new users would much appreciate this.
BTW, you wouldn't be able to make the quotation marks and apostrophes in the .txt editor straight, would you? Not a big problem, just bugs me . Also, using \" messes up the editor, which thinks you've ended the string with \. Again, pet peeve, but
I know you just said that it holds back your bugfixing, but could you add console dump and maybe think about in-game help? That would be great.
Not sure what you mean by console dump. But there's already quite a lot of ingame help for everything from parameter usage, event descriptions through to syntax hinting for scripts. Until other features are done there won't be any further things added to the ingame help though.
Found a slight bug: when turning on a modifier key and setting "always override" to true on a keybind*, it seems to stop the other bind but not run the macro when I do not press the modifier key. This shouldn't happen, or is is supposed to?
No that's the expected behaviour, those two options aren't really designed to be used together.
Hey, found http://www.regular-e.../reference.html which gives a simple, easy-to-read reference on Java regex. Maybe you could look it over and put it on the OP? From the point of view of one, new users would much appreciate this.
That site is a good resource and I recommend it to anyone that asks, a simple google for "regular expressions" will bring that up though so I don't really see the need to add it to the post.
BTW, you wouldn't be able to make the quotation marks and apostrophes in the .txt editor straight, would you? Not a big problem, just bugs me . Also, using \" messes up the editor, which thinks you've ended the string with \. Again, pet peeve, but
You can find the font file inside the /font subdirectory in the mod file, feel free to change this as much as you like if there's something there that you aren't happy with. I'll look into the escaping thing, shouldn't be too hard to fix.
Not sure what you mean by console dump. But there's already quite a lot of ingame help for everything from parameter usage, event descriptions through to syntax hinting for scripts. Until other features are done there won't be any further things added to the ingame help though.
Well, I use a Minecraft wrapper called MultiMC, and it has a console. I was wondering if you could print errors and the like to whatever the console object is in Java. I think you already use it for mouse hook output, but having macro errors and the like printed to the console would be helpful. Does that clarify anything?
No that's the expected behaviour, those two options aren't really designed to be used together.
Well, that's kinda annoying. I had bound <ALT> <LMOUSE> to the "//hpos1" command in WorldEdit, and <ALT> <RMOUSE> to "//hpos2". Both had "Always Override" enabled. I did this to have an alternative to the SSP wand which breaks all the blocks you left-click. However, I guess I'll just put the commands in a separate config. That will work better overall anyway. Still love this mod, though!
Well, I use a Minecraft wrapper called MultiMC, and it has a console. I was wondering if you could print errors and the like to whatever the console object is in Java. I think you already use it for mouse hook output, but having macro errors and the like printed to the console would be helpful. Does that clarify anything?
Anything printed to LOG() goes to the console as well as chat.
Well, that's kinda annoying. I had bound <ALT> <LMOUSE> to the "//hpos1" command in WorldEdit, and <ALT> <RMOUSE> to "//hpos2". Both had "Always Override" enabled. I did this to have an alternative to the SSP wand which breaks all the blocks you left-click. However, I guess I'll just put the commands in a separate config. That will work better overall anyway. Still love this mod, though!
I use this exact setup myself but I just use it with the macro override key rather than setting specific modifiers on the macros themselves. If you want it to work with a different key the easiest thing is to stick the override binds in a separate config (called for example "MouseButtons") and enable "always override" for them, then on your modifier key bind it as a KEY STATE macro and use:
Good question..
It's not directly linked to in the op, but if you click other versions (browse server files), go to modules, the newest api (currently 7), and the chatfilter is in there
you install it by placing it in mods/macros/modules
it can be accessed in game from the "file?" menu, up in the top left corner
'Cause tomorrow spring is here
i somehow ended up with a messy one and it's not working out as i need it to
right now my variable is %#e%#t%%#e%%
should be a counter that's named e11, e12, e13, e21, e22, e23, and so on; the first number being %#t% and the second %#e%
but it doesn't quite work that way
i'll try to find another way, but i'm still interested in how it decides for future reference
'Cause tomorrow spring is here
No there isn't, the "simple gui screens" is a legacy feature for people who just want a very minimal interface for the mod's keybinding features.
It recursively applies this regex:
So as you can see, in your pattern it will match:
Hmm, that's pretty serious. I can think of a few ways to mitigate it but obviously want to mitigate it in such a way that it doesn't nerf the intentional ability to include variable expansion inside other variables. Unforseen stuff like this though is precisely why I will never include file read/write abilities into the mod.
In terms of mitigation, I think I can add the following measures to prevent this from happening:
This is because "damage" values have 2 uses in the game. They are used to mean literal "damage" on an item (the inverse of durability) and also to differentiate items that have sub-types, like wool and half slabs. You can access the item id via ITEM and the durability via DURABILITY, but this doesn't give you an easy way to compare items with each other (eg. comparing blue wool with blue wool) or knowing what item to PICK when you mean the item you're aiming at.
ITEMIDDMG is there to give you the id and damage of an item were you to wish to spawn it using /give or set it using worldedit. Thus it returns the damage value where this is used as a sub-type identifier, and zero for items that use the damage value to mean durability. Hope that makes sense.
OK, thanks. I already know about the color codes, just needed to know how to access them! As for outgoing strings, that's sad. I could think of a lot of uses for altering messages you send, or stopping them completely. *sigh* Whatevs.
Edit: Wait a minute...why doesn't that work????
EDIT: Made the tone less...harsh.
Very hard to understand, but if you mean a random word in front of what you wrote..., yes and no
there is no outgoing chat filter, so you can't use the chat screen; nor the chat history
but if that's fine, you can use a prompt, write it to a variable, do anything you want to it, then echo it out
'Cause tomorrow spring is here
that's half of what this thread is for, so you can ask and learn about stuff
a wiki IS on the way, and one of the top priorities, but it's not easy to write a good one about such a wide subject
pretty much all of regex is supported in regex operations
arrays are grouped variables
&list[1]
&list[2]
&list[3]
they're like separate variables, but they have the bonus that
a) you can use FOREACH();NEXT to go through them all and only have to write the code once
b) they can change size dynamically, your script won't have to keep track of it, nor will you have to precreate all the variables you may need
c) they're easier to delete when you're done working with them
useful for lists, queues, stuff like that
Icons are tiny images you can attach to "homes" and "places" list items, $$h and $$p
Updates do mean something, the changelogs provide enough information to easily figure out all the commands as they are added
If you're having trouble learning it, ask about stuff you need on this thread, it's what we're here for...
optionally you can add me on msn if you want quicker replies to simple questions (such as "what was that command again?")
i'm available most of the time, GMT +2
...unless there's school
'Cause tomorrow spring is here
There is a lot of documentation it's just not centralised in any way, I'm working on that. Currently everything except very minor things is covered by the readme.txt and the changelog. That will get you 95% of what you need to know. Everything else just ask, because I know the documentation isn't easily accessible I answer questions here.
Just ask.
They were added in the very latest update and work exactly like you'd expect arrays to work, you just suffix the array index in [] following the variable name. The other commands like INDEXOF are mentioned in the changelog, or covered in a bit more detail in this post.
They're used for homes, towns and warps lists, you can make custom ones by taking ingame screenshots if you want but that's an optional thing.
Everything supported by the java regex engine, which in all honesty is pretty much everything except for named capturing subpatterns. Regex functions in the mod default to case-insensitive though being the only difference.
I work on both at the same time, but as you probably appreciate there's a lot to document, and another fragmented source is not what I want to provide since fragmented sources already exist. So I'm working on a solid source but that's meant starting from the ground up, it's taking time.
This is not really true, since a lot of the things I add benefit a large number of users, plus I diligently keep on top of Minecraft updates and usually have releases the same day as MC updates. Not to mention fixing bugs etc. Plus I get the feeling there are some users who actually enjoy working out the new stuff for themselves, just like with Minecraft there's always something left to discover.
If the readme, the changelog, and my youtube videos don't provide the vast majority of what you need, then I don't really know what you're expecting. But suffice to say I'm not going to layer on more incomplete documentation which is why I'm sitting on this wiki until it's complete to my satisfaction. Besides it's not like I leave people in the dark, the amount of time I spend answering PM's and forum posts should be a testament to that :/
Well I'm sorry you're frustrated, and it's hard not to take it personally since, unlike code that I'm paid to write, this is a personal project and I do it for my own enjoyment. Take the time to read back through some of my posts and you'll see I try to support people as much as I can.
Sorry about the tone of my post. I spent a whole bunch of time searching through the thread etc. trying to figure out how to get from point A to point B. I'm sorry...
Thank you SOO much . One last quick question...how do I add icons to places?? the + button doesn't seem to do anything .
Wait...did you say YouTube videos?? Cool!!
[All emoticons used here are to indicate my actual tone. That post sounded more angry when I read it over a second time.]
Places don't currently support custom icons, this dates back quite a while to when they were first implemented and to support multiple fields in a single list item I had to implement them slightly differently than the other lists. The list functionality is due a big rewrite which will both expand the number of available lists to almost unlimited and also support things like assigning custom icons to places.
As you can see, trying to balance adding all the things people want against creating a comprehensive library of documentation becomes a tricky proposition very quickly I literally only get about 2 feature requests a week on average, but over the year that soon adds up.
OK, thanks! Also... sorry to be such a bother, but if you get the time, could you explain the $$- tags? I'm having a hard time trying to figure out what they do, with one person saying one thing and another saying something else...
$$?
$$[name]
$$[title[item1,item2]
$$u
$$i
and most othersask you to specify something, and will replace all instances of themselves with it
for example
/tp mart3323 $$u
will ask me for a user, replace $$u with that user, then send, for example, /tp mart3323 jackalope4
$$<file.txt> gets replaced with whatever is in the file
$$! opens the chat GUI and puts everything preceding it into the chat box for you to edit, doesn't send the message
$${ }$$ script tags surround anything you want to be treated as a script
messages don't get sent from those except for those that are in an Echo(message) command
That's okay, thanks for trying, and if i may offer some advice; examples are always useful when trying to explain something, so thanks
you need to check "don't close GUI on click" in the button's options (would you like a screenshot of the process?)
---
Does Echo(stuff$$!) really work?
that's cool
Type() sends a series of simple keypresses, as if typing a message, so they should interact with your chat as you'd expect them to
'Cause tomorrow spring is here
Remember to set the button properties to not close the GUI! Sorry I probably should have mentioned that
Aha, yes I did have the right idea then. It should work to do what you want if you just set the button to not close the GUI on click since TYPE just directly injects characters into the keyboard buffer as if you'd typed the letters yourself.
As of 0.9.7 you can also use variables inside TYPE as well, so imagine the possibilities for inserting your current coordinates, health, hunger, sexual orientation, shoe size, etc. Okay maybe not the last two but you get the idea
Stuff starting with $$ is called a "parameter", these are distinct from variables in that they are basically just a marker in the macro to insert some stuff there. The letters following the $$ tell the macro processor what you want to insert there.
Parameter values are always gathered before the macro is actually "run", so when you hit the key the first thing that happens is all the parameters are asked for and then inserted, once that's done the macro is run.
Variables are different in that they can change value whilst the macro is running, just like traditional variables in other languages, and can thus allow you to do dynamic stuff like loops and such. Because parameters are "filled in" before the macro is run, you can do basically anything with them. Like this example:
This macro contains a parameter $$u which is an online user parameter. When you run the macro the mod first prompts you to select a user, and then inserts the value into the macro. So if you choose "Dave" from the list your final macro looks like this:
This means that you cannot change these values or assign anything to them since they are just markers in the macro script that tell things to be inserted.
Variables on the other hand can change during the course of the macro actually running. Take this example
In that example we assign a string variable called &player the value of "Dave" and then echo it, notice that now it's necessary to use % signs to tell the mod "when you see this, insert the value", since variables are not expanded unless you explicitly tell them to be.
It's functionally identical to the previous example though, except that with a variable the value can change part-way through the script:
Now because parameters are "filled in" before the macro is run, you can use a parameter to populate a variable by just doing an assignment like above, but supply a parameter as the assignment value:
This will prompt for the player when you run the macro, and then assign it to a variable allowing you to do more funky things with it.
Hope that makes sense.
As before I also recommend you and on parameters because they explain everything in exhaustive detail. They are linked in the OP of the thread, plus other tutorials like how to use different parts of the mod and all kinds of things, I urge you to at least watch some of them. I know they're quite long but the mod is quite complex.
Ok, thought I might be missing something there...Found a slight bug: when turning on a modifier key and setting "always override" to true on a keybind*, it seems to stop the other bind but not run the macro when I do not press the modifier key. This shouldn't happen, or is is supposed to?
*Chrome tried to change this to "bindweed"
Hey, found http://www.regular-e.../reference.html which gives a simple, easy-to-read reference on Java regex. Maybe you could look it over and put it on the OP? From the point of view of one, new users would much appreciate this.
BTW, you wouldn't be able to make the quotation marks and apostrophes in the .txt editor straight, would you? Not a big problem, just bugs me . Also, using \" messes up the editor, which thinks you've ended the string with \. Again, pet peeve, but
Not sure what you mean by console dump. But there's already quite a lot of ingame help for everything from parameter usage, event descriptions through to syntax hinting for scripts. Until other features are done there won't be any further things added to the ingame help though.
No that's the expected behaviour, those two options aren't really designed to be used together.
That site is a good resource and I recommend it to anyone that asks, a simple google for "regular expressions" will bring that up though so I don't really see the need to add it to the post.
You can find the font file inside the /font subdirectory in the mod file, feel free to change this as much as you like if there's something there that you aren't happy with. I'll look into the escaping thing, shouldn't be too hard to fix.
Well, I use a Minecraft wrapper called MultiMC, and it has a console. I was wondering if you could print errors and the like to whatever the console object is in Java. I think you already use it for mouse hook output, but having macro errors and the like printed to the console would be helpful. Does that clarify anything?
Well, that's kinda annoying. I had bound <ALT> <LMOUSE> to the "//hpos1" command in WorldEdit, and <ALT> <RMOUSE> to "//hpos2". Both had "Always Override" enabled. I did this to have an alternative to the SSP wand which breaks all the blocks you left-click. However, I guess I'll just put the commands in a separate config. That will work better overall anyway. Still love this mod, though!
Anything printed to LOG() goes to the console as well as chat.
I use this exact setup myself but I just use it with the macro override key rather than setting specific modifiers on the macros themselves. If you want it to work with a different key the easiest thing is to stick the override binds in a separate config (called for example "MouseButtons") and enable "always override" for them, then on your modifier key bind it as a KEY STATE macro and use:
This will temporarily "overlay" the custom config while you hold down the modifier key.