Jump to content

program builder

Active Members
  • Posts

    140
  • Joined

  • Last visited

Everything posted by program builder

  1. I would like to write code into an exe file after it has been compiled, using that same exe file, to write all of the code. I am building a chat bot, and the way it works now is, whenever you ask it a question it says lol, then askes you the same question that you asked it. Then when you answer it, it responds back with your answer. What I would like it to do, is when you have already gave the answer, it responds back with your answer, whenever question is typed. I am going to though some random answers in there, like it won't agree with you every time. I know how to do that. But what I would like it to do, is, whenever it chooses an answer it sticks to it and doesn't change it's mind every time the statment or question is asked. then the next time it is typed, it would answer back with the same answer, instead of always changing it's mind every time. if I could get the chatbot to write text into its own file, I could do this. can anybody help? I would like to do it in exe but if not, I'll have to use .au3 thanks.
  2. ;I tryed this, but it didn't work. I tryed it with txt ;I put 2 text files into the text 1 and tryed to copy and ;past them into the text 2 folder ;here is the code I used $sCopyFrom = "C:\program files\text 1\" $sCopyTo = "C:\program files\text 2\" $hSearch = FileFindFirstFile($sCopyFrom & "*.txt") If $hSearch <> -1 Then While 1 $sFile = FileFindNextFile($hSearch) If @Error Then ExitLoop If StringInStr(FileGetAttrib($sCopyFrom & $sFile), "D") Then DirCopy($sCopyFrom & $sFile, $sCopyTo & $sFile) Else FileCopy($sCopyFrom & $sFile, $sCopyTo & $sFile) EndIf WEnd EndIf ;could someone tell me why it isn't working, when I run it?
  3. I am trying to take all of the mp3 files from one folder, and put them in another would this work. $programfiles = ("c:/program files/ copyall ".mp3") $programfilesmusic = ("c:/program files/music/ pastall ".mp3") $copy = $programfiles $past = $programfilesmusic copyfile(($copy)) pastfile(($past)) I know this isn't the right code. But does anybody see what I am wanting to do?
  4. I am looking for autoit script, that will copy and paste files from a folder into another folder. Does anyone have a script for this?
  5. I am looking for autoit script, that will copy and paste files from a folder into another folder. Does anyone have a script for this?
  6. Is it possible, to make available text choises apear as you type them into an input box, then choose it, before everything is typed out, kinda like google does. like lets say if you build it to where if you type hello how are you doing today it will say back to you i am doing ok. how about yourself? I want to make a chatbot, so when the people start to type out what they want to say to it, or ask it, they can click on the words as they come up, and pick what comes the clossest to what they want to say. is their anyway to do this, inside an inputbox? please help if you can.
  7. thank you both for the help. that was funny. i don't know about sertain time, but it can be done in a certain time. lol
  8. Is it possible, for a script in autoit, to open files at a sertain time. Example, when it becomes 1:38 P.M. it turns on? I searched for it in the help file, and have been searching the forums for an hour. Someone please help, if you can.
  9. ;Does anybody know why the script below isn't working? I am trying to get it to work with numbers. $C1=StringSplit("A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v |w|x|y|z|0|1|2|3|4|5|6|7|8|9 .!?,","") $C2=StringSplit("1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35 |36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|.|!|?|,","") $Input=InputBox ("EasyCoder","Please enter text to be Encoded\Decoded") If @Error=1 Then Exit $Text=StringSplit($Input,"") Dim $NewText For $CurrentPos=1 to $Text[0] $Char=$Text[$CurrentPos] $CharPos=ArraySearch ($C1,$Char) If $CharPos="X" then ContinueLoop $NewChar=$C2[$CharPos] $NewText=$NewText & $NewChar Next ClipPut ($NewText) MsgBox (0,"EasyCoder",$NewText) Func ArraySearch ($Array,$What2Find) For $X=1 to $Array[0] If $Array[$X]==$What2Find then Return $X Next Return "X" EndFunc
  10. ;I need a standard size input box, the size that is in the autoit examples. and I also need it to where it uses numbers for codes. and I do not need a passcode. ;does anybody know how I can turn this into what I want to do? like I said, decodes with numbers. $C1=StringSplit("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 .!?,","") $C2=StringSplit("ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba9876543210 .!?,","") $Input=InputBox ("EasyCoder","Please enter text to be Encoded\Decoded") If @Error=1 Then Exit $Text=StringSplit($Input,"") Dim $NewText For $CurrentPos=1 to $Text[0] $Char=$Text[$CurrentPos] $CharPos=ArraySearch ($C1,$Char) If $CharPos="X" then ContinueLoop $NewChar=$C2[$CharPos] $NewText=$NewText & $NewChar Next ClipPut ($NewText) MsgBox (0,"EasyCoder",$NewText) Func ArraySearch ($Array,$What2Find) For $X=1 to $Array[0] If $Array[$X]==$What2Find then Return $X Next Return "X" EndFunc
  11. A message decoder, that if I type a string of characters into an input box, and press enter; it will give numbers in a messagebox, that needs to be typed inorder to view the characters in a messagebox again that were acually typed. like 456378 = A 59876089 = B ext. with maybe a dot to seperate numbers 456378.59876089 if anybody can help please let me know.
  12. ;How would I change the code below to whenever I type in who+any other caracters it still sends the message that gets sent if you type just who? #include <WindowsConstants.au3> #include <EditConstants.au3> #include <GUIConstants.au3> #include <Array.au3> #include <Misc.au3> Global $BrainBank = @ScriptDir & '\brain\bw.ini' Global $Brain[10] $Brain[0] = "Hello" $Brain[1] = @UserName $Brain[2] = "Goodbye" $Brain[3] = "How are you, " & $Brain[1] & "?" $Brain[4] = "I am" $Brain[5] = "How have you been?" $Brain[6] = "I have been" $Brain[7] = "Please" $Brain[8] = "Thankyou" $Brain[9] = "What have you been upto?" Global $Active[3] $Active[0] = "Not alot" $Active[1] = "I have been doing some random things!" $Active[2] = "Nothing. I have been so bored!" Global $Emotion[6] $Emotion[0] = "bad" $Emotion[1] = "OK" $Emotion[2] = "medioka" $Emotion[3] = "great" $Emotion[4] = "not too good" $Emotion[5] = "brilliant" $GUI = GUICreate("AutoChat Bot :: James Brooks", 458, 330, -1, -1) GUISetBkColor(0xC0DCC0) $ChatText = GUICtrlCreateEdit("", 0, 0, 457, 297, BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL)) $ChatInput = GUICtrlCreateInput("", 0, 304, 369, 21) $Send = GUICtrlCreateButton("&Send", 376, 304, 81, 25, 0) GUICtrlSetState($ChatInput,$GUI_FOCUS) ; AUTOMATICALLY FOCUSSES ON THE INPUT GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE ExitLoop Case $Send, $ChatInput ; PRESS ENTER WHILE IN THE INPUT BOX TO SEND THE MESSAGE $string = StringSplit(GuiCtrlRead($ChatInput), Chr(44)) Switch $String[1] Case "Hey", "Hi", "hi dude", "Hello" _WriteBack("Hello, " & @Username) GuiCtrlSetData($ChatInput, "") Case "How are you?" $Random = Random(0, UBound($Emotion)-1, 1) $Result = $Emotion[$Random] _WriteBack($Brain[4] & " " & $Result & ". What about yourself?") GuiCtrlSetData($ChatInput, "") Case "What have you been up to?", "What you upto?" $Random1 = Random(0, UBound($Active)-1, 1) $Result1 = $Active[$Random1] _WriteBack($Brain[6] & " " & $Result1 & $Brain[9]) GuiCtrlSetData($ChatInput, "") Case "I am not too good!", "I am not good" _WriteBack("How come?") GuiCtrlSetData($ChatInput, "") Case "I cannot tell you!", "I dont want to say!" _WriteBack("OK, but you just remember I cannot tell anyone else!") GuiCtrlSetData($ChatInput, "") Case "who", "", "", "" _WriteBack("I don't know who, but I will tell you if I ever learn., " & @Username) GuiCtrlSetData($ChatInput, "") Case Else _WriteBack("Why?") GuiCtrlSetData($ChatInput, "") EndSwitch EndSwitch WEnd Func _Brain() $DataRead = GuiCtrlRead($ChatInput) EndFunc Func _AddWord() $NewWord = InputBox("AutoChat Bot", "Please enter a new word for Dillan's brain:") $NewReply = InputBox("AutoChat Bot", "Please enter a reply for, " & $NewWord) IniWrite($BrainBank, "Words", $NewWord, $NewWord) IniWrite($BrainBank, "Reply", $NewReply, $NewReply) _WriteBack($NewWord & " " & $NewReply & " have been successfully added to brain") EndFunc Func _WriteBack($text) GUICtrlSetData($ChatText, $text & @crlf, GUICtrlRead($ChatInput)) EndFunc
  13. ;This should work. HotKeySet( "{enter}", "_enter") while 1 sleep(999999) wend Func _enter () send("{lwindown}{enter}{lwinup}") shellexecute("cmd") EndFunc;==>_Open ;if you dont want enter to work take out ;this line, send("{lwindown}{enter}{lwinup}")
  14. Could someone please show me how to, read the text and use stringinstr(). Then use switch-case for the situations. I don't know the code. could someone write it, and post it here, if it wouldn't take them much time?
  15. How would I do that could you write the script, if it is simple, and wouldn't take much time.
  16. I relise it is inpossible to include every combination of words, that someone can type and thats what would need to be done, inorder to create a chat bot, that sounds total human like. However I know of a way to make one, that wouldn't sound total human like, but it could possibly get resonably close in a way. Ok here is what I need to do. I need to come up with something sort of a program, like this if "i watched" was typed send MsgBox(4096, "Instant Message", "was it good") endif if "i liked" was typed send MsgBox(4096, "Instant Message", "I liked that too.") endif and abunch of other ones. I know this isn't proper code, but I think you get the picture. I need it to where if they typed I saw a movie last night, it would still send message MsgBox(4096, "Instant Message", "was it good") and i want to create all of the most popular ways that someone can start a saying and the most popular comment to repond back with. I could do that, if I just new how to do make it do what i mentioned above. thanks. can someone please help.
  17. it is not working. What I am trying to do, is create a web-browser, where you can view pages that people create without any form of connection whatsoever. So what I am going to do is put every word in the english dictionary, as well as every persons first name and last name, numbered 1 through whatever example 1 aardvark 2 ext 3 another name and then people can create a website, and the numbers will be the address to get to it. I would like to also put about 50,000 sayings into it, so that it will shortan the address, and i would like to be able to turn the address into like 123.456.789. if you get the picture. thanks for helping. And if you know of a simpler way to do this please let me know. I am going to probably find a list of english words online, and then find a program out there that will number each one of them. like number one on line 1 number 2 on line three, ext, ext. if any of you would want to help me create this, I will start a chat about it, so please let me know.
  18. I don't want to do counttoline or filewritetoline because every time i tryed to add that same word again, it would probibly just copy over its own word, and not even put it as the next word.
  19. Sorry, but i found out it's not going to work. every time I try to put a new word into the html with this code, it copies over what was just written. I need it to put words in, every time I use it, not copy over each thing I say, and only have one word in the html file. Is there another code, that would work?
  20. That worked; thank you for helping me out.
  21. WhatToFind? is there any way that i can tell it to just write the intire next line? what I am trying to do is make it to where I don't have to add all the words to the program. if i can just add numbers to the program, I can do it alot faster.
  22. Lets say I have a notpad that has this written in it 1 note pad saying number one 2 notepad sayig number 2 is there anyway i can write a code that says something like open("file.text") find("1") nextline = ("copy") close("file.text") filewrite("file.html/paste") and get the words written in the text file to go into the new html document? obvourse that wouldn't be the accaul code, but is there any way to do it?
×
×
  • Create New...