Hi,
I tried pui.runCommand() worked for the notepad.exe to open. But trying to open a file from C drive. Below are the commands that I tried , but seems like not working. Can you please help with this issue?
pui.runPCCommand("notepad.exe \\\\C:\\Koduri\\tst.txt");
pui.runPCCommand("notepad.exe \\\\C://Koduri//tst.txt");
Thanks
Koduri
Profound UI Run Command
-
- New User
- Posts: 9
- Joined: Tue Feb 04, 2020 3:59 pm
- First Name: Varalakshmi
- Last Name: Koduri
- Company Name: UPMC
- Country: United States
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Profound UI Run Command
Try this:
The backslash character is used to escape message values in JavaScript (and many other languages) so you have to put two backslashes when you want a single backslash in the string. In this case, you want to have the standard Windows path of C:\Koduri\tst.txt so you have to code it as C:\\Koduri\\tst.txt
Its not clear why you had extra backslashes at the start of the path or why you placed foreslashes in the path. But, if you do need to add foreslashes for some reason, then you shouldn't double-them, as they are not an escaping character.
Code: Select all
pui.runPCCommand("notepad.exe C:\\Koduri\\tst.txt");
Its not clear why you had extra backslashes at the start of the path or why you placed foreslashes in the path. But, if you do need to add foreslashes for some reason, then you shouldn't double-them, as they are not an escaping character.
-
- New User
- Posts: 9
- Joined: Tue Feb 04, 2020 3:59 pm
- First Name: Varalakshmi
- Last Name: Koduri
- Company Name: UPMC
- Country: United States
- Contact:
Re: Profound UI Run Command
Hey Thank you so much. It worked.
Who is online
Users browsing this forum: No registered users and 0 guests