Loading
0

F2更人性化的实现

选中一个文件后,按下F2,重命名该文件。。。不够,不够我们是不是应该在剪贴板中准备好要修改的内容!

F2::
Clipboard := ""					; empty clipboard
Send ^c							; copy via Ctrl+c
sleep 50						; <---- this should prevent clipwait issues
Clipwait,1						; Wait until Clipboard holds contents
if (ErrorLevel = 1) 			; Zero if clipboard not empty, else one
	return
msgbox % Clipboard 
SplitPath, Clipboard, name		; get filename - clipboard holds complete file path
msgbox % name					; just for testing
clipboard := name				; assign filename to clipboard for pasting
return

 

本文为原创文章,未经同意禁止转载!!