FreeCommander Commandline & Scripting

Discussion and questions - donor version.
Post Reply
Message
Author
User avatar
BGM
Posts: 594
Joined: 14.10.2008, 23:42
Location: Kansas City, Missouri, USA
Contact:

FreeCommander Commandline & Scripting

#1 Post by BGM » 22.02.2012, 22:09

Salvete!

Marek, since we can use FC commands as the "program" of the favourite toolbar configs, what about allowing this?:
c:/freecommanderxe/freecommander.exe /C "<actViewFlatViewFiles>"

However, I have an issue with using the [standard] commandline parameters: they don't actually send commands to the running instance. Instead, they launch a second instance of FreeCommander.

What if we could use the FC functions as a sort of COM interface? In other words, imagine the functions being exposed in a DLL. This would allow users to create other applications that could make FreeCommander do more things. For example, it would let us use vbscript to create scripts for FC.

Then, we could do something like this (loosely coded):
dim myFCdll as dll("c:\freecommanderxe\freecommanderDLL.dll")
dim myFC as new object
myFC.command("<actDirGoTo>", "C:\somefolder")
myFC.command("<actViewFlatViewFiles>")

Get the drift? If the functions were exposed in some manner, then we could do the scripting in another language, and still have the power of scripting FC.
(Windows 10-1909 Professional 64bit)

User avatar
BGM
Posts: 594
Joined: 14.10.2008, 23:42
Location: Kansas City, Missouri, USA
Contact:

Re: FreeCommander Commandline & Scripting

#2 Post by BGM » 29.07.2012, 20:35

Hello! Just thinking about this again. I think this capability would create an endless amount of functionality that could be used by other programs (autohotkey, autoit, powerpro, vbs, etc.) and would really make FreeCommander stand out above all its competitors.

Being able to interact with FC would open the way to 3rd party "plugins", too.

Maybe FC could put its main functions in an accessible dll.
(Windows 10-1909 Professional 64bit)

inglorious
Posts: 277
Joined: 01.09.2011, 00:10

Re: FreeCommander Commandline & Scripting

#3 Post by inglorious » 29.07.2012, 22:40

a agree, in my opinion scripting support is a must have in order to catch up with other FM like DOPS or XY see also my enhancement request here http://forum.freecommander.com/viewtopic.php?f=5&t=4368
Win7x64

User avatar
BGM
Posts: 594
Joined: 14.10.2008, 23:42
Location: Kansas City, Missouri, USA
Contact:

Re: FreeCommander Commandline & Scripting

#4 Post by BGM » 30.07.2012, 01:25

I don't think it has to be a full-blown scripting language in itself. That's a pretty involved thing. If only the functions were exposed, we could script it through a dll using AutoHotkey or Powerpro or VBS, sort of like a COM interface - after all, those scripting processes are already far advanced. You wouldn't have to write code to handle all the "language" itself. Take for example the COM interface for Adobe InDesign. It uses javascript for the scripting language. So you write simple javascript to interact with InDesign's com functions. As long as the functions are accessible from an outside script, that seems to me all that is needed. I mean, the functions seem like they are all ready to go - you can use them by name in the favourites toolbars - if they could be used the same way from outside - whoah! FreeCommander is already so far ahead of those other file-browsers, I don't even consider them anymore. But being able to script it? That would be absolutely awesome.

Right now I like to use an app called JetToolbar, which lets me attach commandline calls to a button on a toolbar (Powerprodoes this too. I love Powerpro, if y'all don't know that already). I have a PowerPro function that will open a new tab in FC and then make FC go to a particular folder. But I have to use sendkeys to FC in order to "script" FC right now. That's not the right way to do it because if you change your keyboard commands then have to update your scripts. I did make a Powerpro function that fishes FC's custom keyboard commands out of FC's keys file and then uses those. But that is still a bit of a hack. If it could be scripted directly it would be so much better.
(Windows 10-1909 Professional 64bit)

inglorious
Posts: 277
Joined: 01.09.2011, 00:10

Re: FreeCommander Commandline & Scripting

#5 Post by inglorious » 30.07.2012, 23:37

I don't think it has to be a full-blown scripting language in itself. That's a pretty involved thing.
I am not sure whether exposing functions in dlls and envoke/high-jack them by 3rd party tools would really be easier to implement, additionally at least to me this sounds as a work-aroud and would be most likely more error-prone than the implementation of scripting support.

I found various Delphi scripting tools and components, eg. here:
http://www.torry.net/pages.php?id=280
I am not sure if they are free and how good they are, but I guess implementing vbscript/jscript support could be feasible thing.

As mentioned, many FM already support scripting, have a look at dopus for instance.
Adding scripting support to FC's easy-of-use, unique features, free software, etc. would make FC a versatile FM that's hard to compete with.

Marek, what do you think?
Win7x64

Marek
Author
Author
Posts: 4229
Joined: 10.04.2006, 09:48
Location: Germany
Contact:

Re: FreeCommander Commandline & Scripting

#6 Post by Marek » 31.07.2012, 22:32

Marek, what do you think?
Sorry but it is not the thema for me at that time.
I would like first release the 32 bit version and then 64 bit - it is a lot of work.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests