Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Pages: 1
Hi again, i have finished the pluging to use a database on Openspace and now im making a new one. I want to run a .bat file. I know that exist a plugit called exec but i cant make it work properly. anyone can explain me hoe to make this.
Thanks for all and in a few days i will upload the Mysqlplugin that i made. Sorry my poor english XD
Offline
Hi,
For security reasons, Scol should not run any exe. But it can ...
You must add your exe into the ext.ini file (at the root of Scol directory) :
- set a category (« launch » for example can be a good choice)
- set an alias
- set the path
Then use _refreshExe (Scol function) to reset your list of exes and _startExe to launch it (_startExe <category> <alias> <any arguments>)
Or, you could use the Scol function _addExe / _delExe.
I _addExe S P (fun [S P] I)
- the category
- the path (type P, so must be in the Scol partition)
- return 0 if ok, nil if an error occurs
You can list all alias (in a category) with _getExe.
i will upload the Mysqlplugin that i made.
Thanks a lot
Offline
Basics examples ...
Launch MS Write from a Scol application on a MS Windows system.
1- Add "write.exe" to the ext.ini
[launch]
exe explore .
exe openExplorer explorer
exe write_a_text write
and here a Scol code to list available exe and to launch write.exe :
fun main ()=
_showconsole;
_refreshExe;
_fooSList _getExe "launch";
_startExe "launch" "write_a_text" nil;
0;;
Note : if your exe (or a .bat, it is a same thing) is not in the PATH environment, then you must give the complete path
Note : you could give an argument : replace 'nil' in _startExe.
2- With _addExe :
the Scol code is :
fun main ()=
_showconsole;
_addExe "launch" _checkpack "tests/exe/write.exe";
_refreshExe;
_fooSList _getExe "launch";
_startExe "launch" "write" nil;
0;;
Note : the alias is automatically the name of the executable (without its extension)
Note : the executable must be in the Scol partition (so, for this example, i copied write.exe in this directory)
Note : the ext.ini becomes :
[launch]
exe explore .
exe openExplorer explorer
exe write_a_text write
exe write C:\\Program\ Files\\Scol\ Voyager\\Partition_LockedApp\\tools\\scolmeeting3\\write.exe
Note : the exe run on its process. So, if Scol is closed, the exe will not be exited
Offline
Hi errichar !
the exec plugIT should work with the ext.ini updated properly as explain by Iri.
however this plugIT (and scol functions) only works when you use a local and stand alone application.
for security reason this is disabled when you access the application online (with the cache activated)
another solution is to pass by file:// url and the open url plugIT, this will show an alert to ask the user if he want to launch the link
I'm really interested to get your database plugIt to add it in the next release (if it is generic and with a free licence of course)
Offline
... and the exe must be present in the system, of course !!
If a specific use, no problem, the exe should be in your system
If a distributed use, be careful
Offline
thanks to all i will try it today.
Last edited by errichar (29-Jul-2011 09:03:08)
Offline
Hi,
I know I'm reopening a quite old thread but it's just I'm not able to find the Scol code that needs to be modified. I see nowhere any "fun main".
So may I know that Scol file name in order to add other .exe files, pls? Should I modify the cexec plugIT? And I've already modified my ext.ini file.
Thanks a lot!
Last edited by rasami (4-Jul-2018 15:32:00)
Offline
Hello,
if the ext.ini file in c:\program files(x86)\scol voyager\ is updated correctly the plugIt should list the available commands.
Be aware that windows 10 do not allow to modify a file directly in c:\program files(x86)
copy the file first on the desktop to modify it, then copy it back in the c:\program files(x86)\scol voyager\ folder
Offline
I've Windows 7 and it does show me new command in "Command to execute" but it doesn't launch the execution.
Here's the line I added in ext.ini:
xlsm fill_Sheet D:\x\x\Documents\x\OS3D_portable_assets\OS3D_portable\OpenSpace3D\os3D-vba.xlsm
This file isn't really .exe but a VBA macro. Does it impact anything?
x represents name of my folders. I'd to hide them for privacy reasons. And you're super fast in replying!
Last edited by rasami (4-Jul-2018 15:41:12)
Offline
I tried that one too. In the "Execute" link, I typed "os3d-osali.xlsm". In Logs, it does show me the full address path
"D:\x\x\Documents\x\OS3D_portable_assets\OS3D_portable\OpenSpace3D\os3D-vba.xlsm" but it ends up opening just "OS3D_portable" folder. This one was with "explore" as Command to execute but when I try with "openExplorer", it merely opens "My Documents" folder.
I've even looked at the plugit client PKG File. I guess the destination path for "execute" and "openExplorer" are constants. But, as I'm just a novice in SCOL, I've no idea where to modify.
Offline
to open a file with a special software, you need to call the executable file with the file in parameter.
in ext.ini
[launch]
exe explore .
exe openExplorer explorer
exe xlsm xlsm_program_path
then just set the file in command parameter in the plugit
Offline
Wow! I finally managed to do that!!
Thanks a lot!
Offline
Pages: 1