Jump to content
Sign in to follow this  

A Custom MeGUI Script

Recommended Posts


I basically do a lot of video encoding and have slapped this script together and was looking to get a little feedback on ways for improvement on it.

The one thing that I would really like to be able to add is a "pause/resume" function so I can, you guessed, pause and resume the script when its running >_<

Func _end()
Exit 0
$fileinput = FileOpen("out.txt", 0)
$i = 1;
while $i <= 106
;=====Sets MeGUI up for auto-que=====
Opt("WinTitleMatchMode", 2)
WinActivate("MeGUI 0.3")
WinWait("MeGUI 0.3","")
WinMove("MeGUI 0.3","",1,1)
MouseClick("left",164,42,1,3);select tools
MouseClick("left",239,176,1,3);select avs script creator
WinWait("MeGUI - AviSynth script creator","")
WinMove("MeGUI - AviSynth script creator","",1,1);move aviscript creator tab to top left
MouseClick("left",447,90,1,3) ;selects source
$line = FileReadLine($fileinput)
WinWait("Select a source file","")
WinActivate("Select a source file","")
;=====Sets MeGUI up for auto-que=====

;======Closes Preview Of Video File=====
WinWait("Current position: ","")
WinClose("Current position: ")
;======Closes Preview Of Video File=====

;======Video Cropping=====
;MouseClick("left",35,296,1,3) ;Enables Video Cropping
;MouseClick("left", 203,279,1,3) ; Clicks Top Crop
;Send("{BS}") ;Sends Backspace
;Send("32");Crops 32 Pixels 
;MouseClick("left",198,309,1,3) ; Click Bottom Crop
;Send("{BS}") ;Sends Backspace
;Send("32") ;Crops 32 Pixels 
;MouseClickDrag("left",157,334,125,334);edit size
;Send("1280") ; used to downscale hd video
;MouseClick("left",260,337,1,3);mod 16 click
;======Video Cropping=====
MouseClick("left",441,500,1,3);Saves the script

MouseClick("left",487,296,1,3);Selects audio input
WinWait("Select your audio input","")
WinActivate("Select your audio input","")
WinWaitActive("MeGUI 0.3","")

MouseClick("left",465,510,1,3) ; autoencode button
WinWait("MeGUI - Automatic Encoding","")
WinMove("MeGUI - Automatic Encoding","",1,1)

;=======Pre-Defined File Size=============
;MouseClick("left",381,507,1,3);first custom encode size
;=======Pre-Defined File Size=============

;=======File Output Container=======
MouseClick("left",180,58,1,3) ; Container Click
MouseClick("left",147,77,1,3) ; MKV Format
;MouseClick("left",131,91,1,3) ; MP4 Format
;=======File Output Container=======

;=======Pre-Defined Bitrate=============
MouseClick("left",36,200,1,3) ; Average bitrate Button
MouseClickDrag("left",211,194,122,193) ; Clicks Bitrate And drags to Beginning
Send("420") ; sets bitrate to 420kbps
;=======Pre-Defined Bitrate=============

MouseClick("left",382,264,1,3);Queues The File
WinWaitActive("MeGUI 0.3","")
$i = $i + 1

out.txt example

ds9.1x02.past prologue.dvdrip.xvid.ac3-bags.avi
ds9.1x03.a man alone.dvdrip.xvid.ac3-bags.avi
ds9.1x05.captive pursuit.dvdrip.xvid.ac3-bags.avi

feedback is greatly appreciated as i have been modifying with this script for about 2-3 months now.



Edited by bb05

Share this post

Link to post
Share on other sites

Here's a demo of just one of many ways to implement "pause":

Global $f_RUN = True
Global $i = 0

HotKeySet("{ESC}", "_Quit")
HotKeySet("{PAUSE}", "_Pause")

While 1
    $i += 1
    ToolTip("$i = " & $i)

Func _Quit()

Func _Pause()
    $f_RUN = Not $f_RUN
    Until $f_RUN

The _Pause() function could also just toggle the global $f_RUN flag and you could check it inside your loop.


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.