PB2BB(TAG)

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

PB2BB(TAG)

Post by Hroudtwolf »

Just for fun , I made this PB-Code to BB(Tag)-Code converter.
If you post the converted code (without code xxx /code), the PureBasic keywords will be highlighted in your forums.
It is not a curiosity. But it made fun to create this tool.

The converted code looks so:

test.pb wrote: Declare TestProzedur(hallo.s)
Global quatsch.s
a$="123"
If a$="123"
TestProzedur(hallo.s)
EndIf


Procedure TestProzedur(hallo.s)
Debug "Hallo"
EndProcedure
; ExecutableFormat=Windows
; EOF
Updated V1.02

- 18 more keywords added
- repaired: BB-Tag wasn't closed on BASIC-remarks (;)
- added a scrollbar to codefield
- now, its posible to load files with more than one megabyte


----------------------------------------------------------------------------------
http://www.purearea.net/pb/showcase/sho ... p=0&sort=1
or
http://www.purebasic-lounge.de/dload.ph ... file_id=30
or
Download setup-file
----------------------------------------------------------------------------------
Last edited by Hroudtwolf on Fri May 20, 2005 5:26 pm, edited 4 times in total.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

is this a balloon exe with 1 MB of recycledata? :D
i have your exe packed with upx, 35.5 kb :mrgreen:
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

OK.

I will use upx, too. :D
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Shit....

UPX doesn't work with my PB-Version.

I get an error-message.


Translated from german.
"Just a part of ReadMemoryProcess- or WriteMemoryProcess requests was given"
Last edited by Hroudtwolf on Fri May 20, 2005 4:05 pm, edited 1 time in total.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

here can you download my upx-gui: http://de.geocities.com/ts_softde/SFX_UPX-GUI.zip
or in console: upx --best --compress-icons=1 pp2bbcode.exe
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Perfectly :-)

A lot of Thanks.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Updated:

- Now, the converter knows all PureBasic commands
Window.pb wrote: ;
; ------------------------------------------------------------
;
; PureBasic - Window example file
;
; (c) 2001 - Fantaisie Software
;
; ------------------------------------------------------------
;

;
; Open a window, and do some stuff with it...
;

If OpenWindow(0, 100, 200, 195, 260, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget, "PureBasic Window")

MessageRequester("Information", "Click to move the Window", 0)
MoveWindow(200,200)

MessageRequester("Information", "Click to resize the Window", 0)
ReSizeWindow(320,200)

;
; This is the 'event loop'. All the user actions are processed here.
; It's very easy to understand: when an action occurs, the EventID
; isn't 0 and we just have to see what have happened...
;

Repeat
EventID.l = WaitWindowEvent()

If EventID = #PB_Event_CloseWindow
Quit = 1
EndIf

Until Quit = 1

EndIf

End



; ExecutableFormat=Windows
; EOF
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

very nice :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

What would be a good addition would be right-click paste (copies in and converts the text), and copy - same as your copy button.

What would be REALLY good is Fred changing the php for his bbs to do the conversion automatically...

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

@DoubleDutch

Thanks for the praise and your tip :-)
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Updated V1.05

- "Paste PB 'n Convert" added
- PopupMenu added
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Works perfect. :)

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

..

Post by NoahPhense »

Very nice..

- np
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Thank you very much.
:oops:

Do you have any suggestions for the next version ?
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

Hroudtwolf wrote:Thank you much.
Image

Do you have any tips?
How about formatting? Having it read for the spaces & tabs.

- np
Post Reply