Clear the window debugger [Resolved by NETMAESTRO]

Just starting out? Need help? Post your questions and find answers here.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

OK, recompiled the code to test for all 4 supported PB languages. Download again and it is going to work for sure. I always only used this myself so I never hit this problem with it before.
BERESHEIT
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Post by Kwai chang caine »

YAHHHOOOOOO !!!!

You are a champion 8)
Nothing resists to you :shock:

I love you and give you a french kiss :D
ImageThe happiness is a road...
Not a destination
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

Kwaï chang caïne wrote: I love you and give you a french kiss :D

euh guys, there are children under age sixteen reading here, kiss in private pls :lol:
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Post by Kwai chang caine »

:lol:
ImageThe happiness is a road...
Not a destination
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Here, Grasshopper, lemme teach you how to fish:

Code: Select all

;=====================================================
; Library:          ClearDebugWindow
; Author:           Lloyd Gallant (netmaestro)
; Date:             August 7, 2007
; ====================================================

Procedure FindListBox(hwnd, *lbhwnd.LONG)
  cn$=Space(255)
  GetClassName_(hwnd, @cn$, 254)
  If UCase(cn$) = "LISTBOX"
    *lbhwnd\l = hwnd
    ProcedureReturn 0
  Else
    ProcedureReturn 1
  EndIf
EndProcedure

Procedure FindDebugWindow(hwnd, *debugoutput.LONG)
  wt$ = Space(255)
  GetWindowText_(hwnd, @wt$, 254)
  If FindString(wt$, "Debug Output", 1) Or FindString(wt$, "Messages du débogueur", 1) Or FindString(wt$, "Debugger-Ausgabe", 1) Or FindString(wt$, "Salida Depurador", 1)
    *debugoutput\l = hwnd
    ProcedureReturn 0
  Else
    ProcedureReturn 1
  EndIf
EndProcedure

ProcedureDLL ClearDebugWindow()
  Protected debugoutput=0, listboxhwnd=0
  time = ElapsedMilliseconds()
  Repeat
    EnumWindows_(@FindDebugWindow(), @debugoutput)
    Delay(1)
  Until debugoutput Or ElapsedMilliseconds()-time > 200
  If debugoutput
    EnumChildWindows_(debugoutput, @FindListBox(),@listboxhwnd)
  EndIf
  If listboxhwnd
    SendMessage_(listboxhwnd, #LB_RESETCONTENT,0,0)
    ProcedureReturn 1
  Else
    ProcedureReturn 0
  EndIf
EndProcedure
BERESHEIT
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Post by Kwai chang caine »

OOOoooohhhh !!
It's still Christmas thanks to netmaestro 8)

I dared not ask the code. :oops:
My empire for 10% of your intelligence

You also have very nice teeth :lol:
One thousand of thanks, my hero 8)
ImageThe happiness is a road...
Not a destination
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

Thanks netmaestro,
That's a nice addition. :D
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Kwaï chang caïne wrote:You also have very nice teeth :lol:
:lol:

Very funny thread!

And very useful.

Thanks netmaestro!
Dare2 cut down to size
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> Very funny thread!

And very gross! :)
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Post by electrochrisso »

If you kiss the netmaestro, does he turn into a Prince. :)
PureBasic! Purely the best 8)
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Post by Kwai chang caine »

If you kiss the netmaestro, does he turn into a Prince.
It is not serious, i like it, if is a frog, or if is a prince :D
It's my hero 8)

I love also FRED, NETMAESTRO, SPARKIE, GNOZAL, TROND, SROD, FREAK, ABBKLAUS, FLYPE, COMTOIS, .....etc (Excuse me for those i forget :wink:), and all this god of code. 8)

I'm a looser of the code :oops:
For me, they are all magicians, angels, and it's been 3 years that I admire all, since I started purebasic.
So I dream have friends like them. :(

A thousand of thousand thanks at all for the dream that I live. 8)
ImageThe happiness is a road...
Not a destination
Post Reply