Dynamic Command Highlighting?

Blitz3D Forums/Blitz3D Beginners Area/Dynamic Command Highlighting?

hi everyone, i wasnt exactly shure where to post this, im @ school right now but i had an idea, what if you made a C++/PureBasic file, and added all the 'Major' functions that you use in you programs with the same input etc... but make them empty, then compile it, and put the file + the .dcls file in the Userlib file. then since blitz DOES NOT reserve key words, the blank C++ commands would be overloaded and you would get Command Highlighting for any function you wanted, its just an idea which i will test when i get home :D

tell me what you think

A lot of incomprehensible information, but let's say...

But if I understood well, it could be that you want "Print" to be highlighted diffrently in a diffrent color because you use it much and so you put it in your highlight list and then it would be...

AppTitle "Test program"
Print "Hello there..."
A$ = Input("What is yer name?")
Print "Hello there: "+A$
End

Is this what you mean?

nope not at all, but in re reading my post it was quite confusing...
iv tested it out and it works tho, so here is a beter explanation

let us say you wanted syntax highlighting of the command UpdateAI()
then what you could do is make a dll which had the function UpdateAI() in it, you could then make a dcls file in which you had UpdateAI():"_UpdateAI@0"
then in your main code it would be like this
function UpdateAI()
    ;Update Code in here
end function 


your function updateAI would now be highlighted like Graphics, Print, or Input etc...
is that clearer, i hope someone finds that usefull
:D

In other words, all homemade functions will be highlighted as well, just as internal Blitz commands... Do I get the information better this time?

yup, but only the ones in your .dcls file

That perfectly makes sense, but Jedive mentioned in another thread that you can even make "fake" .decls files and get syntax highlighting, without any need for such a fake DLL. Check this thread.

oh, i hadnt seen that + i had right after i posted figured out the fake part :D

yup, but only the ones in your .dcls file


Is good... If you could turn your normal Functions also into highlight (only if you wish), this would be really good...

This is exactly what we're talking about: syntax highlighting for normal Blitz function by doing fake .decls for these functions. You should also check the thread.

Hey, that looks nice, but what is a .decls and could someone explain exactly how to do this to someone as thick as me?

Check the thread I mentioned, Jedive has already given some example.