Profound UI Run Command

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
kodurivp
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:

Profound UI Run Command

Post by kodurivp »

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
Scott Klement
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

Post by Scott Klement »

Try this:

Code: Select all

pui.runPCCommand("notepad.exe C:\\Koduri\\tst.txt");
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.
kodurivp
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

Post by kodurivp »

Hey Thank you so much. It worked.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests