Jump to content

Random Excuse Generator


theguy0000
 Share

Recommended Posts

edit: now has a "copy to clipboard" button.

This makes random, meaningless, and senseless excuses for the lazy.

8/5/06: added words. now has 50 verbs, 50 adjectives, and 50 nouns, and every sentance uses one verb, one adjective, and one noun. this makes 125,000 possible sentances? ;)

6/9/07: added yet more words. :mad2: 100 nouns, verbs, adjectives. 1 millioon possibly sentences! :P

edit: forgot to attach new code :">

excuse.au3

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Cute!.....

Added reasons

Dim $reason, $because


#region GUI
Global Const $GUI_EVENT_CLOSE           = -3
GUICreate ( "Random Excuse Generator", 450, 150 )
GUISetState(@SW_SHOW)
$button = GUICtrlCreateButton ( "Create New Random Excuse", 10, 60 )
$close = GUICtrlCreateButton ( "    Exit    ", 160, 60 )
$clipC = GUICtrlCreateButton ( "Copy to clipboard", 216, 60)
$excuse = excuse()
$excuseh = GUICtrlCreateLabel ( $excuse , 10, 30 )
$reason = GUICtrlCreateCombo("Reasons", 315, 62, 100, 20)
Guictrlsetdata( -1, "go|come|be there|jump on that|show up|help you|buy lunch|hang out|party with you|pay you|write your script|make it happen|chill|")
new()

GUISetState()

Do
    $msg = GUIGetMsg()
    If $msg = $button Then new()
    If $msg = $clipC Then ClipPut ( $excuse )
Until $msg = $GUI_EVENT_CLOSE Or $msg = $close

Func randomize($type)
    If $type = "v" Then
    $excuse1 = Random (1, 20, 1)
    Switch $excuse1
    Case 1
        $excuse1="eat"
    Case 2
        $excuse1="drink"
    Case 3
        $excuse1="attack"
    Case 4
        $excuse1="notify"
    Case 5
        $excuse1="materialize"
    Case 6
        $excuse1="infuriate"
    Case 7
        $excuse1="immobilize"
    Case 8
        $excuse1="rip"
    Case 9
        $excuse1="dry"
    Case 10
        $excuse1="call"
    Case 11
        $excuse1="run over"
    Case 12
        $excuse1="curse"
    Case 13
        $excuse1="break"
    Case 14
        $excuse1="smash"
    Case 15
        $excuse1="kiss"
    Case 16
        $excuse1="attract"
    Case 17
        $excuse1="plug in"
    Case 18
        $excuse1="stack"
    Case 19
        $excuse1="encounter"
    Case 20
        $excuse1="climb"
    EndSwitch
    
    Return $excuse1
    
    ElseIf $type = "adj" Then
    
    $excuse2 = Random (1, 20, 1)
    
    Switch $excuse2
    Case 1
        $excuse2="rusty"
    Case 2
        $excuse2="crusty"
    Case 3
        $excuse2="crazy"
    Case 4
        $excuse2="angry"
    Case 5
        $excuse2="entertaining"
    Case 6
        $excuse2="hot"
    Case 7
        $excuse2="mad"
    Case 8
        $excuse2="mathematic"
    Case 9
        $excuse2="criminal"
    Case 10
        $excuse2="deadly"
    Case 11
        $excuse2="broken"
    Case 12
        $excuse2="lost"
    Case 13
        $excuse2="metalic"
    Case 14
        $excuse2="sharp"
    Case 15
        $excuse2="blue"
    Case 16
        $excuse2="frozen"
    Case 17
        $excuse2="telepathic"
    Case 18
        $excuse2="cultural"
    Case 19
        $excuse2="educational"
    Case 20
        $excuse2="scientific"
    EndSwitch
    return $excuse2
    ElseIf $type = "n" Then
    $excuse3 = Random (1, 20, 1)
    Switch $excuse3
    Case 1
        $excuse3="chili"
    Case 2
        $excuse3="grandma"
    Case 3
        $excuse3="arm"
    Case 4
        $excuse3="computer"
    Case 5
        $excuse3="keyboard"
    Case 6
        $excuse3="grandpa"
    Case 7
        $excuse3="cracker"
    Case 8
        $excuse3="soup"
    Case 9
        $excuse3="TV"
    Case 10
        $excuse3="cat"
    Case 11
        $excuse3="lamp"
    Case 11
        $excuse3="plant"
    Case 12
        $excuse3="light"
    Case 13
        $excuse3="table"
    Case 14
        $excuse3="dad"
    Case 15
        $excuse3="mom"
    Case 16
        $excuse3="brother"
    Case 17
        $excuse3="sister"
    Case 18
        $excuse3="shoe"
    Case 19
        $excuse3="door"
    Case 20
        $excuse3="telephone"
    EndSwitch
    Return $excuse3
    Else
    Return "{ERROR: Invalid argument passed to function}"
    EndIf
