Hi All
A little conundrum for you...
I already have AHK controlling my editing software to render a video file to a specific folder using my editing software. My challenge is to pause the script until the write completes and then allow it to carry on. I don't want to use an onscreen ImageSearch because that ties up my computer. Can anyone offer a way I can get the script to detect when the write process has ended?
Thanks.
Detecting activity within a specific folder
Re: Detecting activity within a specific folder
Code: Select all
while(!FileExist("C:\my_render.mp4"))
Sleep 25
Re: Detecting activity within a specific folder
OK thanks swag. I'd assumed the detection would be on creation. I'll give that a go.
Re: Detecting activity within a specific folder
Actually, just noticed, that doesn't solve my problem. I need a way to detect activity within a specified folder, but the file name is created on the fly, so I can't address that in the script.
Any other ideas or is this just not possible in AHK?
Any other ideas or is this just not possible in AHK?
Re: Detecting activity within a specific folder
Maybe you could compare the folder size of the output folder.
At the beginning of your script you let it check the size
As soon as it has become bigger, you let your script continue.
I've never done something like that, though.
No idea if this can do the job.
Regards
At the beginning of your script you let it check the size
As soon as it has become bigger, you let your script continue.
I've never done something like that, though.
No idea if this can do the job.
Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Re: Detecting activity within a specific folder
How about this:
Assuming the rendering software doesn't allow accessing the file by other processes while it's writing.
Code: Select all
While !FileOpen("outputfile.mp4","r-")
Sleep 500
MsgBox Done rendering
- AlphaBravo
- Posts: 586
- Joined: 29 Sep 2013, 22:59
Re: Detecting activity within a specific folder
I haven't used it much but look at watchdirectory
Who is online
Users browsing this forum: cjsmile999, Google [Bot] and 366 guests