Page 1 of 1
win.system() - call app with more than 1 quotation mark pairs
Posted: Fri 12 Feb, 2016 09:57
by galaxy_far_FAR_away
These works (either part of the command-line is quoted):
Code: Select all
lua:win.system("\"C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe\" C:\\Windows\\win.ini")
Code: Select all
lua:win.system("C:\\PROGRA~1\\WINDOW~2\\ACCESS~1\\wordpad.exe \"C:\\Windows\\win.ini\"")
I think this also must work (command and parameters are both quoted):
Code: Select all
lua:win.system("\"C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe\" \"C:\\Windows\\win.ini\"")
But it don't
win.system() - call app with more than 1 quotation mark pairs
Posted: Fri 12 Feb, 2016 12:22
by cmd.exe
I'm not udersted what do win.systeam
. You can/cant give full code?
win.system() - call app with more than 1 quotation mark pairs
Posted: Fri 12 Feb, 2016 12:47
by DrKnS
cmd.exe wrote:I'm not udersted what do win.systeam
.
Very helpful answer.
Why don't you read the manual before replying?
win.system() - call app with more than 1 quotation mark pairs
Posted: Fri 12 Feb, 2016 12:52
by cmd.exe
John Doe wrote:lua:win.system[[""cmd.exe" /c "c:\autoexec.bat""]]
Sory not seen manual, but can give example.
win.system() - call app with more than 1 quotation mark pairs
Posted: Fri 12 Feb, 2016 13:27
by galaxy_far_FAR_away
For win.system() see Encyclopedia/luafar_manual.chm in the FAR Manager program folder! macroapi_manual.en.chm is also about LUA.
No example codes are needed - just paste my example lines to FAR commandline then press Enter.
win.system() - call app with more than 1 quotation mark pairs
Posted: Fri 12 Feb, 2016 16:49
by cmd.exe
as example...
lua:win.system([[""C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe" "C:\\Windows\\win.ini""]])
win.system() - call app with more than 1 quotation mark pairs
Posted: Fri 12 Feb, 2016 18:58
by galaxy_far_FAR_away
Ahh, sorry cmd.exe, I missed that Your qutation was from John Doe and not from me
OK, I seeing that [[...]] works but I can't understand _why_ plain escape characters are bad?
The answer maybe too complex as Shmuel indicated here:
http://forum.farmanager.com/viewtopic.p ... 06#p131106