EndFunc

Func new()
    $because = GUICtrlRead($reason)
    If $because = "Reasons" Then
        $because = ""
    EndIf
    GUICtrlDelete ($excuseh)
    $excuse = "I'd love to " & $because & ", but I have to " & randomize("v") & " my " & randomize("adj") & " " & randomize("n") & "!"
    $excuseh = GUICtrlCreateLabel ( $excuse, 10, 30 )
EndFunc
Func Excuse()
    $because = GUICtrlRead($reason)
    If $because = "Reasons" Then
        $because = ""
    EndIf
    Return "I'd love to " & $because & ", but I have to " & randomize("v") & " my " & randomize("adj") & " " & randomize("n") & "!"
EndFunc
#endregion

8)

NEWHeader1.png

Link to comment
Share on other sites

thanks for the replies. updated version is in the first post. im not on my comp so i cant compile anything though. ill work on making the things Valuater gave me randomized when i get home.

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

since im not at home, i cant test wether this thing works or not, but here you go.

;~Dim $reason, $because
Dim $because


#region GUI
Global Const $GUI_EVENT_CLOSE = -3
GUICreate ( "Random Excuse Generator", 450, 150 )
GUISetState(@SW_SHOW)
$button = GUICtrlCreateButton ( "Create New Random Excuse", 10, 60 )
$close = GUICtrlCreateButton ( " Exit ", 160, 60 )
$clipC = GUICtrlCreateButton ( "Copy to clipboard", 216, 60)
$excuse = excuse()
$excuseh = GUICtrlCreateLabel ( $excuse , 10, 30 )
;~$reason = GUICtrlCreateCombo("Reasons", 315, 62, 100, 20)
;~Guictrlsetdata( -1, "go|come|be there|jump on that|show up|help you|buy lunch|hang out|party with you|pay you|write your script|make it happen|chill|")
new()

GUISetState()

Do
$msg = GUIGetMsg()
If $msg = $button Then new()
If $msg = $clipC Then ClipPut ( $excuse )
Until $msg = $GUI_EVENT_CLOSE Or $msg = $close

Func randomize($type)
If $type = "v" Then
$excuse1 = Random (1, 20, 1)
Switch $excuse1
Case 1
$excuse1="eat"
Case 2
$excuse1="drink"
Case 3
$excuse1="attack"
Case 4
$excuse1="notify"
Case 5
$excuse1="materialize"
Case 6
$excuse1="infuriate"
Case 7
$excuse1="immobilize"
Case 8
$excuse1="rip"
Case 9
$excuse1="dry"
Case 10
$excuse1="call"
Case 11
$excuse1="run over"
Case 12
$excuse1="curse"
Case 13
$excuse1="break"
Case 14
$excuse1="smash"
Case 15
$excuse1="kiss"
Case 16
$excuse1="attract"
Case 17
$excuse1="plug in"
Case 18
$excuse1="stack"
Case 19
$excuse1="encounter"
Case 20
$excuse1="climb"
EndSwitch

Return $excuse1

ElseIf $type = "adj" Then

$excuse2 = Random (1, 20, 1)

