I am trying to programatically launch Snipping Tool but it is not happening, I can launch Task Manager with similar code though.
I have this code… If SpecialFolder.Windows.Child(“System32”).Child(“Snipping Tool.exe”) <> Nil and SpecialFolder.Windows.Child(“System32”).Child(“Snipping Tool.exe”).Exists then msgbox “1” elseIf SpecialFolder.Windows.Child(“System32”).Child(“SnippingTool.exe”) <> Nil and SpecialFolder.Windows.Child(“System32”).Child(“Snipping Tool.exe”).Exists then msgbox “2” elseIf SpecialFolder.Windows.Child(“System32”).Child(“SnippingTool”) <> Nil and SpecialFolder.Windows.Child(“System32”).Child(“Snipping Tool.exe”).Exists then msgbox “3” elseIf SpecialFolder.Windows.Child(“System32”).Child(“Snipping Tool”) <> Nil and SpecialFolder.Windows.Child(“System32”).Child(“Snipping Tool.exe”).Exists then msgbox “4” else msgbox “5” SpecialFolder.Windows.Child(“System32”).Launch end if
try #If TargetWindows Then
Declare Function ShellExecuteW Lib “Shell32” _
(hwnd As Integer, lpOperation As WString, lpFile As WString, _
lpParameters As Ptr, lpDirectory As Ptr, nShowCmd As Integer) As Integer
Var rc As Integer
rc = ShellExecuteW(0, “open”, “ms-screensketch:”, Nil, Nil, 1) #EndIf
#If TargetWindows Then
Soft Declare Function ShellExecuteW Lib “Shell32” _
(hwnd As Integer, lpOperation As WString, lpFile As WString, _
lpParameters As Ptr, lpDirectory As Ptr, nShowCmd As Integer) As Integer
Var result As Integer
result = ShellExecuteW(0, “open”, “ms-screenclip:”, Nil, Nil, 1) #EndIf