Excellent, thanks!!! Permanent macros and boosted productivity here we come!:)Fred wrote:@Keya: you can put your macro in a resident file (see http://www.purebasic.com/documentation/ ... piler.html for the syntax to create one), it will gets loaded everytime PB loads.
Code: Select all
Cross-platform command switches
-r, --resident, /RESIDENT "filename": creates a resident file specified by the filename.
-ir, --ignoreresident, /IGNORERESIDENT "filename": doesn't load the specified resident file when the compiler starts.
It's mostly useful when updating a resident which already exists, so it won't load it. hmmm several downsides of using macro though...
one is structure contents are no longer recognised (by the IDE)
Code: Select all
Macro Struct
Structure
EndMacro
Struct MyTest
var1.i
var2.i
EndStructure
Define Test.MyTest
Test\var... ; <-- Typing "Test\" here normally would suggest var1 and var2 available, but due to macro it doesnt?Likewise, if you do one for say MsgBox = MessageRequester, when you type "MsgBox(" you no longer get the parameter suggestions in the bottom statusbar ("Title.s, Message.s, [flags.i]" etc)
Would be great if the IDE was able to expand the macro and detect, problem would be solved i guess.
The lack of bolding/highlighting is also a bit weird though, looks like ive inserted plaintext amongst the code [edit] can use Custom Keywords for this, nice


