patforkin Posted March 8, 2011 Posted March 8, 2011 Hallo! I realised, as I visited the AutoIT site yesterday, that AutoIT has a BASIC language programming capability. To be able to assess its suitability, I would like to ask experienced users if it can be used to automate the following tasks. 1. Count words in a string? 2. Re-sequence words in a sentence? 3. Tag words with "start and end tags"? 4. Build a simple table dictionary? If it can, does anyone know of the existence of scripts to perform these tasks? I hope to hear. Regards patforkin.
water Posted March 8, 2011 Posted March 8, 2011 Welcome to AutoIt and the forum! To answer your questions: 1. Use StringSplit to split a string into substrings. The resulting array contains the number of substrings (words) in element 0 2. Could you please be a bit more specific? What do you want to do? Do you have an example? 3. Could you please be a bit more specific? What do you want to do? Do you have an example? 4. What do you want to do with the dictionary? Based on the answer the sulation can be selected My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
patforkin Posted March 8, 2011 Author Posted March 8, 2011 Welcome to AutoIt and the forum!To answer your questions:1. Use StringSplit to split a string into substrings. The resulting array contains the number of substrings (words) in element 02. Could you please be a bit more specific? What do you want to do? Do you have an example?3. Could you please be a bit more specific? What do you want to do? Do you have an example?4. What do you want to do with the dictionary? Based on the answer the sulation can be selected
patforkin Posted March 8, 2011 Author Posted March 8, 2011 Hallo! First let me thank you for the prompt response. I have built an operational translation model to translate texts I have written in English into German. Some of the tasks I would like to automate to improve performance. The steps to automate are. 1. Counting words in sentences. 2. Breaking sentences into their Engliah main clauses and predicates and then counting the words in each. 3. Segmenting the clauses into phrases. 4. Resequincing the English phrases into the German word and phrase order. 5. Tagging the phrases with opening and closing tags to be able to translate correctly. The translation dictionary I am building. All of the above steps are, rule driven, though thy are manually performed. Incidentally the model is being published in two eBook versions. Does that explain what I would like to do? I hope so and hope to hear again from you. Kind regards, patforkin.
jvanegmond Posted March 8, 2011 Posted March 8, 2011 (edited) First of all, let me state that AutoIt can do it. You can freely consider AutoIt a full blown programming language, that can do anything within reasonable expectations. Having said that AutoIt can do it, you probably want to know if it is a good idea to develop this program in AutoIt. None of us can determine that it is the best tool for the job, because that depends on a lot of different factors to which it is sometimes very hard to gain insights into. On top of that, you've given us hardly any insights to work with.Here are a few factors that affect the process of choosing the correct programming language:Your own experience with various programming languages. Whether or not you're familiar with AutoIt and concepts used in AutoIt. Let me state this more simply as "the learning curve" caused by the language.Your own experience with developing software. Determining requirements and scope is hard and they are a completely different discipline than syntax and paradigm.What exactly the requirements are of your project. (This doesn't mean much but you will have to determine to-be-used languages based on all the requirements.)The scope of your project. This is an important one. Provided that you know the scope of your project (which is hard to determine without experience) you will have to choose a good programming language. I'd say that AutoIt is best used for projects under 1000 LoC, and anything above that is likely to take greater benefit of another language.If you have come to AutoIt because it is an excellent tool for "automation", then I must disappoint you. Every programming language is an excellent tool for automation but AutoIt is specifically for automation of Windows tasks such as the ones that a system administrator would be performing. Edited March 8, 2011 by Manadar github.com/jvanegmond
water Posted March 8, 2011 Posted March 8, 2011 I think everything can be done with AutoIt. What might be an issue is performance. A lot of processing needs to be done to translate a sentence from one language into another. If you try to translate more text the best performing way to do that has to be selected.AutoIt offers arrays, regular expressions, matrix processing and integration with Windows objects like Scripting.Dictionary etc.I know nothing about what you try to do. So I can't help you to select the best method. Maybe someone with more exterise than me can point you into the rigth direction. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
patforkin Posted March 17, 2011 Author Posted March 17, 2011 First of all, let me state that AutoIt can do it. You can freely consider AutoIt a full blown programming language, that can do anything within reasonable expectations. Having said that AutoIt can do it, you probably want to know if it is a good idea to develop this program in AutoIt. None of us can determine that it is the best tool for the job, because that depends on a lot of different factors to which it is sometimes very hard to gain insights into. On top of that, you've given us hardly any insights to work with.Here are a few factors that affect the process of choosing the correct programming language:Your own experience with various programming languages. Whether or not you're familiar with AutoIt and concepts used in AutoIt. Let me state this more simply as "the learning curve" caused by the language.Your own experience with developing software. Determining requirements and scope is hard and they are a completely different discipline than syntax and paradigm.What exactly the requirements are of your project. (This doesn't mean much but you will have to determine to-be-used languages based on all the requirements.)The scope of your project. This is an important one. Provided that you know the scope of your project (which is hard to determine without experience) you will have to choose a good programming language. I'd say that AutoIt is best used for projects under 1000 LoC, and anything above that is likely to take greater benefit of another language.If you have come to AutoIt because it is an excellent tool for "automation", then I must disappoint you. Every programming language is an excellent tool for automation but AutoIt is specifically for automation of Windows tasks such as the ones that a system administrator would be performing.
patforkin Posted March 17, 2011 Author Posted March 17, 2011 Hallo! My first thoughts on how to develop the translation model were to try and create, with a good text editor, the idea of a workspace in which all of the steps could be managed. I have used jEdit, and it meets many of my expectations. I wanted to avoid having to try and program, since I am a writer and not a programmer. The model is sufficiently stable in its current form for me to announce an eBook describing it. This I am doing. This version is a model to translate phrases in the English sentences into German. I nonetheless am working on two further versions. The next version will make use of the programming language called AWK. I like the concept of treating sentences as records and the words as fields within those records. I have come across a tool called AWKGUI. It can be download from http://sites.google.com/site/jackparke/awkgui. It is too limited to be really usable; The concept is however useful. I would like to ask if any have seen it and what they think of it? It makes AWK seem easier than the standard version for MS-Win under cygwin. Any interest? Any ideas? Regards patforkin.
Zedna Posted March 17, 2011 Posted March 17, 2011 Definitely look at Regular Expressions.I think it's the best way for you to do your translations tasks. Resources UDF ResourcesEx UDF AutoIt Forum Search
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