-
Posts
7,103 -
Joined
-
Days Won
88
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by TheDcoder
-
It has been more than a month since the last post in this thread and I did not manage to start working on the reference script until now... I blame the many things that I am try to balance in my schedule, which includes gaming on my new PS4 and watching a ton of YouTube when I am not working Anyway, I finally made a very basic reference script covering comments and variables, this should be enough to get me started: #cs This is a simple reference script which aims to include every possible combination of AutoIt Syntax As a matter of fact, we are demonstrating multi-line comments now! #ce #Region Comments ; == Single-line ; This is a single line comment ; == Multi-line #comments-start This is a comment spanning multiple lines #comments-end ; NOTE: Technically multi-line comments are directives which are processed by the preprocessor #EndRegion #Region Variables ; == Declaration Local $vLocalVariableDemo Global $g_vGlobalVariableDemo Dim $g_vDimVariableDemo ; Dynamic scope, avoid at all costs! Global Const $g_vGlobalConstantDemo = 3.14 ; You can't change PI! Enum $FOO, $BAR ; $FOO = 0 and $BAR = 1 Enum Step 2 $MAYBE_EVEN, $EVEN, $EVEN_AGAIN ; $MAYBE_EVEN = 0, $EVEN = 2, $EVEN_AGAIN = 4 Enum Step *2 $ONE_BIT, $TWO_BIT, $FOUR_BIT, $ONE_BYTE, $TWO_BYTES, $FOUR_BYTES ; Exponents of 2: 1, 2, 4, 8, 16, 32, ... ; === Array declaration Global $g_aArrayDemo[10] ; == Initialization Global $g_sInitializedString = "Test" Global $g_nInitializedNumber = 42 Global $g_vInitializedVarFromExp = (@SEC / 2) - Floor(@SEC / 2) = 0.5 ? "Even" : 0xDD ; Initialization with an expression whose type is dynamic ; === Array initialization Global $g_aInitializedArray[2] = ["Foo", "bar"] #EndRegion If anyone wants to expand the list, then feel free to do so! I will probably adapt your changes with modifications in my next iteration
-
Check if Win10 system is LEGACY or UEFI installed
TheDcoder replied to ModemJunki's topic in AutoIt Example Scripts
@coffeeturtle Very nice. Back when I did it, MBR2GPT did not exist... so I had to go the old route and back up all my important files (I did not have a spare drive back then) and then totally reformat the drive to GPT If I had known better, I would have been using GPT from the start! -
Check if Win10 system is LEGACY or UEFI installed
TheDcoder replied to ModemJunki's topic in AutoIt Example Scripts
Oh, I see. In that case ignore my comments about requirement for GPT (it is only valid when you want to install an OS in UEFI mode). -
Check if Win10 system is LEGACY or UEFI installed
TheDcoder replied to ModemJunki's topic in AutoIt Example Scripts
GPT is a must if you ever want to use UEFI, this is one of the first things you do when planning to install UEFI-based OSes -
Check if Win10 system is LEGACY or UEFI installed
TheDcoder replied to ModemJunki's topic in AutoIt Example Scripts
Just a heads up, this will fail if the system partition drive letter is not C (it can be changed by the user) -
Same here! I actually began some work on a UDF which is supposed to make creation of GUIs more easier, the plan was to make it layout based (just like GTK, but I did not know about it back then) so that I don't have to keep updating coordinates whenever I need to extend the GUI You can still find the work I started here: https://github.com/AutoIt4Life/GUIFrame/blob/master/GUIFrame.au3 It was called "Advanced Input Box", not extended! It is a very handy function that you have made, many scripters can make use of it. I see that you drew inspiration from IUP, I like IUP and use it a lot myself, it is one (and maybe only) of the sane libraries I have seen which can do cross-platform (native) GUIs in C I recall that @Xandy might have also made a similar UDF to get different kinds of paramateres/configurations via a GUI.
- 82 replies
-
- autobuilder
- guibuilder
-
(and 3 more)
Tagged with:
-
I think @matwachich was refering to the KXF files produced by koda, not the XML files produced by Glade Glade is a GUI Designer for GTK+, and it is a lot different from WinAPI GUI (native) which is what AutoIt uses. To begin with, GTK+ doesn't use a coordinate based approach, it uses a layout based approach similar to HTML, it even has support for CSS! And also WinAPI doesn't provide all controls which GTK+ provides.
- 82 replies
-
- autobuilder
- guibuilder
-
(and 3 more)
Tagged with:
-
OOP and Lambdas Missing from AutoIt
TheDcoder replied to gaxar77's topic in Developer General Discussion
The thread link for the OOP topic seems to be dead, does anyone know which topic it is?: -
Does anyone use www.freelancer.com?
TheDcoder replied to pete_wilde's topic in Developer General Discussion
I have used freelance.com in the past, but from the time I spent there, it is a lot more competitive and freelance.com takes fees for almost anything (for placing a sponsored bid, taking a skill test, to withdraw money etc.) I have had much greater success through Upwork, in my opinion it is better than freelancer, there is a fixed fee that you pay Upwork for money earned by a single client, you have payment protection as long as you follow the rules, so that means even if a client plays it dirty, you are still guaranteed to earn the original amount that you have agreed upon (read the about fixed price protection carefully). The fee is not too bad and is simple to follow: 20% for first $500 10% after >$500 5% after >$10,000 The fee is calculated by lifetime earnings from a single client, so if you have a long-term client who has paid more than $10,000 for your services, then you only cut 5% of the following earnings to Upwork. It depends on what your client is looking for, and if they are a programmer and are wanting to deal with the script. If you are having a hard time with a task, then I do recommend planning out what you need and make sure that your requirements are clear before approaching a freelancer. Upwork also offers client payment protection, so as long as the requirements are clear, you should be on the safe side, even if the freelancer does not have a good will. From my personal experience, I am working with a client who has very good understanding of all programming concepts and has worked on many complex software projects, but they instead chose to focus on their business instead of the intricacies in programming (which can often get overwhelming, especially when you are running a business alongside). So at the moment I am taking care of all the code while my client takes care of testing and the higher level design of the code I do not think many do actually, most of them do it as a hobby or as part of their already existing traditional job. There are a few I know who do take up freelance work now and then, I am one of them myself (if you haven't figured out that by now ). From on top of my head, both @Xandy and @Danyfirex are open to freelance work, not sure I remember any other members who are know to work freelance. It is actually not that hard to become one, as long as you have the right skill and knowledge, you can utilize it to work on related jobs. Always be persistent when looking for jobs, especially in the beginning. It might not pay your bills until a few months, as your reputation on the site grows (ratings, client feedback, ranking/status), you will start getting a lot more jobs, enough to make a living if you plan it out just right. It might be worth trying this if you are not living independently and have someone who can take care of your expenses until you get on your feet. -
@junkew I guess that is an approach that one can use. But I do not think this fits well with the goal as I want a proper implementation and not a product of some grammer files... no offense by the way, I know that you are only showing the possibilities Thanks for the link to the meta-question in SE, the "Engineering a Compiler" books sounds like an interesting read... I might read it soon. If anyone is interested in the book then there is a 2nd edition available which is err... "available" in web if you know what I mean
-
@junkew Thanks, I will try out the IDE and see if it can better help me visualize, though I have to say that the syntax doesn't really resemble BNF. It is fun, but not very challenging I guess, string literals could start with either of the quotation marks and only end when the same quotation mark is encountered, anything after it is simply another set of malformed tokens!
-
@junkew Thanks, but it looks like the latest version of ANTLR doesn't support C according to wikipedia: C++ is supported, but no way I am going to use C++ source files in a C project! There are many other parser generators available from what I can see, but as I have mentioned many times earlier, I am not planning to use one at the moment. I want to write my own home-grown parser If reality is too cruel and if it becomes mountain of a task, then I will consider one of these generators... it will be easier to use them as I would be more familiar with defining grammers then
-
[Solved] Tray Menu, Main GUI and Child GUI
TheDcoder replied to amin84's topic in AutoIt GUI Help and Support
Yup, you are right about both points. The reason is same as you have mentioned, the while loop is paused while events are being proceed, that includes the sleep which will be paused (not interrupted), after all events have been processed, the script's execution will resume as normal and sleep will continue. -
[Solved] Tray Menu, Main GUI and Child GUI
TheDcoder replied to amin84's topic in AutoIt GUI Help and Support
Why would it if it was event based? It would only reduce the amount of calls required to the sleep function. Sorry if I came around as one, I was just trying to make everything clear You would be correct if the sleep was in the same loop along with GUIGetMsg, but it is not what I suggested and it was never the case here. -
[Solved] Tray Menu, Main GUI and Child GUI
TheDcoder replied to amin84's topic in AutoIt GUI Help and Support
It depends on how often one wants to delay before the next operation, so I believe it is a misleading to say that it results in lag as it is only doing the job that it has been assigned, i.e sleep for a given amount of time His first script doesn't have a sleep, and as far as I know, the GUIGetMsg function will handle sleep for you automatically -
[Solved] Tray Menu, Main GUI and Child GUI
TheDcoder replied to amin84's topic in AutoIt GUI Help and Support
This does not make sense, why would it cause lag if the script is event based? -
[Solved] Tray Menu, Main GUI and Child GUI
TheDcoder replied to amin84's topic in AutoIt GUI Help and Support
It is not possible to prevent the script from exiting without giving it any tasks... and the task which takes the least amount of resources is a Sleep function in an infinite loop As I have said, Sleep takes the least amount of resources... and most of that are used in the inital phase of sleep. Once the OS has processed the sleep call, it will schedule your process accordingly so that it takes nil resources until the sleep is finished. So the most effective way is to call Sleep with the biggest possible number in AutoIt... or directly call Windows' Sleep function with the value of INFINITE. The latter maybe harder to accomplish by yourself as it requires digging around and finding the value of the INFINITE macro. -
[Solved] Tray Menu, Main GUI and Child GUI
TheDcoder replied to amin84's topic in AutoIt GUI Help and Support
I do not think he is bothered by the long delay, but due to the fact that it is required to keep the script from exiting when operating in OnEvent mode. -
It is also worth taking a look if SciTE has set the encoding to something other than UTF-8, if yes, then try changing to UTF-8 and it will most likely resolve the issues with the Hebrew characters. The encoding option is present in one of the submenus in SciTE, maybe @Jos could point out the right location as I do not have access to SciTE currently