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

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

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

Postby galaxy_far_FAR_away » Fri 12 Feb, 2016 09:57

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: 314
Joined: Fri 16 Apr, 2010 18:26
Location: Нижний Новгород
Has thanked: 168 times
Been thanked: 5 times
Contact:

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

Postby cmd.exe » Fri 12 Feb, 2016 12:22

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: 4463
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 2 times
Been thanked: 105 times
Contact:

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

Postby DrKnS » Fri 12 Feb, 2016 12:47

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: 314
Joined: Fri 16 Apr, 2010 18:26
Location: Нижний Новгород
Has thanked: 168 times
Been thanked: 5 times
Contact:

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

Postby cmd.exe » Fri 12 Feb, 2016 12:52

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: 21
Joined: Mon 12 Aug, 2013 14:03
Has thanked: 6 times

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

Postby galaxy_far_FAR_away » Fri 12 Feb, 2016 13:27

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: 314
Joined: Fri 16 Apr, 2010 18:26
Location: Нижний Новгород
Has thanked: 168 times
Been thanked: 5 times
Contact:

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

Postby cmd.exe » Fri 12 Feb, 2016 16:49

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: 21
Joined: Mon 12 Aug, 2013 14:03
Has thanked: 6 times

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

Postby galaxy_far_FAR_away » Fri 12 Feb, 2016 18:58

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.php?p=131106#p131106


Return to “Macro Commands Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest