AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need Variable String in Filname: %

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
blenderman



Joined: 12 Oct 2006
Posts: 6

PostPosted: Fri Oct 13, 2006 10:17 am    Post subject: Need Variable String in Filname: % Reply with quote

Hello,

i need the follwo string in my autohokey script:
video%d4.jpg

(its for ffmpeg video%d4.jpg means video####.jpg)


How i have do declare it?
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6836
Location: France (near Paris)

PostPosted: Fri Oct 13, 2006 10:32 am    Post subject: Reply with quote

Two (documented) ways:
a = video`%d4.jpg
b := "video%d4.jpg"

_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
blenderman



Joined: 12 Oct 2006
Posts: 6

PostPosted: Fri Oct 13, 2006 10:34 am    Post subject: Reply with quote

You are so fast... Thank you very much

And sorry - I donīt found it - for search is % to short and my englisch to poor...
Back to top
View user's profile Send private message
badmojo



Joined: 11 Nov 2005
Posts: 202

PostPosted: Fri May 15, 2009 3:45 pm    Post subject: Reply with quote

i'm trying to make some video thumbnails with ffmpeg.exe but i can get only 'thumb14.jpg' instead of 'thumb####.jpg' like what the OP wanted. can someone take a look at my code and tell me what's wrong?

Code:
ffmpegpath=c:\ffmpeg\ffmpeg.exe
SeekTime=250

FileSelectFile, InputFile, 3, , Select the video file, AVI (*.avi)
if InputFile =
    MsgBox, The user didn't select anything.
else
{
ffthumb=%ffmpegpath%%A_Space%-i%A_Space%"%InputFile%"%A_Space%-vcodec mjpeg -vframes 1 -an -f image2
ffthumb=%ffthumb%%A_Space%-ss%A_Space%%SeekTime%
ffthumb=%ffthumb%%A_Space%thumb`%d4.jpg

SplitPath, Output, InputFile, getDir, getExtension, getNameNoExt, getDrive
RunWait, %ffthumb%, %getDir%, UseErrorLevel
If ErrorLevel <> ERROR
  TrayTip,, Thumbnail successfully created.,,1
}


this is what i wanted to put in the script:
Quote:
ffmpeg.exe" -i "inputfile" -vcodec mjpeg -vframes 1 -an -f image2 -ss 250 "thumb%d4.jpg"
Back to top
View user's profile Send private message
badmojo



Joined: 11 Nov 2005
Posts: 202

PostPosted: Sat May 16, 2009 10:55 am    Post subject: Reply with quote

so any ideas why this happens?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group