poisonkiller Posted June 5, 2007 Share Posted June 5, 2007 Today I was bored and was reading some topics on another forum. I found two topics, where you had to find your name letters and then you could translate your name to Japanese or you could find your own description. So I decided to make a script of them: expandcollapse popup#include <GuiConstants.au3> Dim $conv_name = "" $choose = GuiCreate("Choose...", 190, 116,-1, -1) $japanese = GuiCtrlCreateButton("Japanese name", 10, 10, 170, 40) $descript = GuiCtrlCreateButton("Your description", 10, 60, 170, 40) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $japanese JapaneseConverter() Case $msg = $descript Description() Case Else ;;; EndSelect WEnd Func JapaneseConverter() GUIDelete($choose) GuiCreate("Japanese name convertor", 257, 104,-1, -1) GuiCtrlCreateLabel("Your name:", 10, 13, 60, 20) $name1 = GuiCtrlCreateInput("", 70, 10, 180, 20) $name2 = GuiCtrlCreateLabel("Your Japanese name is: ", 10, 70, 250, 20) $jap = GuiCtrlCreateButton("Convert to Japanese", 60, 40, 120, 20) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $jap If StringInStr(GUICtrlRead($name1), "1") or StringInStr(GUICtrlRead($name1), "2") or StringInStr(GUICtrlRead($name1), "3") _ or StringInStr(GUICtrlRead($name1), "4") or StringInStr(GUICtrlRead($name1), "5") or StringInStr(GUICtrlRead($name1), "6") _ or StringInStr(GUICtrlRead($name1), "7") or StringInStr(GUICtrlRead($name1), "8") or StringInStr(GUICtrlRead($name1), "9") Then MsgBox(16, "Error", "Error! Name cannot include digits.") Else $conv = ConvertToJap(GUICtrlRead($name1)) $conv_name = "" GuiCtrlSetData($name2, "Your Japanese name is: " & $conv) EndIf Case Else ;;; EndSelect WEnd Exit EndFunc Func Description() GUIDelete($choose) GuiCreate("Description", 249, 200,-1, -1) GuiCtrlCreateLabel("Your name:", 10, 13, 60, 20) $name1 = GuiCtrlCreateInput("", 70, 10, 170, 20) $describe = GuiCtrlCreateButton("Describe", 70, 40, 100, 30) $label = GuiCtrlCreateLabel("Your description is: ", 10, 80, 220, 160) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $describe If StringInStr(GUICtrlRead($name1), "1") or StringInStr(GUICtrlRead($name1), "2") or StringInStr(GUICtrlRead($name1), "3") _ or StringInStr(GUICtrlRead($name1), "4") or StringInStr(GUICtrlRead($name1), "5") or StringInStr(GUICtrlRead($name1), "6") _ or StringInStr(GUICtrlRead($name1), "7") or StringInStr(GUICtrlRead($name1), "8") or StringInStr(GUICtrlRead($name1), "9") Then MsgBox(16, "Error", "Error! Name cannot include digits.") Else $save = Describe(StringLower(GuiCtrlRead($name1))) GuiCtrlSetData($label, "Your description is: " & $save) EndIf Case Else ;;; EndSelect WEnd Exit EndFunc Func Describe($eng_name) Dim $save = "" If StringInStr($eng_name, "a") Then $save &= "You like to drink. " If StringInStr($eng_name, "b") Then $save &= "Everyone wants you. " If StringInStr($eng_name, "c") Then $save &= "You are really silly. " If StringInStr($eng_name, "d") Then $save &= "You love to drink. " If StringInStr($eng_name, "e") Then $save &= "Damn good kisser. " If StringInStr($eng_name, "f") Then $save &= "You are dead sexy. " If StringInStr($eng_name, "g") Then $save &= "You never let people tell you what to do. " If StringInStr($eng_name, "h") Then $save &= "You have a very good personality and looks. " If StringInStr($eng_name, "i") Then $save &= "You are great in bed. " If StringInStr($eng_name, "j") Then $save &= "People adore you! " If StringInStr($eng_name, "k") Then $save &= "You're wild and crazy. " If StringInStr($eng_name, "l") Then $save &= "Everyone loves you. " If StringInStr($eng_name, "m") Then $save &= "Best kisser ever. " If StringInStr($eng_name, "n") Then $save &= "You like to smoke. " If StringInStr($eng_name, "o") Then $save &= "Awesome kisser. " If StringInStr($eng_name, "p") Then $save &= "You are popular with all types of people. " If StringInStr($eng_name, "q") Then $save &= "You are a hypocrite. " If StringInStr($eng_name, "r") Then $save &= "Fuckin crazy. " If StringInStr($eng_name, "s") Then $save &= "Easy to fall in love with. " If StringInStr($eng_name, "t") Then $save &= "You're loyal to those you love. " If StringInStr($eng_name, "u") Then $save &= "You really like to chill. " If StringInStr($eng_name, "v") Then $save &= "You are not judgmental. " If StringInStr($eng_name, "w") Then $save &= "You are very broad minded. " If StringInStr($eng_name, "x") Then $save &= "You never let people tell you what to do. " If StringInStr($eng_name, "y") Then $save &= "Best g/f b/f anyone could ever ask for. " If StringInStr($eng_name, "z") Then $save &= "Always ready. " Return StringTrimRight($save, 1) EndFunc Func ConvertToJap($eng_name) $eng_name = StringLower($eng_name) $split_space = StringSplit($eng_name, " ") For $u = 1 to $split_space[0] step 1 $split_name = StringSplit($split_space[$u], "") For $i = 1 to $split_name[0] If StringInStr($split_name[$i], "a") Then $conv_name &= StringReplace($split_name[$i], "a", "ka") EndIf If StringInStr($split_name[$i], "b") Then $conv_name &= StringReplace($split_name[$i], "b", "tu") EndIf If StringInStr($split_name[$i], "c") Then $conv_name &= StringReplace($split_name[$i], "c", "mi") EndIf If StringInStr($split_name[$i], "d") Then $conv_name &= StringReplace($split_name[$i], "d", "te") EndIf If StringInStr($split_name[$i], "e") Then $conv_name &= StringReplace($split_name[$i], "e", "ku") EndIf If StringInStr($split_name[$i], "f") Then $conv_name &= StringReplace($split_name[$i], "f", "lu") EndIf If StringInStr($split_name[$i], "g") Then $conv_name &= StringReplace($split_name[$i], "g", "ji") EndIf If StringInStr($split_name[$i], "h") Then $conv_name &= StringReplace($split_name[$i], "h", "ri") EndIf If StringInStr($split_name[$i], "i") Then $conv_name &= StringReplace($split_name[$i], "i", "ki") EndIf If StringInStr($split_name[$i], "j") Then $conv_name &= StringReplace($split_name[$i], "j", "zu") EndIf If StringInStr($split_name[$i], "k") Then $conv_name &= StringReplace($split_name[$i], "k", "me") EndIf If StringInStr($split_name[$i], "l") Then $conv_name &= StringReplace($split_name[$i], "l", "ta") EndIf If StringInStr($split_name[$i], "m") Then $conv_name &= StringReplace($split_name[$i], "m", "rin") EndIf If StringInStr($split_name[$i], "n") Then $conv_name &= StringReplace($split_name[$i], "n", "to") EndIf If StringInStr($split_name[$i], "o") Then $conv_name &= StringReplace($split_name[$i], "o", "mo") EndIf If StringInStr($split_name[$i], "p") Then $conv_name &= StringReplace($split_name[$i], "p", "no") EndIf If StringInStr($split_name[$i], "q") Then $conv_name &= StringReplace($split_name[$i], "q", "ke") EndIf If StringInStr($split_name[$i], "r") Then $conv_name &= StringReplace($split_name[$i], "r", "shi") EndIf If StringInStr($split_name[$i], "s") Then $conv_name &= StringReplace($split_name[$i], "s", "ari") EndIf If StringInStr($split_name[$i], "t") Then $conv_name &= StringReplace($split_name[$i], "t", "chi") EndIf If StringInStr($split_name[$i], "u") Then $conv_name &= StringReplace($split_name[$i], "u", "do") EndIf If StringInStr($split_name[$i], "v") Then $conv_name &= StringReplace($split_name[$i], "v", "ru") EndIf If StringInStr($split_name[$i], "w") Then $conv_name &= StringReplace($split_name[$i], "w", "mei") EndIf If StringInStr($split_name[$i], "x") Then $conv_name &= StringReplace($split_name[$i], "x", "na") EndIf If StringInStr($split_name[$i], "y") Then $conv_name &= StringReplace($split_name[$i], "y", "fu") EndIf If StringInStr($split_name[$i], "z") Then $conv_name &= StringReplace($split_name[$i], "z", "zi") EndIf Next $conv_name &= " " Next $last_split = StringSplit($conv_name, " ") $conv_name = "" For $s = 1 to $last_split[0] $conv_name &= StringUpper(StringLeft($last_split[$s], 1)) & StringTrimLeft($last_split[$s], 1) & " " Next $split_name = "" $split_space = "" $eng_name = "" Return StringTrimRight($conv_name, 2) EndFunc Link to comment Share on other sites More sharing options...
smstroble Posted June 5, 2007 Share Posted June 5, 2007 (edited) Interesting, it would be neat if you could get this to work phonetically (Japanese translate foreign words to the closet they can get phonetically and still be able to spell it out with Japaneses characters (Hiragana and Katakana, Katakana is used for foreign words). For instance bob would be bobu (pronounced boobu).Found this site, seems to do a good job translating names to Japanese, http://japanesetranslator.co.uk/your-name-...bob&style=3. Edited June 5, 2007 by smstroble MUHAHAHAHAHA Link to comment Share on other sites More sharing options...
gseller Posted June 8, 2007 Share Posted June 8, 2007 Very Cool Code, I agree with smstroble translating on the fly would be nice.. Link to comment Share on other sites More sharing options...
James Posted June 8, 2007 Share Posted June 8, 2007 Yeah, and you could defintley get some fonts of something like font101.com or whatever it was. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now