Page 1 of 1
Scripting: Advocating the Devil
Posted: 12 Oct 2013 22:08
by SkyFrontier
So far I've wrote/adapted +1800 scripts of my own and gathered other ~1000 ones. Numbers can't be more than approximate but they are realistic (yes, I'm impressed after my first steps on this, 3 or 4 years ago).
Almost each and every need I have concerning computing, tasks automation, data processing and the likes I can solve using XYplorer scripting, the only issue being some performance depending on whether is being processed. Overall an invaluable source of help when everything else fails - or just a time-saver I'm yet to find rivalry outside the fences.
*BUT* there must be a reason other guys do prefer other tools over XYplorer. So I'd like to hear them. Why? How? Where to find the basic steps? Full-fledged applications built on top of a file manager? This is an opportunity, people. Show yourself!
Re: Scripting: Advocating the Devil
Posted: 13 Oct 2013 00:09
by Marco
Hi SkyFrontier,
first of all congratulations for those numbers, astronomic to say the least!!!
there must be a reason other guys do prefer other tools over XYplorer
I'll throw my two cents in quality of "insider". There are things that XY scripting language can't interact with, that's it. That's why other languages are needed. More specifically, I'm thinking of winapi - unfortunately, one has to rely on C/C++/C#, VB, Python or AutoIt for them. It's a pity because the ease of coding with XY is by far superior, at least that's what I perceive.
I want to stress that I'm not talking about rocket science when I mention winapi. Among my daily scripts there's one that changes the desktop wallpaper. Turns out that access to registry and then the ability to send a win message are required - XY scripting does not provide either of those, as an example.
That's why I'm learning Python at the moment, but I can feel that the learning curve will be way, way steeper as compared with XY.
Re: Scripting: Advocating the Devil
Posted: 13 Oct 2013 00:35
by SkyFrontier
Hiya, Marco!
Nice point.
Just two notes:
1. You may or may not know but worth mention XY actually can write to the registry (can't find any proof it can READ it, tho!) using reg.exe, like this:
Code: Select all
run """%winsysdir%/reg.exe"" ADD ""HKCU\Software\VB and VBA Program Settings\Some Program\Spec Options"" /v ""StorageP"" /t ""REG_SZ"" /d ""<curpath>"" /f";
2. There's also other file managers which do support some (basic?) scripting and I'd like to hear about them too.
Considered in the past learning some AHK scripting but quickly quit: few to none help on forums (and YES, they have a very active community there - but they assume you've learned the basics first. Where, I didn't dug enough to discover...

), not much time to head scratch, performance flaws I quickly noticed = gave it a miss.
Re: Scripting: Advocating the Devil
Posted: 13 Oct 2013 02:06
by SkyFrontier
For the sake of reference:
Code: Select all
run """%winsysdir%/reg.exe"" EXPORT ""HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Some Program\Spec Options"" ""C:\Temp\exported.REG";
then read the resulting C:\Temp\exported.REG file.
The target must have a valid path, otherwise it won't create...
Re: Scripting: Advocating the Devil
Posted: 13 Oct 2013 02:36
by binocular222
If XYS can do DLLcall, then everything can be done. Most of the extra scripting commands of AHK are simply precomposed Dllcalls to windows api. AHK does not invented things, it just structured C+ into a language friendly to human
Re: Scripting: Advocating the Devil
Posted: 13 Oct 2013 07:47
by Filehero
Hi Marco,
Marco wrote:...More specifically, I'm thinking of winapi - unfortunately, one has to rely on C/C++/C#, VB, Python or AutoIt for them. ...That's why I'm learning Python at the moment, but I can feel that the learning curve will be way, way steeper as compared with XY.
Well, Pythom is worth it for sure. But for all the more sophisticated Windows stuff I would recommend Powerscript. It's powerful and versatile and it allows to use the .Net-api, especially C#.
More general: I do have some scripts for some specific and redundant tasks. But for most of the stuff I rely on what is already available.
Cheers,
Filehero
Re: Scripting: Advocating the Devil
Posted: 13 Oct 2013 10:03
by admin
SkyFrontier wrote:*BUT* there must be a reason other guys do prefer other tools over XYplorer.
Do you know any such guys? Give me their names!

Re: Scripting: Advocating the Devil
Posted: 13 Oct 2013 15:02
by SkyFrontier
Damn, Don.
You're killing other software's fans chance to promote their copiolutionary, er, revolutionary products as they claim their parties are cooler than ours...

(C'mon, guys - be aggressive! Show up!)
Re: Scripting: Advocating the Devil
Posted: 13 Oct 2013 15:24
by Marco
@SkyFrontier
Yep, calling reg.exe is the solution. However reading a registry key requires writing a temporary file. Other scripting languages do not require this intermediate step, giving the feeling that everything is more... "native", so to speak. Cfr. binocular222's topic,
http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=10166
@binocular222
I agree, probably all I miss is simply DLLCall and a good way to retrieve returns without relying on temp files. Because, all in all, XYS language is damn friendly
@Filehero
You mean PowerShell? That's something that runs through my head every now and then. If ps scripts were compilable into exe's it would be worth learning it... Batch files are terribly limited in their abilities, and their syntax tends to awful.
Re: Scripting: Advocating the Devil
Posted: 13 Oct 2013 15:31
by grindax
.
Re: Scripting: Advocating the Devil
Posted: 13 Oct 2013 17:47
by Filehero
Marco wrote:You mean PowerShell? That's something that runs through my head every now and then. If ps scripts were compilable into exe's it would be worth learning it... Batch files are terribly limited in their abilities, and their syntax tends to awful.
I wouldn't argue against an rather "awful" syntax, but the limits could be suprisingly small.
Cheers,
Filehero
Re: Scripting: Advocating the Devil
Posted: 23 Oct 2013 06:02
by armsys
Filehero wrote:Hi Marco,
Marco wrote:...More specifically, I'm thinking of winapi - unfortunately, one has to rely on C/C++/C#, VB, Python or AutoIt for them. ...That's why I'm learning Python at the moment, but I can feel that the learning curve will be way, way steeper as compared with XY.
Well, Pythom is worth it for sure. But for all the more sophisticated Windows stuff I would recommend Powerscript. It's powerful and versatile and it allows to use the .Net-api, especially C#.
More general: I do have some scripts for some specific and redundant tasks. But for most of the stuff I rely on what is already available.
Cheers,
Filehero
I prefer Macro Scheduler. You should give it a try. You can accomplish your tasks faster than any other languages provided you're familiar with VBScript.
Currently, I'm learning VBScript, VBA, Python, PowerShell, JaveScript,...etc. That should be keep me extremely busy.
Fortunately, XY helps me manages a huge number of script/project files.