ForEach Conditions

Discuss and share scripts and script files...
SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: ForEach Conditions

Post by SkyFrontier »

It was like learning calculus in French, to me.
At a certain point I started adapting existing scripts to suit my needs, Stef. That's how I started. Then I became more confident concerning usage of the command set as well as seeing some patterns to execute more or less similar tasks. That's when I started "parroting" scripts as I tried to reproduce known scripts on my own.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

highend
Posts: 14603
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: ForEach Conditions

Post by highend »

XY scripting was the first "programming language" that I've "learned".

I started (like SkyFrontier) by looking at existing scripts and tried to modify them by a trial and error process.
That was for the logic part of how to do things in a scripting language.

Sometimes I just looked over all entries of the existing commands a dozen times to find something (by name)
that could possibly help me to achieve one task. Later on I wrote a script (http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=9248) that helps me to skim through all commands a little bit easier ;)

Learning by doing and reading the documentation helps tremendously to achieve what you want.

Never hesitate to ask in the forum if something isn't clear enough or how something could be done in a easier or better way.

P.S.: It helps to learn some basics about regular expressions on your way
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 65131
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: ForEach Conditions

Post by admin »

Note that XY scripting is *very* close to (the extremely popular and widely used) PHP which again uses a C style syntax. So XY scripting is hard only for non-programmers.

Stef123

Re: ForEach Conditions

Post by Stef123 »

admin wrote:XY scripting is hard only for non-programmers.
I believe you. Just trying to estimate the ROI quotient, how much time I'd have to invest. Back in the days of DOS you saw some people hacking away happily at "Copy *.doc A:\Backups" while others stood back in horror ("there's GOT to be an easier way than that")

I am in the middle. Not as averse to scripting like some die-hard "good design does not need it" -advocates, but not embracing it either. Generally, I find a line like
Run "blah.exe ""para quotes""";
much more intimidating than a Fav-App-dialog overloaded with input fields and checkboxes. XY is lightweight in this respect but a bit heavy on the syntax-side. Since I've learned to come to terms with triple quotes and semi-colons, however, I might as well take it to the next level. Or rather not, still unsure after my first steps in this rocky terrain.
SkyFrontier wrote:It was like learning calculus in French
Hehe - that's a good one. Colloquially speaking. Not a bad idea, either, literally taken as a school concept. Why not learn a language along the way, not to mention how much it would have livened up calculus lessons to hear them from my French teacher.
BTW, computer classes benefit immensely from being held in English. I see that happening in international companies. You may understand nothing else a Japanese colleague tells you, but you can follow along when he guides you through File > Settings Special instead of giving you the Japenese menu equivalent (which is non-existant in this case, of course)
highend wrote:Never hesitate to ask in the forum if something isn't clear enough or how something could be done in a easier or better way.
Thanks. This seems indeed the key to making progress fast enough. Not just the learning from the pros, but also the close tie to script tasks I care about, the hands-on relevance.

I already had your helpfile script in use, but then found it necessary to really plough through the whole thing, take it apart, bookmark chapters, re-organize it in my private notes. For instance: msg, text, confirm, input, inputfile, inputfolder all go together under my group heading "user interaction"

Post Reply