win.system() - call app with more than 1 quotation mark pairs

Here you can discuss any topic concerning Far macro commands.
Post Reply
galaxy_far_FAR_away
Posts: 23
Joined: Mon 12 Aug, 2013 14:03
Has thanked: 6 times

win.system() - call app with more than 1 quotation mark pairs

Post 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 :(
User avatar
cmd.exe
Posts: 378
Joined: Fri 16 Apr, 2010 18:26
Location: Нижний Новгород
Has thanked: 181 times
Been thanked: 10 times
Contact:

win.system() - call app with more than 1 quotation mark pairs

Post by cmd.exe »

I'm not udersted what do win.systeam. You can/cant give full code?
I've been using Vim for about 2 years now, mostly because I can't figure out how to exit it. (c) I Am Devloper
I know nothing except the fact of my ignorance. (с) Socrates
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

win.system() - call app with more than 1 quotation mark pairs

Post 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?
User avatar
cmd.exe
Posts: 378
Joined: Fri 16 Apr, 2010 18:26
Location: Нижний Новгород
Has thanked: 181 times
Been thanked: 10 times
Contact:

win.system() - call app with more than 1 quotation mark pairs

Post by cmd.exe »

John Doe wrote:lua:win.system[[""cmd.exe" /c "c:\autoexec.bat""]]
Sory not seen manual, but can give example.
I've been using Vim for about 2 years now, mostly because I can't figure out how to exit it. (c) I Am Devloper
I know nothing except the fact of my ignorance. (с) Socrates
galaxy_far_FAR_away
Posts: 23
Joined: Mon 12 Aug, 2013 14:03
Has thanked: 6 times

win.system() - call app with more than 1 quotation mark pairs

Post 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.
User avatar
cmd.exe
Posts: 378
Joined: Fri 16 Apr, 2010 18:26
Location: Нижний Новгород
Has thanked: 181 times
Been thanked: 10 times
Contact:

win.system() - call app with more than 1 quotation mark pairs

Post by cmd.exe »

as example...
lua:win.system([[""C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe" "C:\\Windows\\win.ini""]])
I've been using Vim for about 2 years now, mostly because I can't figure out how to exit it. (c) I Am Devloper
I know nothing except the fact of my ignorance. (с) Socrates
galaxy_far_FAR_away
Posts: 23
Joined: Mon 12 Aug, 2013 14:03
Has thanked: 6 times

win.system() - call app with more than 1 quotation mark pairs

Post 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
Post Reply

Return to “Macro Commands Discussions”