TheSaint Posted January 16, 2021 Posted January 16, 2021 (edited) 8 hours ago, seadoggie01 said: Wait, y'all still use them? Wasn't that what AutoIt replaced? 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 January 16, 2021 by TheSaint TheDcoder 1 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)
Earthshine Posted January 16, 2021 Posted January 16, 2021 (edited) 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 January 16, 2021 by Earthshine My resources are limited. You must ask the right questions
JockoDundee Posted January 16, 2021 Posted January 16, 2021 18 minutes ago, Earthshine said: ...and it also gets them out of our source control... If I were an admin the hairs on my neck would be sticking straight up after reading that. OTOH, as a developer I can only say: Right On! TheDcoder 1 Code hard, but don’t hard code...
Earthshine Posted January 17, 2021 Posted January 17, 2021 (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 January 17, 2021 by Earthshine My resources are limited. You must ask the right questions
TheDcoder Posted January 17, 2021 Author Posted January 17, 2021 @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
JockoDundee Posted January 17, 2021 Posted January 17, 2021 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 Earthshine and TheDcoder 1 1 Code hard, but don’t hard code...
Earthshine Posted January 17, 2021 Posted January 17, 2021 (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 January 17, 2021 by Earthshine My resources are limited. You must ask the right questions
TheDcoder Posted January 18, 2021 Author Posted January 18, 2021 @Earthshine No Web UI for easy code access? LogExpert sounds nice, is it only for Windows? 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
Earthshine Posted January 18, 2021 Posted January 18, 2021 (edited) Not sure update, it's a gui wrapper for unix tail. you in linux already have tail so.... Edited January 18, 2021 by Earthshine My resources are limited. You must ask the right questions
Earthshine Posted January 18, 2021 Posted January 18, 2021 10 hours ago, TheDcoder said: @Earthshine No Web UI for easy code access? LogExpert sounds nice, is it only for Windows? https://www.vanheusden.com/multitail/index.php this is what you want in linux world. TheDcoder 1 My resources are limited. You must ask the right questions
argumentum Posted January 18, 2021 Posted January 18, 2021 I don't wanna fight y'all but if I have to I will. Now leave all this GOTO/GOSUB alone. We're using functions ! seadoggie01, TheDcoder and TheSaint 1 1 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Earthshine Posted January 18, 2021 Posted January 18, 2021 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. argumentum 1 My resources are limited. You must ask the right questions
TheDcoder Posted January 18, 2021 Author Posted January 18, 2021 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
Earthshine Posted January 18, 2021 Posted January 18, 2021 (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 January 18, 2021 by Earthshine My resources are limited. You must ask the right questions
TheDcoder Posted January 18, 2021 Author Posted January 18, 2021 @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 argumentum 1 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
Earthshine Posted January 18, 2021 Posted January 18, 2021 (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 January 18, 2021 by Earthshine My resources are limited. You must ask the right questions
argumentum Posted January 19, 2021 Posted January 19, 2021 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.
TheDcoder Posted January 19, 2021 Author Posted January 19, 2021 @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
JockoDundee Posted January 20, 2021 Posted January 20, 2021 (edited) 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-cutters; 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 January 20, 2021 by JockoDundee TheDcoder 1 Code hard, but don’t hard code...
argumentum Posted January 20, 2021 Posted January 20, 2021 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 ) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now