2016-11-18 69 views
0

为什么不能用类似于记事本的默认文件运行我的应用程序? 下面AutoIt的示例代码:为什么我不能像记事本那样使用默认文件运行我的应用程序?

Example() 

Func Example() 
     ; Run Notepad 
     Run("Notepad.exe " & "C:\Users\judith_francis\Desktop\dd.txt") 

     Run("C:\Program Files (x86)\abc\abc.exe" & "C:\Users\xyz\Desktop\test_image.tif") 

EndFunc 
+0

什么是你的实际问题来执行? – Ouroborus

+0

我无法运行此行运行(“C:\ Program Files(x86)\ abc \ abc.exe”&“C:\ Users \ xyz \ Desktop \ test_image.tif”) – Nisha

回答

2

这条线:

Run("C:\Program Files (x86)\abc\abc.exe" & "C:\Users\xyz\Desktop\test_image.tif") 

运行命令

C:\Program Files (x86)\abc\abc.exeC:\Users\xyz\Desktop\test_image.tif 

哪种版本的Windows将其解释为

C:\Program 

尝试代替

Run('"C:\Program Files (x86)\abc\abc.exe" ' & '"C:\Users\xyz\Desktop\test_image.tif"') 

这增加&报价&必要的空间将作为

"C:\Program Files (x86)\abc\abc.exe" "C:\Users\xyz\Desktop\test_image.tif" 
相关问题