Page 1 of 1

Introduction

Posted: Fri Jan 01, 2010 11:52 am
by trevorlawrence
Advertising spam removed by Berikco

Re: INTRODUCTION

Posted: Fri Jan 01, 2010 12:49 pm
by luis
Personally I never cared for introductions, especially in a programmer's forum.

Character and abilities can be better understood and correctly evalued slowly in time by everyone, and that's what really count. Not what someone can write about himself. Hey, it's only my opinion !


"there must be a place for the member introduction".

First post, and a request with a must ? See what I mean :o ?


I'm simply another user but I'll say: Hi and you are welcome, like any new PB user ! Enjoy your stay ! This is a great community !

Re: INTRODUCTION

Posted: Fri Jan 01, 2010 4:00 pm
by rsts
Welcome to the PureBasic forums, Mr Lawrence.

It is an excellent resource for PureBasic, literally as valuable as the product itself. It is very diverse and you will find people from many cultures and locales here. That said, you will also begin to notice the many possible interpretations of your comments in such a multi-cultural arena. For example, I did not interpret your comment as a request, but rather as a question :)

You will also learn that sometimes it helps to have a rather thick skin :D

Welcome and cheers (and happy new year)

Re: Introduction

Posted: Fri Jan 01, 2010 9:51 pm
by Demivec
trevorlawrence wrote:The first and the foremost thing which I would like to say to the moderators, administrators and the entire team of this site is there must be a place for the member introduction before they could start up. Keeping this in mind, herewith I am starting up with a new thread.
Welcome. Since this thread is your introduction tell us more about yourself. :wink:

With regard to your request (or demand, of the moderators), it isn't necessary to have a separate place for member introductions. Any new member can simply post their introduction as part of the the first message they post, whether it is a response to an existing thread or as the start of a new thread that involves a question or comment. That kills two birds with one stone. :wink:

Re: Introduction

Posted: Fri Jan 01, 2010 10:00 pm
by utopiomania
Hi Trevor Lawrence, welcome to the community, and a happy new year :)

Re: Introduction

Posted: Fri Jan 01, 2010 10:49 pm
by Rook Zimbabwe
OK forum software messed up my missive! 8)

Welcome Treavor.

People are here to help you! :mrgreen: We all are in one way or another!

Provided you aren't here to learn how to write MALware, Viruses or destructive BOTs!!! :evil: Those people are rooted out by the more paranoid among us (OK I am one of the "paraniods!") and ignored.

As a n00b to PB I suggest you look atthe forum and see what has been done and what is being done! There is a SEARCH button up at the top (I think on the top right on most forum STYLES but I could be wrong on that!)

Copy the code presented and run it in your IDE... change it a bit and see what happens... Learning is a functional process. It will get very easy.

You can even use OOP (though WHY you would want to I have no idea!) 8)

Don't know how much programming experience you have but if you look and test the ode on your own and ask questions you will learn PB.

There are many additional sites to help you:

http://www.purearea.net/
http://freenet-homepage.de/gnozal/

come to mind.

Look at the code and the examples.

If you run in to a problem you can post code and ask for help (PLEASE do not just put "Help!" as the thread topic BUT use a description of the problem!) Lots of smart people monitor the board and help... provided you aren't trying to spoof Windows or write malware or spyware or viri! :D

Sstupid and silly questions welcome all the time! (Or else why would they let me keep posting!) :wink:

Have a great time and party now that you are here!

Re: Introduction

Posted: Sat Jan 02, 2010 1:29 am
by djes
Hi! :mrgreen:

Re: Introduction

Posted: Sat Jan 02, 2010 3:17 am
by Olliv
oW! It's very cool! A strange subject.

Welcome Trevor! I was searching a place to post my code. I think it's a good place...

I don't know if you already went to friends with a wine bottle and they surprised you not drinking directly the bottle but waiting one year before. The reason is sometime a wine could be better if we know to wait.

This code is like such a bottle I think. It's a little present! Because now, we start a new year, so it's a good occasion to publish it. But it's too complex to learn its internal algo during only one hour, one day or one week...

Maybe you'll have the pleasure to understand it very correctly in... one year, I hope... (it's less that the time I need to learn english language)

So, welcome here.

Code: Select all

; Actually for Windows only
; By Ollivier
Global.S Message, Tabulation = "§§", Name = "EquationTest", Expr
Global.S TempDir
TempDir = GetTemporaryDirectory()
Global Cpl, Trust, Margin, MarginWidth = 8, ShutDown
Global NewList MathFunction.S()
Procedure Fatal(Message.S)
            MessageRequester("Erreur fatale", Message + Chr(10) + Chr(10) + "Cliquez sur [Ok] pour quitter...")
            End
