Alexxander Posted July 9, 2013 Share Posted July 9, 2013 Hi all i want to make a auto it script that detect a language of a place on the screen, (maybe i make it copy a part of the text and user google translate to detect language ?) i want it to detect one language (English) i don't want the characters i only want it to detect if the language is English or not i an new to Autoit and my knowledge is so limited can any one put me in the direct way ? Link to comment Share on other sites More sharing options...
water Posted July 9, 2013 Share Posted July 9, 2013 What do you mean by "of a place on the screen"? Can you post a screenshot? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Alexxander Posted July 9, 2013 Author Share Posted July 9, 2013 (edited) What do you mean by "of a place on the screen"? Can you post a screenshot? when the user select the place that he want to type in ex: (input box in a browser) the script scan the words that is up the input box then detect if it is English or not Edited July 9, 2013 by alexander95 Link to comment Share on other sites More sharing options...
water Posted July 9, 2013 Share Posted July 9, 2013 Search Google for something like this "determine language of text visual basic". If you find a solution this shouldn't be too hard to translate to AutoIt. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
abberration Posted July 9, 2013 Share Posted July 9, 2013 Just out of curiosity, I looked and the Google Translate API is not free. Assuming you want to do this for free, here's my suggestion... Perhaps you can create an array of the words in your block of text and check them against a list of the 100 most common English words (lots of websites list them). From that, you can calculate a percentage of probability that the language is English. The larger section of text you use, the more accurate your results would be. Also, you can use website domain filters to help figure it out. Example: websites that end in foreign country extensions are probably less likely to be in English. .de = German, .it = Italian, .hk = Hong Kong, etc. Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
water Posted July 9, 2013 Share Posted July 9, 2013 A few ideas I have seen on the net: Each language has a few words that are extremely common, such as "the", "a", "an", "of", "for" in English. You could look for the 5 or 10 most common words. A good place to start is https://en.wiktionary.org/wiki/Wiktionary:Frequency_lists Have a look at the characters used: umlauts or the ss/beta character appear in German and acute or grave accents in French. This looks somehow interesting too My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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