akshatgupta Posted February 13, 2018 Share Posted February 13, 2018 i was trying to open the snipping tool on windows 10 using autoit but it does not work. here is the code $sFile = ("C:\WINDOWS\system32\SnippingTool.exe") If FileExists($sFile) Then Run($sFile) Else MsgBox(0,'File Error', "The Windows snipping tool was not found") EndIf and here is the image which shows i have it please tell me what to do Link to comment Share on other sites More sharing options...
Developers Jos Posted February 13, 2018 Developers Share Posted February 13, 2018 (edited) Try running with the script with the X64 version of Autoit3! Jos PS: This will work when you have the full version of SciTE4AutoIt3 installed: #AutoIt3Wrapper_UseX64=y $sFile = ("C:\WINDOWS\system32\SnippingTool.exe") If FileExists($sFile) Then Run($sFile) Else MsgBox(0,'File Error', "The Windows snipping tool was not found") EndIf Edited February 13, 2018 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
akshatgupta Posted February 13, 2018 Author Share Posted February 13, 2018 21 minutes ago, Jos said: Try running with the script with the X64 version of Autoit3! Jos PS: This will work when you have the full version of SciTE4AutoIt3 installed: #AutoIt3Wrapper_UseX64=y $sFile = ("C:\WINDOWS\system32\SnippingTool.exe") If FileExists($sFile) Then Run($sFile) Else MsgBox(0,'File Error', "The Windows snipping tool was not found") EndIf thanks it worked Link to comment Share on other sites More sharing options...
AdamUL Posted February 13, 2018 Share Posted February 13, 2018 Another way, if you want or need to run 32-bit is to turn off file system redirection. #include <WinAPIFiles.au3> ;Turn off redirection for a 32-bit script on 64-bit system. If @OSArch = "X64" And Not @AutoItX64 Then _WinAPI_Wow64EnableWow64FsRedirection(False) Global $sFile = "C:\WINDOWS\system32\SnippingTool.exe" If FileExists($sFile) Then Run($sFile) Else MsgBox(0,'File Error', "The Windows snipping tool was not found") EndIf Adam v4nandu 1 Link to comment Share on other sites More sharing options...
v4nandu Posted January 21, 2022 Share Posted January 21, 2022 On 2/14/2018 at 3:11 AM, AdamUL said: Another way, if you want or need to run 32-bit is to turn off file system redirection. #include <WinAPIFiles.au3> ;Turn off redirection for a 32-bit script on 64-bit system. If @OSArch = "X64" And Not @AutoItX64 Then _WinAPI_Wow64EnableWow64FsRedirection(False) Global $sFile = "C:\WINDOWS\system32\SnippingTool.exe" If FileExists($sFile) Then Run($sFile) Else MsgBox(0,'File Error', "The Windows snipping tool was not found") EndIf Adam This is great! solved the problem in seconds... Thank you.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now