EndProcedure
Procedure.S GetMessage(Rank.I, NoUpdate.I = 0)
            If Not NoUpdate
                        Message = ReadProgramString(Cpl)
            EndIf
            ProcedureReturn StringField(Message, Rank, Chr(9) )
EndProcedure
Procedure SetMessage(MyMessage.S)
            Protected Field.S
            Message = ""
            MyMessage = ReplaceString(MyMessage, Tabulation, Chr(9) )
            For I = 0 To CountString(MyMessage, Chr(9) )
                        Field = StringField(MyMessage, I + 1, Chr(9) )   
                        If I = 0
                                    Field = UCase(Field)
                        Else
                                    Message + Chr(9)
                        EndIf
                        Message + Trim(Field)
            Next I
            If ProgramRunning(Cpl)
                        WriteProgramStringN(Cpl, Message)
            EndIf
EndProcedure
Procedure Type(MyLine.S)
            MyLine = ReplaceString(MyLine, "¤", Chr(34) )
            WriteStringN(Trust, Space(MarginWidth * Margin) + MyLine)
EndProcedure
Procedure LogOn()
            Cpl = RunProgram("PBCompiler.EXE", "/STANDBY", #PB_Compiler_Home + "\Compilers", #PB_Program_Open | #PB_Program_Read | #PB_Program_Write | #PB_Program_Hide)
            If Not Cpl
                        Fatal("Compilateur non trouvé !")
            EndIf
            GetMessage(3)
            If GetMessage(1) <> "READY"
                        Fatal("Compilateur non conforme !")
            EndIf
EndProcedure
Procedure LogOff()
            SetMessage("end")
EndProcedure
Global.S Base
Global Margin = 16, ScreenHeight = 48, ButtonWidth = 48, ButtonHeight = 32
Global ButtonQty, ButtonInter = 8, Rank
Procedure.S Beta(Expr.S)
            Protected Result.S
            Trust = CreateFile(#PB_Any, TempDir + Name + ".PB")
            Type("OpenConsole()")
            Type("Global PrivateExpression.S")
            Type("Global PrivateMessage.S")
            Type("PrivateExpression = StrD(" + Expr + ")")
            Type("PrivateMessage = Input()")
            Type("PrintN(PrivateExpression)")
            Type("CloseConsole()")
            CloseFile(Trust)
            SetMessage("source §§ " + TempDir + Name + ".PB")
            SetMessage("target §§ " + TempDir + Name + ".EXE")
            SetMessage("compile")
            If GetMessage(1) = "SUCCESS"
                        Trust = RunProgram(TempDir + Name + ".EXE", "", "", #PB_Program_Open | #PB_Program_Read | #PB_Program_Write | #PB_Program_Hide)
                        WriteProgramStringN(Trust, "")
                        Result = ReadProgramString(Trust)
            Else
                        Result = ""
                        While GetMessage(1) <> "OUTPUT"
                                    Result + GetMessage(2, 1) + Chr(10)
                        Wend
            EndIf
            ProcedureReturn Result
EndProcedure
Procedure MainProcess()
            Protected.S Title, MyString, More
            Protected.I ButtonCount, ScreenG, MyVar, Num, SigleOp = 39
            Protected Selec.CHARRANGE
            SetMessage("functionlist")
            GetMessage(1)
            While GetMessage(1) <> "OUTPUT"
                        AddElement(MathFunction() )
                        MathFunction() = Trim(StringField(GetMessage(1, 1), 1, "-") )
            Wend
            ForEach MathFunction()
                        SetMessage("helpdirectory §§ " + StringField(MathFunction(), 1, "(") )
                        If Base = ""
                                    Base = GetMessage(1)
                        Else
                                    If Base <> GetMessage(1)
                                                DeleteElement(MathFunction(), 1)
                                    EndIf
                        EndIf
            Next
            ButtonQty = 19 + ListSize(MathFunction() )
            Rank = ButtonQty / 5 + 1
            InnerWidth = 2 * Margin + Rank * ButtonWidth + (Rank - 1) * ButtonInter
            InnerHeight = 3 * Margin + ScreenHeight + 5 * ButtonHeight + (5 - 1) * ButtonInter
            CalcWin = OpenWindow(#PB_Any, 0, 0, InnerWidth, InnerHeight, "Calculatrice", $CF0001)
            ScreenG = EditorGadget(-1, Margin, Margin, InnerWidth - 2 * Margin, ScreenHeight)
            ResetList(MathFunction() )
            ButtonCount = 0
            MyVar = 7
            For J = 0 To (Rank - 1)
                        For I = 0 To 4
                                    If NextElement(MathFunction() )
                                                Title = StringField(MathFunction(), 1, " ") + "("
                                    Else
                                                If (I > 0) And (I < 4) And (J < (Rank - 1) ) And (J => (Rank - 4) )
                                                            Num = 1
                                                Else
                                                            Num = 0
                                                            If Title = "1"
                                                                        Title = "0"
                                                            Else
                                                                        Title = "X"
                                                            EndIf
                                                EndIf
                                                If Num
                                                            Title = Chr(48 + MyVar)
                                                            MyVar - 3
                                                            If MyVar < 1
                                                                        MyVar + 10
                                                            EndIf
                                                EndIf
                                    EndIf
                                    If ButtonCount => ButtonQty
                                                Y = 2 * Margin + ScreenHeight + (ButtonHeight + ButtonInter) * I
                                                ButtonGadget(-1, Margin + (ButtonWidth + ButtonInter) * J, Y, ButtonWidth, InnerHeight - Margin - Y, "=")
                                                Break 2
                                    EndIf
                                    If Title = "X"
                                                Title = Chr(SigleOp)
                                                If SigleOp = 39
                                                            Title = "C"
                                                EndIf
                                                SigleOp + 1
                                    EndIf
                                    ButtonGadget(Zen, Margin + (ButtonWidth + ButtonInter) * J, 2 * Margin + ScreenHeight + (ButtonHeight + ButtonInter) * I, ButtonWidth, ButtonHeight, Title)
                                    Zen + 1                                    
                                    ButtonCount + 1
                        Next
            Next
            Repeat
                        Evt = WaitWindowEvent()
                        If GetActiveGadget() <> ScreenG
                                    Repeat
                                                Delay(1)
                                                Evt = WindowEvent()
                                    Until Evt = #PB_Event_Gadget
                                    ButtonNo = EventGadget()
                                    More = GetGadgetText(ButtonNo)
                                    If Right(More, 1) = "(" And Len(More) > 1
                                                SelectElement(MathFunction(), ButtonNo)
                                                SetWindowTitle(CalcWin, MathFunction() )
                                    Else
                                                SetWindowTitle(CalcWin, "Calculatrice")
                                    EndIf
                                    If More <> "="
                                                If Ghost
                                                            Ghost = 0
                                                            If ((Asc(More) => 48) And (Asc(More) <= 57) ) Or Right(More, 1) = "("
                                                                        SetGadgetText(ScreenG, "")
                                                            EndIf
                                                EndIf
                                                SendMessage_(GadgetID(ScreenG), #EM_EXGETSEL, #Null, @Selec)
                                                SetGadgetText(ScreenG, GetGadgetText(ScreenG) + More)
                                                Selec\cpMin + Len(More)
                                                Selec\cpMax = Selec\cpMin
                                                SendMessage_(GadgetID(ScreenG), #EM_EXSETSEL, #Null, @Selec)
                                    Else
                                                SetGadgetText(ScreenG, Beta(GetGadgetText(ScreenG) ) )
                                                Ghost | 1
                                    EndIf
                                    If More = "C"
                                                SetGadgetText(ScreenG, "")
                                    EndIf
                                    SetActiveGadget(ScreenG)
                        EndIf
            Until Evt = #PB_Event_CloseWindow
EndProcedure
            LogOn()
                        MainProcess()
            LogOff()
            End

Re: Introduction

Posted: Mon Jan 04, 2010 6:19 pm
by DoubleDutch
I think Trevor is a 'robot' - look at his (or its) posts...

Re: Introduction

Posted: Tue Jan 05, 2010 2:51 am
by Lost
DoubleDutch wrote:I think Trevor is a 'robot' - look at his (or its) posts...
My thoughts exactly!

Re: Introduction

Posted: Tue Jan 05, 2010 3:03 am
by UserOfPure

Re: Introduction

Posted: Tue Jan 05, 2010 4:57 pm
by Berikco
UserOfPure wrote:It is a bot. It's advertising debt relief. See the same posts here:

http://www.psyonix.com/forum/viewtopic.php?f=8&p=59944
http://forum.claroline.net/viewtopic.php?f=72&t=20473
yes, its advertising, signature removed.
Will delete user and posts later
It was an IP from India, probably a humanoid low-cost advertising bot :)