i copy the filename but when i try to rename the file it doesn't do anything.
if i hardcode the filename it works.
What Im i doing wrong?
Please HELP!!
This is the code.
Code: Select all
F11::
Loop, 3
{
;copy the text
oApp := ComObjActive("Excel.Application")
oApp.range("B"y).select
oApp.Selection.Cut
;paste the text
IfWinExist, ahk_class Chrome_WidgetWin_1
WinActivate
;clicks hete to paste the text
MouseClick, left, 354,348
Sleep, 300
Send ^a
Send ^v
;export the mp3 file
MouseClick, left, 721, 715
Sleep, 3000
;copy the filename to rename
oApp := ComObjActive("Excel.Application")
oApp.range("A"y).select
oApp.Selection.Cut
clip = %Clipboard%
msgBox, %clip%
NewFileName = %clip%
;slelect the download folder
Folder = C:\Users\pcpi\Downloads
;order by recent
Loop, %Folder%\*
{
FileGetTime, Time, %A_LoopFileFullPath%, C
If (Time > Time_Orig)
{
Time_Orig := Time
File := A_LoopFileName
}
}
fileFullPath=%Folder%\%File%
newfile=%Folder%\%NewFileName%
Sleep, 300
FileMove, %fileFullPath%,%newfile%
y := y+1
}
MsgBox, Fim!!
log.finalizeLog("The End")
ExitApp
escape::
[Mod edit: Topic moved to AHK v1 help.]