Okay, I have noticed that scar (and just about every macroer out there, RS or not) doesn't have any really good format for typing out strings. I mean, we have SendKeysVB, however everyone knows that this format absolutely sucks and you cannot do anything useful with it.
What I wanted was something that was simple, yet powerful enough to handle absolutely any problem, regardless of anything. The format I have created is very promising.
Everything under this line has actually been implemented into my code. Look below for a pastebin link.
First, let's say you just wanted to type out a simple string? Let's say the string was "runescape is awesome and i am not a cheater". Well, that is simple and can be done by anything out there.
Some problems come in when you bring capitals into it, such as "RuneScape is AWESOME and I am not a cheater". This part is still simple, you just have the macro hold down shift for every capital letter.
The third problem is with punctuation, such as an obligatory period at the end of that sentence ("RuneScape is AWESOME and I am not a cheater.") The way that the windows input commands work makes this almost impossible because the virtual keys do not map to ASCII (For an example, "." maps to 0xBE under windows virtual keys, however in ASCII it is actually 0x2E, a huge difference). It unfortunately isn't a matter of simply shifting the numbers down or up because they are not in order.
My code (found at the bottom) is able to handle all of these, and plenty more.
Let's say you wanted to use a shortcut that needed to use the CTRL key. Well, with the above examples that wouldn't work at all! That's where my next solution comes in. If you wanted to press, for example, CTRL+C, well you can simply input the string "[CTRL]c[/CTRL]" and it will do just that. You can even combine them, for example "[CTRL][ALT][SHIFT]A[/SHIFT[[/ALT][/CTRL]" (I don't know what that would do, however it would be pretty interesting.)
Everything below this line is not actually implemented in my code however I believe they should be part of the macrotype, well, "standard".
One possible problem with the special keys (keys enclosed in a [] tag) is that someone might just want to press a key and not combine it with anything, say maybe they only want to press the [F2] key and not have to use "[F2][/F2]". Well one way to make the strings look better would be to give another tag. my choice is "<F2>" so it will act just like any key. so with this you could do "[CTRL][ALT]<DELETE>[/ALT][/CTRL]" (however please don't do this, it'll make you look bad).
Now you've probably noticed I am missing the one really important thing in any macroing program: randomness. Well never fear, as I have my next solution: mini functions. say you wanted a delay of about 1 second between two sentences. In this case, we can do "This is one sentence.{delay: 1000ms}This is another sentence.". We can also use the syntax of {delay: 1s} to make things easier. This will allow any program to generate their own random numbers and input them as so. However why not put it directly into the syntax? "This is one sentence.{delay: 1s}{rdelay: 20ms}This is another sentence."
Using these 3 tags shown above this syntax can have endless possibilities. Please discuss what you think about this idea, as I think it has great potential, and will make the job of scripting much much easier.
Here's what you were looking for - my code!
http://p.talkflack.com/index.php/view/63251790
I am not putting any restrictions at all on this code or any macrotype code I make in the future. You are allowed to make your implementation proprietary if you really want, however I am keeping the description of the format completely open. Essentially everything I do related to macrotype is released into public domain.



).

Reply With Quote













.






