找回密码
 加入
搜索
查看: 3042|回复: 3

[系统综合] 用PostMessage_UDF.au3后台发送命令无效,求解

[复制链接]
发表于 2011-5-27 23:02:42 | 显示全部楼层 |阅读模式
#include <Misc.au3>
#include<PostMessage_UDF.au3>
Local $fTest
$fTest = _ClipPutFile("C:\123\abc.txt" );把"C:\123\abc.txt"文件复制到剪贴板
$hWnd=WinGetHandle("333");获取"C:\333"目录窗口句柄
_SendKeys($hWnd, "^v");向"C:\333"目录发送粘贴命令"Ctrl+V"
结果:无效!求解!
PostMessage_UDF.au3文件:
http://www.shynd.com/scripts/PostMessage_UDF.au3
发表于 2011-5-27 23:27:30 | 显示全部楼层
呵呵  楼主在跟我找一样的东西  
sanhen的东西  可惜路径不支持中文

Func _ExplorerCopy($source, $dest)
        Global Const $FO_COPY = 0x0002
        Global Const $FOF_ALLOWUNDO = 0x0040
    Local $SHFILEOPSTRUCT, $source_struct, $dest_struct
    $SHFILEOPSTRUCT = DllStructCreate("hwnd hWnd;uint wFunc;ptr pFrom;ptr pTo;int fFlags;" & _
                                      "int fAnyOperationsAborted;ptr hNameMappings;ptr lpszProgressTitle")
    $source_struct = DllStructCreate("char[" & StringLen($source) + 2 & "]")
    DllStructSetData($source_struct, 1, $source)
    DllStructSetData($source_struct, 1, 0, StringLen($source) + 2)
    $dest_struct = DllStructCreate("char[" & StringLen($dest) + 2 & "]")
    DllStructSetData($dest_struct, 1, $dest)
    DllStructSetData($dest_struct, 1, 0, StringLen($dest) + 2)
    DllStructSetData($SHFILEOPSTRUCT, "hWnd", 0)
    DllStructSetData($SHFILEOPSTRUCT, "wFunc", $FO_COPY)
    DllStructSetData($SHFILEOPSTRUCT, "pFrom", DllStructGetPtr($source_struct))
    DllStructSetData($SHFILEOPSTRUCT, "pTo", DllStructGetPtr($dest_struct))
    DllStructSetData($SHFILEOPSTRUCT, "fFlags", $FOF_ALLOWUNDO)
    DllCall("shell32.dll", "int", "SHFileOperation", "ptr", DllStructGetPtr($SHFILEOPSTRUCT))
EndFunc   ;==>_ExplorerCopy
发表于 2011-5-27 23:40:49 | 显示全部楼层
为什么不用filecopy?
发表于 2011-5-27 23:52:18 | 显示全部楼层
追求系统复制进度条
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 05:32 , Processed in 0.077372 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表