Jump to content

AdlibRegister including Sleep


Recommended Posts

2 hours ago, NewUser12 said:

Also it's important to have another programming language like C++ beside autoit ?

That depends on what you wish to achieve. If you're just starting to learn programming, then congratulations, AutoIt is an excellent place to start, not only because the language is easy to learn, but also because it has huge extension potential (meaning you can develop your skills in particular areas of application, for example, interacting with well-known applications, or communication between machines across a network, or database management, or developing simple GUI front-ends to hide the complexity of other software that runs under the hood, or explore the possibilities in WinAPI to control your system. Furthermore, I wouldn't recommend C++ to start learning how to program, as it is a very strict language (with many internal inconsistencies adn problems I won't go into here). But at some point, you may run into performance issues (for example, doing long calculations on large data sets) that force you to consider languages that produce faster executable code, and/or can interact more efficiently with your graphics card (e.g., for developing 3D games). At that point, C++ might be an option. What I do in this case is to develop a "dynamic link library" (extension .dll) in C++ and then call those functions from within an AutoIt script. That way, I can still use all the easy functionality of AutoIt (whipping up a working, decent-looking GUI in less than an hour) while gaining the extra performance/speed I need from the dll. In fact, there are loads of existing dlls on your own system already that you can interact with, once you've gained a little more experience (althoughI would suggest you don't start playing with dll calls until you're completely comfortable with the main AutoIt functions and UDFs).

2 hours ago, Jos said:

It is in general fair to assume you aren't the first one asking the questions and likely somebody already shared the answer somewhere on the internet so always try and search for the answer yourself.

I would agree with Jos up to a point. But if you stick with programming, eventually you're going to run into issues that have not yet been solved, or only on very different platforms (that don't necessarily port easily to an AutoIt environment). That's a good sign that you're ready to start developing new solutions of benefit to other people. You're already giving something back by interacting with the community through your questions, as the answers may help others that run into the same issues as you just have. But hopefully you'll eventually also be able to write excellent, conscise, clear code yourself that does stuff that others find useful, or from which they can learn from how to code better/differently. Check out the AutoIt Examples Scripts Forum for inspiration; I've been programming for over thirty years, and I'm still learning lots of new/interesting/cool stuff there.

Link to comment
Share on other sites

2 hours ago, NewUser12 said:

Building c++ gui like autoit is hard right ?

Yeah, don't do that unless you like to be tortured. My general advice is, acquire a large toolkit, and use the best one for each part of a job. Don't use a hammer when you really need tweezers.:D Building a professional-looking GUI is kid's play in AutoIt, with intuitive function names and tons of examples (plus a helpful forum). And GUIs are by nature user-interactive, so they spend most of their time idling, waiting for a user to press a button, make a selection, flip a switch, or finally make up their minds what they actually want. You don't need lightning speed for that, and the price you pay in maintaining a complex multi-include C++ code, tracking memory leaks, figuring out unhelpful, sometimes downright wrong error messages, or just trying to recreate the conditions of a HeisenBug is just not worth it (in my opinion). Which is not to say that valid cases don't exist where using C++ (or assembly, or something else maybe) is absolutely the way to go. But don't expect to run into those in your first few years of coding. When you start out, you'd gain more from understanding good coding practice (where to declare which variables, how and when to loop, how to apply conditionals, how to use arrays, how to break up large tasks most efficiently into smaller UDFs that rely on each other, how and when to use recursion), which is going to help you in most other programming languages as well, than wasting time struggling to get a C++ GUI to do what you want it to do, and which would have been a breeze to set up in AutoIt. AutoIt is a much better sandbox environment than C++ to figure these things out. As a kid, I originally started at the other end (assembly, even closer to the metal than C++), but that was like the joke of asking directions in Ireland and being told: "Well, you really don't want to start from here.";) And I'd be very surprised if you come up with a scenario for a GUI that AutoIt cannot handle (or approximate satisfactorily), and that would be more easily achieved in C++.

Edited by RTFC
Link to comment
Share on other sites

3 hours ago, RTFC said:

My general advice is, acquire a large toolkit, and use the best one for each part of a job.

Can't stress it enough, having a good toolkit (not necessarily large) is a very huge advantage! I learnt it the hard way while freelancing :).

Don't look for a language which can do EVERYTHING. Instead, look for languages which are the most simple for accomplishing specific tasks ;)

Edited by TheDcoder

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Java probably won't be much quicker, but  c++/# code can be significantly faster, true. But I think you're maybe missing the bigger picture, LerN. Speed is one consideration, but developing and maintaining a code involves many other aspects that may be equally or more important, e.g.:

  • ease and speed of development (using out-of-the box solutions)
  • language clarity, standard, documentation (just look at the confusion C++11 has caused)
  • facility of unit testing and debugging
  • code legibility, maintenance, extension
  • fun

Speaking from personal experience, there are times when I've invested heavily in a writing a C++ codebase from scratch (for example, to handle computations involving files >4GB, or to interface with the GPU using CUDA), but that took (me) many months of hard work (and hunting some of the nastiest, most elusive bugs I've ever seen). You have to weigh that extra speed gain you're expecting against this extra effort (= initial estimate x3?). So if you just want a snazzy GUI, its just not worth it in my book (unless as a pure learning experience). And even if you're handling large files, most operations can also be done in smaller chunks, maybe even multi-processed. It goes back to the toolset analogy; your hammer may be faster, but are you wiling to fork out the extra effort to wield it properly? That may depend on whether it's a one-off solution or something you're going to be using time and again for the foreseeable future. But there's no free lunch here, and faster may sound better, but has to be paid for elsewhere.;)

Link to comment
Share on other sites

Well every company now wanted the faster application with the best code ofc but why isn't autoit is an popular language like vb.net ? since vb.net likes autoit and both of them are easy,but i think in the future (for the technology at this time) i think autoit is not recommended why ? because everyone wanted the fastest thing :/
 i have started with autoit as a simple programming language but it's very very very complicated to build gui in c++ but at least in autoit there's no classes there's no inline assembly (UDF's of assembly is shit) and many things ... 
I guess start with autoit but don't make it your favourite programming language ... also programming language is like tools for example if u wanted to code an small application then do it in autoit since in this point autoit will do the same as c++ but u want to make a game ? can you do it in autoit ? the answer is no.
But as i said programming languages is like tools every language is made for something special but the question here is why autoit isnot a popular language ?  

Edited by LerN
Link to comment
Share on other sites

Popularity seems to me an odd criterion to determine a programming language's suitability for a particular job.

The mainstream is the muddiest part of the river.;)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...