How to run a Windows app or open a file?
Please, tell me what is wrong here? I want to make a quick launcher for some programs, files, playlists.
local keyboard = libs.keyboard; local win = libs.win; [email protected] run viewer actions.run_viewer = function () os.open("C:\Program Files\Media\IrfanView\i_view32.exe"); keyboard.press("enter"); end [email protected] run player actions.run_player = function () os.open("C:\Program Files\Media\Pot Player\PotPlayer.exe"); end [email protected] open a file actions.playlist_a = function () os.open("E:\photo\0001.jpg"); end
Here is an example of a working "remote.lua"
[email protected] Run Premiere QT MariaT
actions.restart_premiere = function()
os.open("C:/Users/David/Desktop/Maria T Video/Maria T Quad Split.prproj");
So ....... open will open a file using the default program (it might open the executable as well, but I am not sure).
So .... if the last action in your list doesn't work then I would suggest that your "slashes" are the wrong way round..... "" instead of "/" (I had put a backslash inside the first set of quotes but it was "dropped". Backslash - keycode92 is quite a special character, and is often "reserved").
ali yachir 20
this launch app work
[email protected] Launch Kodi application
actions.kodion = function()
os.start("C:\Program Files (x86)\kodi\kodi.exe");
Yes, with this slash "/" it works.
What is the difference between os.open and os.start? Start applies to .exe files?
I want to open a playlist in a selected application (not in the system default). How to do this?