Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Tue Nov 13, 2018 3:56 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: translate plugin
Thanked: 2 time(s)  Unread post Posted: Tue Aug 14, 2012 11:51 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Tue Nov 23, 2010 10:51 am
Posts: 212
Location: Pandora
Been thanked: 97 time(s)
Has thanked: 66 time(s)
Contribution Points: 8643
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 here

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

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
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: translate plugin
Thanked: 0 time(s)  Unread post Posted: Mon Aug 20, 2012 10:29 pm 
New User
New User



Joined: Mon May 28, 2012 5:42 pm
Posts: 14
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 37
It worked here, nice post!


Top
 Profile  
Reply with quote  
 Post subject: Re: translate plugin
Thanked: 1 time(s)  Unread post Posted: Tue Aug 21, 2012 2:36 am 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Mon Sep 26, 2011 9:38 am
Posts: 1702
Location: Space Australia
Been thanked: 78 time(s)
Has thanked: 6 time(s)
Contribution Points: 9991
Nice one sickslug if i combine this with your ocr plugin and fiddle around with some stuff i may get a gui translater for games... And if not i could at least translate chat for international servers... Spanish EE here i come XD

_________________
ImageImageImageImage
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: translate plugin
Thanked: 0 time(s)  Unread post Posted: Tue Aug 21, 2012 10:14 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Tue Nov 23, 2010 10:51 am
Posts: 212
Location: Pandora
Been thanked: 97 time(s)
Has thanked: 66 time(s)
Contribution Points: 8643
the static parts of a gui (target name, chatbox, party member names, map location, quest objectives) shouldn't be a problem - you can also make something that scans within a distance of your cursor if there's something dynamic like a popup or quest window... now you can try the text-over-windows plugin to project translations over the game window too

keep in mind that this plugin is a hack of a translate service - it's not necessarily going to work in a week or a year unfortunately


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group