2016-06-14 1 views

답변

0
F2:: 
ClipSaved := ClipboardAll  ; save the entire clipboard to the variable ClipSaved 
clipboard := ""     ; empty clipboard 
Send, ^c      ; copy the selected file 
ClipWait, 1      ; wait for the clipboard to contain data 
if (!ErrorLevel)    ; If NOT ErrorLevel clipwait found data on the clipboard 
{ 
    clipboard := clipboard  ; convert to text (= copy the path of the selected file) 
    Sleep, 300 
    ; MsgBox, %clipboard%  ; display the path 
    if (SubStr(clipboard, -2) != "png") 
    { 
     MsgBox, No PNG-file selected 
     clipboard := ClipSaved 
      return 
    } 
    ; otherwise: 
    SplitPath, clipboard, name, dir 
    FileMove, %clipboard%, %dir%\LAYOUT.png 
    Sleep, 100 
    clipboard := ClipSaved  ; restore original clipboard 
} 
else 
{ 
    MsgBox, No file selected 
    clipboard := ClipSaved 
} 
return 
+0

"user3419297"당신은 하나님이다 "LAYOUT"로 ! 고맙습니다! – Curioucity

관련 문제