Jump to content

Wiki Challenge Part 2


czardas
 Share

Wiki Challenge II  

21 members have voted

  1. 1. Which of the examples (in posts 2 and 3) do you think is most suited for a beginner?

    • Example 1
      0
    • Example 2
    • Example 3
    • Example 4
    • Example 5
      0
    • Example 6


Recommended Posts

 I do not understand context of your statement can you elaborate ?

 

AutoIt should be the ultimate winner.

EDIT:

I forgot to say: Congrats czardas.

 

Thanks. :)

Edit

I forgot to say thanks jaberwacky - you played a very important role and did a great job. :thumbsup:

Link to comment
Share on other sites

As for the low turnout:
I think it helped a little bit entries in the signature, the members of this forum.
 
That's good advice on the future.
 
 
edit: btw. you should change your signature as I do ;)
Edited by mlipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

You know, in the early stages of deliberating what sort of example, I did fleetingly think about automating the Calculator, but decided it would be too boring, however czardas came up with a great drawcard  using Leap Year, which was outside the box I thought and catchy.

Then I actually started an example using the WordPad and doing automated Font changes. However, that got too tricky with file type and number of lines, and so I went back to my old idea of the Notepad, and rewrote most of what I'd done.

I tried to use commands that a non-programmer could look at and have some idea of what it might be (without comments).

I tried to use as many common type of actions as would attract and appeal to someone showing an interest, to show them how easy they are (creating a directory and a file, deleting both, and running/executing a program).

I also wanted/needed to do some automation stuff, and nothing comes simpler than the Send command to a text editor.

I thought it was important to show the benefit and simple usage of variables.

Then like czardas did, I wanted to add a cool element, which I though a Loop would be to a newbie, as well as using Input, Replace and StringMid and working with individual text characters.

The hard part for me, was making it all look simple in just 32 lines.

The declarations and assignments especially made that hard.

My original script, was 38 lines or 43 with a few blank lines.

In the end, I cramped the assignments and declarations into as few lines as reasonable, though they definitely did not look good visually, and I'm a great believer in blank lines between certain things.

It was at that point, that I decided to add comments, and then eventually (probably foolishly) added them to every line, quite simplistically at times and not entirely correct, as BrewManNH noted, but trying to be simple enough for the possible limited understanding of a newbie. No doubt a tricky thing, and as I said about some other elements, that I thought were not important in the overall context, because the correct usage or understanding would come in good time.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

I didn't know it would be a leap year calculation at first. I just thought to myself, what number can I type into the calculator that would be easy to read and understand. That's when I came up with the idea of using a macro. Only then did I ask myself what can I do with it? That's when I figured that a leap year is something that everyone can relate to.

Link to comment
Share on other sites

Oops, how could I have forgotten to thank jaberwacky, who has done an excellent job. :wacko:

Thanks buddy! :thumbsup:

You too czardas, orchestrating a lot of this.

Thanks! :thumbsup:

All for a worthy cause. :ILA2:

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Greetings!

I just voted, but I had to make an assumption.  I was unsure whether to vote for  code for an absolute beginner in coding, or to vote for code for someone who codes, but is new to AutoIt and could use more advanced concepts, mostly needing only syntax examples.  In the end I went with what I felt like would be more appropriate for the absolute beginner.

Thanks!

_aleph_

Meds.  They're not just for breakfast anymore. :'(

Link to comment
Share on other sites

Unbelievably, we were (mostly) trying to cater to the three main types of beginner, that I mentioned earlier, but should probably err on the side of the absolute beginner.

A very difficult task, as is evident ... and even more evident if you try for yourself as an experienced coder.

Dumbing down code and thought, is not as easy as it would seem.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Unbelievably, we were (mostly) trying to cater to the three main types of beginner, that I mentioned earlier, but should probably err on the side of the absolute beginner.

 

In your opinion, what kind of beginner will go to read the Autoit Wikipedia page ?  ;)

Link to comment
Share on other sites

I imagine all types.

I know when I want to find the definitive explanation about something or someone, that is where I go.

It is also a good place to find links to the real homepage, reviews, etc.

In the end though, it is probably down to where a beginner might hear about AutoIt ... though one imagines they will probably end up at the Wiki at some point early on, either via the forum link or a less direct route.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

I understand this approach, but I'm not convinced that the real content of the sample code is much important

Maybe I'm completely wrong but I think that a Wikipedia Autoit page should essentially provide an overview of the particular Autoit syntax, and an overview of the Autoit abilities, e.g. the code to create a gui along with a picture of this gui

