找回密码
 加入
搜索
查看: 1646|回复: 5

怎么调用系统复制对话框????

[复制链接]
发表于 2009-2-22 23:33:13 | 显示全部楼层 |阅读模式
怎么调用系统复制对话框????选择复制到那里
就想在网上想在文件一样选择保存在什么地方



主要是需要保存到什么地方这个选项
谢谢几位的帮助,

[ 本帖最后由 qq82015930 于 2009-2-23 14:35 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2009-2-23 00:34:36 | 显示全部楼层
$tagSHFileOperation = "hwnd hwndOwner;uint wFunc;ptr From;ptr To;" & _
                        "dword Flags;int AnyOperationAborted;" & _
                        "hwnd NameMapping;ptr ProgressTitle"
$tFileOperation = DllStructCreate($tagSHFileOperation)

$sFrom = "C:\14th destination.rmvb"                ; 源文件
$From = DllStructCreate("wchar[" & StringLen($sFrom) + 2 & "]")
DllStructSetData($From, 1, $sFrom)
$pFrom = DllStructGetPtr($From)


$sTo = @ScriptDir                                ; 目的文件

$To = DllStructCreate("wchar[" & StringLen($sTo) + 2 & "]")
DllStructSetData($To, 1, $sTo)
$pTo = DllStructGetPtr($To)


DllStructSetData($tFileOperation, 1, 0)
DllStructSetData($tFileOperation, 2, 0x2) ; $fo_copy = 0x2
DllStructSetData($tFileOperation, "From", $pFrom)
DllStructSetData($tFileOperation, "To", $pTo)
DllStructSetData($tFileOperation, "Flags", 0x40) ; $fof_allowundo = 0x40

DllCall("shell32.dll", "int", "SHFileOperationW", _
                "ptr", DllStructGetPtr($tFileOperation))
 楼主| 发表于 2009-2-23 01:05:23 | 显示全部楼层
原帖由 pusofalse 于 2009-2-23 00:34 发表
[au3]$tagSHFileOperation = "hwnd hwndOwner;uint wFunc;ptr From;ptr To;" & _
                        "dword Flags;int AnyOperationAborted;" & _
                        "hwnd NameMapping;ptr ProgressTitle"
$tFileOperation = DllStructCreate($ ...



没有选择保存到什么地方,目标路径是死的
主要是需要保存到什么地方这个选项
发表于 2009-2-23 01:29:36 | 显示全部楼层
$sTo = FileSaveDialog("Save As", "", "*.*", 18)
发表于 2009-2-23 01:59:12 | 显示全部楼层
楼上写的基本上没有什么问题了,但可能有些地方还不行,我试着运行了一下。报错了

我把代码稍稍改了一下。可以正常执行了

$sTo = FileSaveDialog("Save As", "d:", "所有文件(*.*)", 18)

其实AU3的帮助文件已经很全了。我觉得F1真的挺管用的
发表于 2009-2-23 02:33:41 | 显示全部楼层

回复 5# sva2005 的帖子

多谢指出错误,我粗心粗到家了~
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-13 00:10 , Processed in 0.085835 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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