Switch $excuse2
Case 1
$excuse2="rusty"
Case 2
$excuse2="crusty"
Case 3
$excuse2="crazy"
Case 4
$excuse2="angry"
Case 5
$excuse2="entertaining"
Case 6
$excuse2="hot"
Case 7
$excuse2="mad"
Case 8
$excuse2="mathematic"
Case 9
$excuse2="criminal"
Case 10
$excuse2="deadly"
Case 11
$excuse2="broken"
Case 12
$excuse2="lost"
Case 13
$excuse2="metalic"
Case 14
$excuse2="sharp"
Case 15
$excuse2="blue"
Case 16
$excuse2="frozen"
Case 17
$excuse2="telepathic"
Case 18
$excuse2="cultural"
Case 19
$excuse2="educational"
Case 20
$excuse2="scientific"
EndSwitch
return $excuse2
ElseIf $type = "n" Then
$excuse3 = Random (1, 20, 1)
Switch $excuse3
Case 1
$excuse3="chili"
Case 2
$excuse3="grandma"
Case 3
$excuse3="arm"
Case 4
$excuse3="computer"
Case 5
$excuse3="keyboard"
Case 6
$excuse3="grandpa"
Case 7
$excuse3="cracker"
Case 8
$excuse3="soup"
Case 9
$excuse3="TV"
Case 10
$excuse3="cat"
Case 11
$excuse3="lamp"
Case 11
$excuse3="plant"
Case 12
$excuse3="light"
Case 13
$excuse3="table"
Case 14
$excuse3="dad"
Case 15
$excuse3="mom"
Case 16
$excuse3="brother"
Case 17
$excuse3="sister"
Case 18
$excuse3="shoe"
Case 19
$excuse3="door"
Case 20
$excuse3="telephone"
EndSwitch
Return $excuse3
ElseIf $type = "reason"
$excuse4 = Random ( 1, 13, 1 )
Switch $excuse4
Case 1
$excuse4 = "go"
Case 2
$excuse4 = "come"
Case 3
$excuse4 = "be there"
Case 4
$excuse4 = "jump on that"
Case 5
$excuse4 = "show up"
Case 6
$excuse4 = "help you"
Case 7
$excuse4 = "buy lunch"
Case 8
$excuse4 = "hang out"
Case 9
$excuse4 = "party with you"
Case 10
$excuse4 = "pay you"
Case 11
$excuse4 = "write your script"
Case 12
$excuse4 = "make it happen"
Case 13
$excuse4 = "chill"
EndSwitch
Return $excuse4
Else
Return "{ERROR: Invalid argument passed to function}"
EndIf
EndFunc

Func new()
$because = randomize ( "reason" )
GUICtrlDelete ($excuseh)
$excuse = "I'd love to " & $because & ", but I have to " & randomize("v") & " my " & randomize("adj") & " " & randomize("n") & "!"
$excuseh = GUICtrlCreateLabel ( $excuse, 10, 30 )
EndFunc
Func Excuse()
$because = GUICtrlRead($reason)
If $because = "Reasons" Then
$because = ""
EndIf
Return "I'd love to " & $because & ", but I have to " & randomize("v") & " my " & randomize("adj") & " " & randomize("n") & "!"
EndFunc
#endregion

one of the things i'm not sure that will work right is it copying right to the clipboard.

and if someone wouldnt mind compiling...?

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

I really thought your script was fun.... but very limited...so

I WENT CRAZY AND MADE A NEW ONE ...ok 8)

the script reads an ini so you can add more random statements

#include <GuiConstants.au3>
#notrayicon
Dim $reason, $because, $verbs_list[1000], $adj_list[1000], $noun_list[1000],  $time = "800"
Dim $QT_web = "www.XPCleanMenu.HostRocket.com", $NoKey = "", $time = "800"
Dim $ver = "1.0.1"

$Logo_icon = @TempDir & "\Toy-Icon.ico"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Toy-box-Icon.ico", $Logo_icon)
$Toy_Banner = @TempDir & "\Toy-banr.jpg"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Toy-box-jpg.jpg", $Toy_Banner)
$Sound_clk = @TempDir & "\Sound_clk.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Clickerx.wav", $Sound_clk)
$Sound_grp = @TempDir & "\Sound_grp.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Group_open.wav", $Sound_grp)
$Sound_bar = @TempDir & "\Sound_bar.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\xpinfbar.wav", $Sound_bar)
$Sound_lnk = @TempDir & "\Sound_lnk.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Notify.wav", $Sound_lnk)

$font="Comic Sans MS"

$Ewin = GUICreate ( " Toy BOX  -  Random Excuse Generator            ver " & $ver, 570, 150 )
GUISetIcon($Logo_icon)
$Icon_1 = GUICtrlCreatePic($Toy_Banner, 420, 90, 120, 50)
GUICtrlSetCursor(-1, 0)
GUICtrlSetTip(-1, "Click here - to Check UpDates Now!!")
$button = GUICtrlCreateButton ( " Create New Excuse ", 10, 80, 130, 35 )
GUICtrlSetState( -1, $GUI_DEFBUTTON)
$close = GUICtrlCreateButton ( "    Exit    ", 270, 80, 130, 35 )
$clipC = GUICtrlCreateButton ( " Copy to clipboard ", 140, 80, 130, 35)
$excuse = excuse()
$excuseh = GUICtrlCreateLabel (" " & $excuse , 5, 30, 560, 20, $SS_SUNKEN  )
GUICtrlSetFont(-1, 9, 600)
$reason = GUICtrlCreateCombo("Reasons", 430, 60, 100, 40)
initialize()
new()
SoundPlay($Sound_lnk)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Ewin, "int", 1000, "long", 0x00040001);slide in from left
GUISetState()