Link to comment
Share on other sites

I think it already does something like that in the tutorials.

And I think it is needed, but also a simple example first and then more advanced examples.

I know when I have looked at other languages, the first thing I look at is the syntax in an example, and how easy it is to understand, plus how logically I could work with it from memory.

First impressions are important ... as are first pages.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

In Vista+ you have to use #RequireAdmin to be able to use BlockInput, not every user will be an admin.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Errrm,  sorry to rain on this jolly parade, but the winning Example #6 is factually wrong. In the Gregorian calendar most of us have been using since the late 16th/early 17th century (yes, I'm that old :D ), a year is a leap year when it is divisible by four, UNLESS it is also divisible by 100 (not a leap year), UNLESS it is also divisible by 400 (leap year).

Edited by RTFC
Link to comment
Share on other sites

Sorry I have been quite busy with the music business lately. I still need to look at, and get my head around, the formatting on wikipedia.

RTFC - Yes example 6 is only good for the next 84 years. I was aware of the fact. It also needs one extra line to be 100% correct regarding coding.

Link to comment
Share on other sites

LOL - I can just imagine what state most of us will be in by then. :rip:  or :robot:

Hard to imagine what AutoIt v87.0.0 or thereabouts, might be like. :blink:

I doubt any of us will be Leaping about. ;)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Tis done!

LOL - I can just imagine what state most of us will be in by then. :rip:  or :robot:

Hard to imagine what AutoIt v87.0.0 or thereabouts, might be like. :blink:

I doubt any of us will be Leaping about. ;)

 

We'll see, or maybe not. I'll be happy if the changes I made last a year or two. JohnOne, I've made a few further modifications. Anything you want to change back, you know you don't need to ask. :D

I think this has been an interesting and successful experiment, different from the usual coding activities. I hope more things like this will happen in the future with your support. I learned a lot by your participation, and would have done so in any event.

Link to comment
Share on other sites

Ive tried to not involve myself in this debate but i thought i would mention something that i find as a beginner / medium

I looked at some of the examples and i cant believe some of them were even submitted for a beginner, geez how difficult they seem... (mainly 2,4 and 5)

The one problem which makes examples for beginners difficult is the perspective of the writer

Everyone that writes for the helpfile or wherever is in most cases a really good coder but, when you write you will naturally assume that oh they will know that or this without me saying it.

I have noticed as AutoIt has evolved the helpfile has become more techy in the examples. Not that im saying it AutoIt shouldn't evolve it seems from my perspective to be growing into a 'proper' language from what i remember in the beginning when i first started.

Due in part to a fantastic helpfile as well as the work from the devs and jon

But don't assume everybody has evolved along with it, if i had come to AutoIt now i would be really struggling.

I seem to be atm helping less and asking more because its getting more difficult as i find it and as the language changes.

Yes im aware i don't have the drive or inclination to learn every nuance of the language, i use it less than 1% in my daily life, a bit of automation to assist in repetitive tasks that i have to do.

And i would be the first to say im not a coder / programmer. The few things i have created are meaningless to the larger community, but they do what i need which is why there were made.

If this hadn't been a helpfull community i would not have come as far as i have.

So please don't forget the perspective of the beginner is really important.

Link to comment
Share on other sites

  • Moderators

That is and always has been part of the endless debate; what constitutes a beginner? Someone may be a "beginner" with AutoIt but just naturally picks it up, and does have the drive/inclination to read through the help file to fill in the gaps in their knowledge. Someone else may be a very infrequent user of the product, and thus not really interested in learning much more than how to complete the one task sitting before them at this very moment.

It comes down to the community taking its best shot at content such as this; I believe it categorically impossible to please everyone or speak to every knowledge level. But personally, I think we should err on the side of complexity in this instance. We don't want people's eyes bleeding when they look at the examples, but if something doesn't make sense, we hope we're attracting those willing enough to crack open the help file and learn more.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

I understand and we dont want to be making AutoIt just for the less gifted like me else it will go nowhere

Here's an example from the current helpfile of what i mean

On the MsgBox page we have the age old battle of magic numbers vs names and yes im in favour of names but i have a mSgBox that requires

$MB_YESNO and $MB_ICONWARNING which is 52 but no where that i can see tells me how to join the names together?

If i try $MB_YESNO & $MB_ICONWARNING it ignores the first one, if i use 52 it works fine..

This is the sort of thing that drives me crazy

So i have to use numbers as i dont know how to join them properly

Surely it should say to join names instead of numbers do this... etc etc so i understand how to achieve it?

Edited by Chimaera
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...