Clearing a text area.

Just starting out? Need help? Post your questions and find answers here.
oToom
User
User
Posts: 54
Joined: Sat May 03, 2008 5:38 pm

Clearing a text area.

Post by oToom »

Okay well.

I am coding something to help me get going.
Just a little annoying program for msn.
A small spammer.
I want to be able to clear the textbox. (StringGadget)

Could someone help me.

Code: Select all

Repeat
        
          Select WaitWindowEvent()
          
            Case #PB_Event_Gadget
            
              Select EventGadget()
              
                Case 1
                  
                  
              EndSelect
              
            Case #PB_Event_CloseWindow
              Break
              
          EndSelect
          
        ForEver
I need it under case 1,


Thank you.
didier69
User
User
Posts: 15
Joined: Wed Apr 30, 2008 11:24 am
Location: Lyon (France)

Post by didier69 »

Did you try:

Code: Select all

SetGadgetText(#STR_GADGET, "")
oToom
User
User
Posts: 54
Joined: Sat May 03, 2008 5:38 pm

Post by oToom »

Damn this could get some getting used to.
Thanks for your help.

Was quick too.
But the spammer is harder than i though lol.
All i need it to do is spam some messages to a contact.

So far i have something very basic.

Code: Select all

OpenWindow(0, 321, 206, 319, 140, "nwSpammer",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
  
  CreateGadgetList(WindowID(0))
      ButtonGadget(1, 200, 70, 90, 20, "Clear")
      StringGadget(2, 70, 50, 220, 20, "")
      TextGadget(3, 20, 50, 40, 20, "Text:")
      TextGadget(4, 70, 70, 60, 20, "F9 = Start")
      TextGadget(5, 140, 70, 60, 20, "F11 = Stop")
      Frame3DGadget(6, 10, 10, 300, 90, "nwSpammer")
      TextGadget(7, 90, 110, 150, 20, "Coded by: nwData // oToom", #PB_Text_Center)
      
      
        Repeat
        
          Select WaitWindowEvent()
          
            Case #PB_Event_Gadget
            
              Select EventGadget()
              
                Case 1
                  SetGadgetText(2, "") 
                  
                  
              EndSelect
              
            Case #PB_Event_CloseWindow
              Break
              
          EndSelect
          
        ForEver
        


User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Just to clearify ...

You want to write a program that constantly sends a user defined string to the text input window of MS Messenger to piss other people of?
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
oToom
User
User
Posts: 54
Joined: Sat May 03, 2008 5:38 pm

Post by oToom »

Lol, not to piss people off.
I do it with an interval not straight after each other. etc.

I just would like to code one to help me learn.
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

I am so impressed with your new attitude Fluid Byte. oToom has admitted to coding...
oToom wrote:Just a little annoying program for msn
but you are willing to give him a chance to explain himself before you go all Monkey Boy on his a55. You have come a such long way in such a short time. 8)

@oToom: You'll find your stay here much more pleasant if you ask coding questions in regards to projects that are helpful/useful rather than ones that are annoying/useless. ;)
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
oToom
User
User
Posts: 54
Joined: Sat May 03, 2008 5:38 pm

Post by oToom »

Okey dokey. Delete this mwhaha.

What you mean by more pleasent.
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

oToom wrote:What you mean by more pleasent
Asking for help on annoying projects will not bring you much joy from some fellow PB'ers. :wink:
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

oToom wrote:I just would like to code one to help me learn.
Honestly, it's maybe not the best idea for a beginner to start with a chat spammer for MSN ...

PS: Listen to Sparkie! That old geezer always got some fine tips. Image
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

PS: Listen to Sparkie! That old geezer always got some fine tips. Image
back to form :)

cheers
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

Yep, I just love that new Fluid Byte attitude. If I wasn't getting ready to take my geezer nap, I'd...I'd...awwwww crap!!! I forgot what I was gonna do to you monkey boy :P :)

oToom: If you learn to code a chat program rather than and chat annoyer, you will accomplish twice as much. :wink:
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
oToom
User
User
Posts: 54
Joined: Sat May 03, 2008 5:38 pm

Post by oToom »

I have ordered the PB book by Kale i think it was.
JUst waiting on that to arrive now.

I need easier things to create. I am very new to this language, and barely know what to do in it. I barely know what it is capable of too.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

oToom wrote:I barely know what it is capable of too.
The limit, believe it or not, is your imagination! :wink: Be creative but not destructive!
--Kale

Image
oToom
User
User
Posts: 54
Joined: Sat May 03, 2008 5:38 pm

Post by oToom »

In every language i start, i jump into the deep end before i learn how to deal in the shallow end.

I need some ideas, That is what i lask.
I have done a simple button what else lol.

@Kale can't wait for your book to arrive, heard many great things about it.
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

oToom, while waiting for Kale's book, take a look at http://www.xs4all.nl/~bluez/datatalk/purebasic.htm for some help in getting started.
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Post Reply