;sets tray icon
opt("TrayMenuMode", 1); Default tray menu items (Script Paused/Exit) will not be shown.
opt("TrayOnEventMode", 1)

$upgrade_tray = TrayCreateItem("Check New Releases")
TrayItemSetOnEvent(-1, "Set_Update")
TrayCreateItem("")
$about_tray = TrayCreateItem("About QTasc")
TrayItemSetOnEvent(-1, "Set_QT")
TrayCreateItem("")
$exit_tray = TrayCreateItem("Exit  QTasc - Toy BOX")
TrayItemSetOnEvent(-1, "Set_Exit")

TraySetState()


While 1
    $msg = GUIGetMsg()
    If $msg = $button Then new()
    If $msg = $clipC Then ClipPut ( $excuse )
    If $msg = $Icon_1 Then Call("Set_Update")
    If $msg = $GUI_EVENT_CLOSE Or $msg = $close Then Call("Set_Exit")

WEnd

; ------------------------------------------ Functions --------------------------------------------

Func randomize($type)
    If $type = "v" Then
    $excuse1_find = Random (1, $verbs_list[0], 1)
    $excuse1 = $verbs_list[$excuse1_find]
    Return $excuse1
    
    ElseIf $type = "adj" Then
    $excuse2_find = Random (1, $adj_list[0], 1)
    $excuse2 = $adj_list[$excuse2_find]
    return $excuse2
    
    ElseIf $type = "n" Then
    $excuse3_find = Random (1, $noun_list[0], 1)
    $excuse3 = $noun_list[$excuse3_find]
    return $excuse3
    
    Else
    Return "{ERROR: Invalid argument passed to function}"
    EndIf
EndFunc

Func new()
    $because = GUICtrlRead($reason)
    If $because = "Reasons" Then
        $because = ""
    EndIf
    $excuse = "I'd love to " & $because & ", but I have to " & randomize("v") & " my " & randomize("adj") & " " & randomize("n") & "!"
    GUICtrlSetData( $excuseh, " " & $excuse)
EndFunc

Func Excuse()
    $because = GUICtrlRead($reason)
    If $because = "Reasons" Then
        $because = ""
    EndIf
    Return "I'd love to " & $because & ", but I have to " & randomize("v") & " my " & randomize("adj") & " " & randomize("n") & "!"
EndFunc

Func initialize()
    $reasons_in = IniRead("excuses.ini","Reasons","key1","Not Found")
    Guictrlsetdata( $reason, $reasons_in)
    $verbs_in = IniRead("excuses.ini","Verbs","key1","Not Found")
    $verbs_list = StringSplit($verbs_in, ",")
    $adj_in = IniRead("excuses.ini","Adjectives","key1","Not Found")
    $adj_list = StringSplit($adj_in, ",")
    $noun_in = IniRead("excuses.ini","Nouns","key1","Not Found")
    $noun_list = StringSplit($noun_in, ",")
EndFunc

Func Set_Update()
    SoundPlay ($Sound_clk,1)
    RunWait(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & $QT_web)
    WinWaitActive("")
EndFunc

Func Set_QT()
    SoundPlay($Sound_grp, 1)
    $iMsgBoxAnswer = MsgBox(32, "  Toy BOX ,  by   QTasc", "WHO IS,  QT APPRAISAL SERVICE CO ?" & @CRLF & "" & @CRLF & "We are a Real Estate Appraisal Company based in Riverside, California. " & @CRLF & "" & @CRLF & "Thank you." & @CRLF & "" & @CRLF & "", 60)
    Select
        Case $iMsgBoxAnswer = -1;Timeout
    EndSelect
    SoundPlay($Sound_grp, 1)
EndFunc;==>Set_QT

Func Set_Exit()
    SoundPlay($Sound_lnk, 1)
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Ewin, "int", 1000, "long", 0x00050001);slide out to right
    Sleep($time)
    Exit
EndFunc;==>Set_Exit

I also added stuff to put it in my toy BOX ( hope thats ok with all the work i did???)

heres the ini file

excuses.ini

[Reasons]
key1=go|come|be there|jump on that|show up|help you|buy lunch|hang 

out|party with you|pay you|write to you|make it happen|chill|get that done
[Verbs]
key1=eat,drink,attack,notify,materialize,infuriate,immobilize,rip,dry,call,

