Page 1 of 3

Clearing a text area.

Posted: Fri May 09, 2008 9:02 pm
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.

Posted: Fri May 09, 2008 9:35 pm
by didier69
Did you try:

Code: Select all

SetGadgetText(#STR_GADGET, "")

Posted: Fri May 09, 2008 10:23 pm
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
        



Posted: Fri May 09, 2008 11:20 pm
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?

Posted: Fri May 09, 2008 11:42 pm
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.

Posted: Fri May 09, 2008 11:44 pm
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. ;)

Posted: Sat May 10, 2008 12:03 am
by oToom
Okey dokey. Delete this mwhaha.

What you mean by more pleasent.

Posted: Sat May 10, 2008 12:18 am
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:

Posted: Sat May 10, 2008 12:33 am
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

Posted: Sat May 10, 2008 12:47 am
by rsts
PS: Listen to Sparkie! That old geezer always got some fine tips. Image
back to form :)

cheers

Posted: Sat May 10, 2008 12:47 am
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:

Posted: Sat May 10, 2008 1:14 am
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.

Posted: Sat May 10, 2008 1:16 am
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!

Posted: Sat May 10, 2008 1:20 am
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.

Posted: Sat May 10, 2008 1:27 am
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.