Page 1 of 1
Excuse Generator.
Posted: Wed Mar 04, 2009 8:56 am
by oToom
Code: Select all
;- Window Constants
;
Enumeration
#Window_0
EndEnumeration
;- Gadget Constants
;
Enumeration
#Button_0
#Listview_0
EndEnumeration
OpenWindow(#Window_0, 327, 122, 277, 269, "oExcuse Generator", #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_MinimizeGadget )
ButtonGadget(#Button_0, 10, 10, 260, 30, "Generate")
ListViewGadget(#Listview_0, 10, 50, 260, 210)
Dim Thing1.s(7)
Thing1(0) = "My mom "
Thing1(1) = "My dad "
Thing1(2) = "My sister "
Thing1(3) = "My brother "
Thing1(4) = "My dog "
Thing1(5) = "My cat "
Thing1(6) = "The Police "
Thing1(7) = "Mr.Bush "
Dim DidSomething.s(9)
DidSomething(0) = "ate "
DidSomething(1) = "burned "
DidSomething(2) = "puked on "
DidSomething(3) = "spat on "
DidSomething(4) = "killed "
DidSomething(5) = "stabbed "
DidSomething(6) = "washed "
DidSomething(7) = "stole "
DidSomething(8) = "blew up "
DidSomething(9) = "shat on "
Dim Thing2.s(10)
Thing2(0) = "my mom."
Thing2(1) = "my dad."
Thing2(2) = "my sister."
Thing2(3) = "my brother."
Thing2(4) = "my dog."
Thing2(5) = "my cat."
Thing2(6) = "the police."
Thing2(7) = "Mr.Bush."
Thing2(8) = "my homework."
Thing2(9) = "my house."
Thing2(10) = "my business."
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case #Button_0
Excuse$ = Thing1(Random(7)) + DidSomething(Random(9)) + Thing2(Random(10))
AddGadgetItem(#Listview_0, -1, Excuse$)
EndSelect
Case #PB_Event_CloseWindow
MessageRequester("oExcuse Generator", "Excuse generator created by oToom ( Ant )")
Break
EndSelect
ForEver
Creates simple, but funny excuses..
Posted: Wed Mar 04, 2009 9:08 am
by Kwai chang caine
Cool i like it
But for use it all day, the list is perhaps too short, no ??? :roll:
Since tomorrow, i use it for my job
Thanks for sharing

Posted: Wed Mar 04, 2009 10:17 am
by dobro
Kwaï chang caïne wrote:Cool i like it
But for use it all day, the list is perhaps too short, no ??? :roll:
Since tomorrow, i use it for my job
Thanks for sharing

KCC
tu t'extasies devant un truc qui existe deja sur notre forum depuis le 26/11/2005 !!!
http://www.purebasic.fr/french/viewtopi ... ompositeur
that already exists on our forum since 26/11/2005!

Posted: Wed Mar 04, 2009 11:45 am
by Trond
I'm not even bothering to look at this. Why? Because my dog shat on my brother!
Very funny idea, it could use some more variations, though.
Posted: Wed Mar 04, 2009 1:06 pm
by bobobo
more variations? use properties !
I like the prominent position of Mr.Bush and inserting
elements in listview at the top
Code: Select all
;
;- Window Constants
;
;PB 4.30 (x86)
;
Enumeration
#Window_0
EndEnumeration
;- Gadget Constants
;
Enumeration
#Button_0
#Listview_0
EndEnumeration
OpenWindow(#Window_0, 327, 122, 277, 269, "oExcuse Generator (V2)", #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_MinimizeGadget )
ButtonGadget(#Button_0, 10, 10, 260, 30, "Generate")
ListViewGadget(#Listview_0, 10, 50, 260, 210)
Dim Thing1.s(7)
Thing1(0) = "My mom"
Thing1(1) = "My dad"
Thing1(2) = "My sister"
Thing1(3) = "My brother"
Thing1(4) = "My dog"
Thing1(5) = "My cat"
Thing1(6) = "The Police"
Thing1(7) = "Mr.Bush"
Dim DidSomething.s(9)
DidSomething(0) = "ate "
DidSomething(1) = "burned "
DidSomething(2) = "puked on "
DidSomething(3) = "spat on "
DidSomething(4) = "killed "
DidSomething(5) = "stabbed "
DidSomething(6) = "washed "
DidSomething(7) = "stole "
DidSomething(8) = "blew up "
DidSomething(9) = "shat on "
Dim Thing2.s(10)
Thing2(0) = "my mom."
Thing2(1) = "my dad."
Thing2(2) = "my sister."
Thing2(3) = "my brother."
Thing2(4) = "my dog."
Thing2(5) = "my cat."
Thing2(6) = "the police."
Thing2(7) = "Mr.Bush."
Thing2(8) = "my homework."
Thing2(9) = "my house."
Thing2(10) = "my business."
Dim props.s(10)
Props(0) = "little"
Props(1) = "big"
Props(2) = "damned"
Props(3) = "fucking"
Props(4) = "old"
Props(5) = "new"
Props(6) = "fat"
Props(7) = "skinny"
Props(8) = "stupid"
Props(9) = "nerdy"
Props(10) = "wrong"
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case #Button_0
th1.s= Thing1(Random(7))
If FindString(th1," ",0)
th1.s=StringField(th1,1," ")+" "+Props(Random(7))+" "+StringField(th1,2," ")
EndIf
th1+" "
th2.s=Thing2(Random(10))
If FindString(th2," ",0)
th2.s=StringField(th2,1," ")+" "+Props(Random(7))+" "+StringField(th2,2," ")
EndIf
th2+" "
Excuse$ = th1 + DidSomething(Random(9)) + th2
AddGadgetItem(#Listview_0, 0, Excuse$)
EndSelect
Case #PB_Event_CloseWindow
MessageRequester("oExcuse Generator", "Excuse generator created by oToom ( Ant )")
Break
EndSelect
ForEver
Posted: Wed Mar 04, 2009 8:13 pm
by Kwai chang caine
tu t'extasies devant un truc qui existe deja sur notre forum depuis le 26/11/2005 !!!
Yes perhaps :roll:
In the first time, i don't know your code
But the french code talk of poetry, and it's a great code too, who give the real and nice sentence
And i thank you, to sharing it too
But the code of oToom give to me a real answer to go to my job monday
Because, i don't believe that, if i go to last in my job monday, i can give to my boss a poetry

Or for exchange, i have a good foot kick in my ass

Posted: Wed Mar 04, 2009 11:01 pm
by oToom
Glad you guys like the idea of this.
Might carry this on?
With a database, which can be added to.
Maybe read off the internet or something?
Well. I will add some more phrases etc.
Once again, glad you liked it!
Posted: Wed Mar 04, 2009 11:58 pm
by f1roe
Kwaï chang caïne wrote:tu t'extasies devant un truc qui existe deja sur notre forum depuis le 26/11/2005 !!!
Yes perhaps :roll:
In the first time, i don't know your code
But the french code talk of poetry, and it's a great code too, who give the real and nice sentence
And i thank you, to sharing it too
But the code of oToom give to me a real answer to go to my job monday
Because, i don't believe that, if i go to last in my job monday, i can give to my boss a poetry

Or for exchange, i have a good foot kick in my ass

Kain suprise ! you live next me !
Seb Lyon 3...
Posted: Thu Mar 05, 2009 1:12 am
by Kwai chang caine
Oh yeeees !!!!
You live in LYON too
Me it's a little bit more down in the 7e
We are 3 PB programmers who live in LYON.
You are french or a foreigner student ??? :roll:
Because LYON is a student town
Welcome to PB