run over,curse,break,smash,kiss,attract,plug 

in,stack,encounter,climb,clean,mistify,saturate,immerse,flick,part,pound,li

sten to,savor,emancipate,restorate,smell,wait for,visit,run down,pull 

out,wash,throw 

out,penetrate,repair,fix,catch,re-invent,bite,shove,cover,push,lick,taste,b

urn,pet,rate,rank
[Adjectives]
key1=rusty,crusty,crazy,angry,entertaining,hot,mad,mathematic,criminal,dead

ly,broken,lost,metalic,sharp,blue,frozen,telepathic,cultural,educational,sc

ientific,protruding,dumb,broken,red,purple,brainy,frantic,pulsating,vibrati

ng,tenderizing,brutal,asphyxiated,monumental,recreated,rejuvenated,methodic

al,multidimensional,catastrophical,running,precious,invincible,fruitful,par

amount,thirsty,primitive,prehistoric,complaining,voluptuous,pathetic,intole

rent,one sided
[Nouns]
key1=chili,grandma,arm,computer,keyboard,grandpa,cracker,soup,TV,cat,dog,la

mp,plant,light 

bulb,table,dad,mom,brother,sister,shoe,door,telephone,pants,window,DVD,Cale

ndar,keys,blow-up boat,moped,motorcycle,chimney,wall,door 

bell,sneakers,socks,yogurt,desk,money,calculator,present,gift,hair,ice 

cube,mail,frisbee,pizza,pet rock,toaster oven,french bread,wall 

socket,barber,princess,wheel,stick shift,paper house,champaign,cigar,clock 

hand,bicycle tire,faucet,nose hair trimmer,poker chip,ashtray,barbecue,bird 

house,laser printer,stick man,scrabble game,poinsettia,cane,trash 

compactor,dishwasher,blender,bus token,stamp collection,stapler,copy 

machine,toothbrush,dental floss,dentures,melted candle,toy 

box,telescope,microscope,glasses,canopy,diving board,jump rope,medicine 

cabinet,lawyer,goldfish,screen door,no vacancy sign,toilet,phone 

bill,camera,door knob,plexiglass window,battery charger,dictionary,paper 

bag,wooden box,candy dish,mushrooms,elevator,escalator,ladder,angel 

cake,hair dryer,PDA,remote control,pencil set,fire pit,window 

blinds,blueberry pie

REALLY went nutts

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

wow lol

but i cant test it! i need a compiled version. this comp doesnt have autoit installed.

whats the SET_QT function do?

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

wow lol

but i cant test it! i need a compiled version. this comp doesnt have autoit installed.

whats the SET_QT function do?

i put functions in to check my site for updates... i want to put thiss in my Toy BOX on the internet

( hope you are ok with that... after-all it was your idea)

But there is a lot there for you to use-remove-customize or use however you would like

8)

NEWHeader1.png

Link to comment
Share on other sites

@Valuater, Nice enhancement. Yes you did go crazy but the results are very nice.

BIG BUG: When trying to open your website, "www.XPCleanMenu.HostRocket.com", it get stuck into a loop and keeps opening IE browser windows. This is not a good thing.. :P

Missing file?

$Logo_icon = @TempDir & "\Toy-Icon.ico"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Toy-box-Icon.ico", $Logo_icon)
$Toy_Banner = @TempDir & "\Toy-banr.jpg"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Toy-box-jpg.jpg", $Toy_Banner)
$Sound_clk = @TempDir & "\Sound_clk.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Clickerx.wav", $Sound_clk)
$Sound_grp = @TempDir & "\Sound_grp.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Group_open.wav", $Sound_grp)
$Sound_bar = @TempDir & "\Sound_bar.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\xpinfbar.wav", $Sound_bar)
$Sound_lnk = @TempDir & "\Sound_lnk.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Notify.wav", $Sound_lnk)

@theguy0000, nice pointless script.. :mad2: Thanks for sharing..

Cheers.. ;)

Edited by busysignal
Link to comment
Share on other sites

oh ok, yeah that toybox thing is fine! anyay, im home now, i didnt expect to be back home so soon...anyway, ill try out ur script in a sec

Valuater - your script opened over 30 windows in IE and it would have done a lot more if i hadn't stopped it.

and, it will randomly show a blank verb.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

1

i have absolutely no idea why it would get stuck in a loop of opening IE. I cant seem to make mine do that same error here.... but i will change the code above to "RunWait" to replace the "Run"

2

the blank verb is usually due to spacing or an extra "," at the end of the string

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...