Jump to content

EasyCodeIt - cross-platform AutoIt implementation


Recommended Posts

8 hours ago, seadoggie01 said:

Wait, y'all still use them? Wasn't that what AutoIt replaced? :o 

No quick or easy way around some things, especially if you want to display processing etc.

Sometimes it is just better to get AutoIt to run a batch file ... not that I am likely to do that with a batch file than contains a GoTo line.

But usually I am just quickly playing around with a Batch file, testing, before I then build an AutoIt alternative ... and troubleshooting can be easier in a batch.

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

14 hours ago, TheDcoder said:

@seadoggie01 Sometimes it is just more convenient to use a batch script due to the native integration with Windows :)

@Earthshine Bash for *nix is basically what Batch is for Windows. Also, I personally prefer Makefiles and CMake ;)

Naw. I use them to automate MSBUILD and call them with intelligent Scripts and it also gets them out of our source control and builds them from scratch off a tag or branch. much more gracefully and elegant than batch language 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

@Earthshine No idea what you are talking about, something to do with Visual Studio I reckon. I never used it and refuse to use it ;)

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

4 hours ago, Earthshine said:

We have super strict security and restricted access based on who you are. Nothing wrong for config management to do authorized builds

Probably misunderstood you.  I thought you were saying that writing batch files evades source control because it “gets them out”.  But now I think you’re saying it “checks them out” of SC.  Sorry ‘bout that!

The hairs went down anyway, on their own :)

Code hard, but don’t hard code...

Link to comment
Share on other sites

No worries. We have SSH only connection to git with two factor authentication. and we are only allowed to do what our roles are specified for. 

 

the scripts do make it easy for development as well, they can use my build scripts to build the entire product out of any tag or branch they need in order to do support or development. Then they don't have to know all the ins and outs they can focus on their piece. 

I have msbuild log everything so i can just monitor the build log files as they build. LogExpert is a real nice free app for doing unix Tail stuff

If you want it easy you can install LogExpert by using Chocolaty to do it.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

you don't need goto's really. 

 

if I'm in a function and something fails in a try/catch or decision block of code, I just return an error right there from the decision code., instead so in effect you can have same convenience that way. That single entry single exit is pure bullshit and doesn't work in object oriented languages.

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

59 minutes ago, Earthshine said:

this is what you want in linux world.

Thanks for sharing

29 minutes ago, Earthshine said:

if I'm in a function and something fails in a try/catch (...)

That is for object-oriented programming as you mentioned, and AutoIt isn't really object oriented in nature, so I intend to keep EasyCodeIt the same way, except perhaps with some support for something similar to structs.

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

even if it's just a case statement or if structure it's ok to just return with code from wherever you need to was my point. I get your point as well. It's fine if it's like AutoIt

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

@Earthshine Normally it is not possible to exit an If statement/structure, this is where GOTO is usually needed. Not really sure if this is what you were talking about.

I guess we will see how things pan out, there is plenty of time to worry about GOTO once we actually have a working interpreter :)

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

i can do this in AutoIt, as I am sure you can too. I am not sure what you are talking about. AutoIt can do it, yours should be able to as well. i must be confused as to what you mean. You don't need goto's at all pretty sure.

#include <MsgBoxConstants.au3>
Func testme ()
    if(1) Then
        MsgBox($MB_SYSTEMMODAL, "test", "Returning from an if statement", 10)
        Return "return from error"
    Else
        Return "doing something else"
    EndIf
EndFunc

ConsoleWrite(testme())

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

8 hours ago, TheDcoder said:

If statement/structure, this is where GOTO is usually needed

you can use Return or Return func(). The GOTO idea ... is not a great idea.

8 hours ago, TheDcoder said:

I guess we will see how things pan out, there is plenty of time to worry about GOTO

 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

@Earthshine That only works if you are in a function and if you don't want to execute any code after the If statement.

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

20 hours ago, argumentum said:

The GOTO idea ... is not a great idea.

The ‘idea’ is indispensable; stop doing this, do something else instead.  As far as computers are themselves concerned, it’s all they know, JMP here, JMP there, oh was that actually a return from whence I sprung?  They could care less!

Of course, because of our limited cognitive capacity, it is much easier for humans to deal with symmetrical constructs, and I couldn’t agree more.  I only think of using GOTOs wistfully, when contemplating creating some state variable to back out of some nested mess from hell.  And yes, it’s usually better to just rewrite the mess.

Regardless, the GOTO is just a tool, kinda like a sweet pair of bolt-cuttersA8E135CD-8A33-46D6-8E4B-64768F5D098B.thumb.jpeg.d71ed5ab535be6df0fcac3d7c18b9d8a.jpeg; sure you never start a project thinking “then I’ll use those big-ass bolt cutters...”, but sometimes there’s just nothing better.

IMO, what’s not a great idea is:

While True

WEnd

which, despite always starting out with an actual condition, will usually end-up with the condition in the body.  Mostly because you can’t assign and test in the same statement.

Fwiw, I often code it like:

Do

Until False

just because it looks better at the top :)

Edited by JockoDundee

Code hard, but don’t hard code...

Link to comment
Share on other sites

2 hours ago, JockoDundee said:
22 hours ago, argumentum said:

The GOTO idea ... is not a great idea.

 

I believe that without this aid, the GOTO aid, the coder will be a better coder, and the code a better code.
If the final product has this "GOTO", you'll use it ( if needed ) and I wont ( out of principle :P 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

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...