Jump to content

Recommended Posts

Posted (edited)
  On 1/15/2021 at 9:36 PM, seadoggie01 said:

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

Expand  

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.

  Reveal hidden contents

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

Posted (edited)
  On 1/16/2021 at 5:39 AM, 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 ;)

Expand  

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

 

Posted (edited)

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

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted
  On 1/17/2021 at 12:21 AM, Earthshine said:

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

Expand  

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

Posted (edited)

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

 

Posted (edited)

Not sure

 

update, it's a gui wrapper for unix tail. you in linux already have tail so.... 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted

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

 

Posted
  On 1/18/2021 at 5:00 PM, Earthshine said:

this is what you want in linux world.

Expand  

Thanks for sharing

  On 1/18/2021 at 5:31 PM, Earthshine said:

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

Expand  

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

Posted (edited)

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

 

Posted

@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

Posted (edited)

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

 

Posted
  On 1/18/2021 at 7:47 PM, TheDcoder said:

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

Expand  

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

  On 1/18/2021 at 7:47 PM, TheDcoder said:

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

Expand  

 

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

Posted (edited)
  On 1/19/2021 at 4:01 AM, argumentum said:

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

Expand  

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

Posted
  On 1/20/2021 at 12:13 AM, JockoDundee said:
  On 1/19/2021 at 4:01 AM, argumentum said:

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

Expand  

 

Expand  

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

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
  • Recently Browsing   0 members

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