Liquid UI - WS Reference Library



With ShellExecute(), you can run programs.

Using ShellExecute() command, you can perform system level operations, such as opening a browser, opening a program(for example, notepad), accessing clipboard data, and so on.


ShellExecute() command does not take any options.


The following example demonstrates the usage of ShellExecute() command.

On execution of the following script, the following actions occur:

  • Browser opens the website -
  • Opens notepad on your computer
  • Copy the contents from clipboard to file


pushbutton([TOOLBAR],'Copy to Clipboard','?',{'process':copyClipBoard,'size':[1,20]})
function copyClipBoard()
system.ShellExecute('iexplore.exe','');  // Opens Web Browser with specified link
// system.ShellExecute('notepad.exe');  // Opens Notepad
// system.ShellExecute('notepad.exe', 'C:\\customers\\AAF\\filename.txt');
// Opens Specified File in Notepad //system.ShellExecute('cmd.exe','/C type c:\\customers\\AAF\\filename.txt|clip','open',SW_HIDE=0');