i decided this little plugin needed its own thread it may work for a day or a year, there's no telling since it depends on a web service. Code: Plugins.translate (English)("input", "default response", "output variable") get all sickslug plugins herehere's a macro that will change the clipboard contents to English! helpful for non-English types posting to forum Code: begin // set trigger to "{<ctrl>}c" for automagic translating Macro.Pause("100") Clipboard.Get text("input") Plugins.translate (English)("{input}", "nothing found", "input") if Variable.Is not equal to("input", "nothing found") begin Clipboard.Set text("{input}") Speech.Say("Success", "no") end if Macro.Previous criteria was not met() begin Speech.Say("Failed", "no") end end translates using a dialog Code: begin Variable.Set("count", "1") Variable.Set("loops", "3") begin loop("{loops}") Variable.Evaluate (Text)("Loop {count} of {loops}", "loop") Variable.Append line("loop", "Enter something that's not English:") Window.Request user text input("{loop}", "input") Plugins.translate (English)("{input}", "nothing", "reply") if Variable.Is not equal to("reply", "nothing") begin Window.Display message box("{reply}", "Yes") end if Variable.Is equal to("reply", "nothing") begin Window.Display message box("Nothing found.", "Yes") end Variable.Increment (Math)("count") end end and the unlocked version:Code: Plugins.translate (Unlocked)("input", "default response", "output variable", "input language", "output language") this will change clipboard contents to a few common languages Code: begin // set trigger to "{<ctrl>}c" for automagic translating Macro.Pause("100") Clipboard.Get text("input") Variable.Set("output", "{input}") Function.Execute setting 2 variables("go", "lang", "es", "langText", "Español") Function.Execute setting 2 variables("go", "lang", "fr", "langText", "French") Function.Execute setting 2 variables("go", "lang", "it", "langText", "Italian") Clipboard.Set text("{output}") end
function("go") begin Plugins.translate (Unlocked)("{input}", "nothing found", "lang", "any", "{lang}") if Variable.Is not equal to("lang", "nothing found") begin Variable.Append line("output", "{langText}") Variable.Evaluate (Text)("{output}: {lang}", "output") end end function
i decided this little plugin needed its own thread :)
it may work for a day or a year, there's no telling since it depends on a web service.[code]Plugins.translate (English)("input", "default response", "output variable")[/code][size=150]get all sickslug plugins [url=http://www.blueeye-macro.com/viewtopic.php?p=39270#p39270]here[/url][/size]
here's a macro that will change the clipboard contents to English! helpful for non-English types posting to forum 8-) [code] begin // set trigger to "{<ctrl>}c" for automagic translating Macro.Pause("100") Clipboard.Get text("input") Plugins.translate (English)("{input}", "nothing found", "input") if Variable.Is not equal to("input", "nothing found") begin Clipboard.Set text("{input}") Speech.Say("Success", "no") end if Macro.Previous criteria was not met() begin Speech.Say("Failed", "no") end end[/code] translates using a dialog[code] begin Variable.Set("count", "1") Variable.Set("loops", "3") begin loop("{loops}") Variable.Evaluate (Text)("Loop {count} of {loops}", "loop") Variable.Append line("loop", "Enter something that's not English:") Window.Request user text input("{loop}", "input") Plugins.translate (English)("{input}", "nothing", "reply") if Variable.Is not equal to("reply", "nothing") begin Window.Display message box("{reply}", "Yes") end if Variable.Is equal to("reply", "nothing") begin Window.Display message box("Nothing found.", "Yes") end Variable.Increment (Math)("count") end end[/code][size=150] and the unlocked version:[/size][code]Plugins.translate (Unlocked)("input", "default response", "output variable", "input language", "output language")[/code]this will change clipboard contents to a few common languages[code] begin // set trigger to "{<ctrl>}c" for automagic translating Macro.Pause("100") Clipboard.Get text("input") Variable.Set("output", "{input}") Function.Execute setting 2 variables("go", "lang", "es", "langText", "Español") Function.Execute setting 2 variables("go", "lang", "fr", "langText", "French") Function.Execute setting 2 variables("go", "lang", "it", "langText", "Italian") Clipboard.Set text("{output}") end
function("go") begin Plugins.translate (Unlocked)("{input}", "nothing found", "lang", "any", "{lang}") if Variable.Is not equal to("lang", "nothing found") begin Variable.Append line("output", "{langText}") Variable.Evaluate (Text)("{output}: {lang}", "output") end end function[/code][img]http://www.paulballard.net/index_files/enjoy.png[/img]
|