Add default text to each new code page

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Add default text to each new code page

Post by freak »

I added the possibility to execute a tool when a new source is created. This way you can generate any header you want with a simple tool like this:

Code: Select all

; Configure as
;
; Commandline: "%TEMPFILE"
; Trigger: "New Sourcecode created"
; [x] Wait until tool quits
; [x] Reload Source after tool has quit
;      (x) into current source
; [x] Hide tool from the Main menu
;
File$ = ProgramParameter()
If CreateFile(0, File$)
  WriteStringN(0, ";")
  WriteStringN(0, "; Created on: " + FormatDate("%dd/%mm/%yyyy %hh:%ii", Date()))
  WriteStringN(0, ";")
  CloseFile(0)
EndIf
It should be available in the next beta.
quidquid Latine dictum sit altum videtur
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Add default text to each new code page

Post by ts-soft »

freak wrote:I added the possibility to execute a tool when a new source is created.
Good Idea, thanks :D
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Post Reply