StainlessS
27th December 2015, 03:20
VD_EdKey. Utility for Avisynth, v1.02
VD_EdKey v1.02 for VirtualDub2 [recently about build 43602].
VD_EdKey, is a compiled AutoIt script utility, intended to assist in creating Avisynth frames command files.
Create command file in VirtualDub2 with VD_EdKey, and use command file in Avisynth script functions.
VD_EdKey is used together with VirtualDub2 and NotePad. You must run the app, with BOTH VirtualDub2 and the
NotePad Editor VISIBLE, you can scroll through a video clip, and press eg CTRL/INSERT to insert the current frame number
into the NotePad Editor. You press the keys with VDub2 as the active window (not NotePad).
VD_EdKey requires VirtualDub2, neither VirtualDub Std nor VirtualDubMod will be recognised.
After creating Command file in NotePad, Save as eg Command.txt and provide it as eg SelectRanges(Cmd="Command.txt") or
RejectRanges((Cmd="Command.txt") {Select/RejectRanges supplied with both Framesel and Prune Avisynth plugins).
*** Current frame is shown in VirtualDub2 in the middle of the status bar. ***
*** Ranges are marked in VirtualDub2 via HOME and END keys, shown at Left of status bar (when marked). ***
It is important to NOT do any VirtualDub2 clip editing, if you eg delete a frame in VirtualDub2, then all frames after that frame will
be off by 1, and so all VD_EdKey edited ranges/frames inserted later into NotePad file will be also off by 1.
The VDub2 loaded clip can be either an AVI or AVS clip, it makes no difference.
All VD_EdKey Keyboard commands:-
# Inserted into NotePad Text file
CTRL/INSERT Insert current frame eg '42'.
CTRL/SHIFT/INSERT Insert current range eg '42,52'. (single frame range is converted to single frame)
# Special use (where script frames file processor gives special meaning to -ve frame or range):
CTRL/DELETE Insert -ve current frame '-42'.
CTRL/SHIFT/DELETE Insert -ve current range '-42,52'. (single frame range is converted to single frame)
# Terminate:
CTRL+SHIFT+ALT+PAUSE is TERMINATE Program (or close via System Tray icon). PAUSE is also known as BREAK, usually next to Scroll Lock.
NOTE: A range shown in VDub2 status bar as eg "Selecting Frames 100-102(2 frames)" represents frames 100 and 101, frame 102 is exclusive and
does not count. By default, VD_EdKey uses Inclusive END frame ranges (same as Avisynth where end frame DOES count).
You can change the default behaviour to behave the same as VDub2 by Running VD_EdKey.Exe at least once and changing the auto created
VD_EdKey.ini file contents from "RangeEndIsExclusive=0" to "RangeEndIsExclusive=1". When using VDub2 "RangeEndIsExclusive=1" mode,
we subtract 1 from the End Frame to convert to Avisynth End Frame Inclusive specification when writing range to NotePad command.
When sending a command using VDub exclusive mode with a status bar range of "100-100(frames=0)", it will beep and show a "No Frames"
type error message for a few seconds, in Avisynth Inclusive mode it will send a 1 frame range command to the NotePad window.
It is easy to see what is happening as the NotePad window will be visible and after each insertion into NotePad, an ENTER key
will also be sent to move the cursor down one line, each command is on its own line. If you make a mistake, it is easy to
just switch to NotePad window and delete the erroneous line.
Will only work with Windows System NotePad, and not a hard wired replacement text editor.
That is it, thats all it does. Is easier than switching windows, insert/delete frame number, and then back to original window again.
The -ve frame numbers and ranges may be of use if some script or other can use this info to eg remove a scene change when -ve,
or insert one when +ve, how the +ve, -ve numbers are used is in your court.
AutoiIt compiled executable with source provided, just click Menu Tools/build to create executable (In Scite4AutoIt3 editor).
Requires AutoIt3 and Scite4AutoIt3 editor to re-build executable.
ssS
AutoIt Source
#cs ----------------------------------------------------------------------------
This program is free software; you can redistribute it and/or modify
it under an terms terms you like.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Use at you own risk.
#ce ----------------------------------------------------------------------------
; VD_EdKey v1.01 by StainlessS ... compiled with AutiIt v3.3.14.5
#include <MsgBoxConstants.au3>
#include <Misc.au3>
Opt("MustDeclareVars", 1)
;;;
Global Const $APP_NAME = "VD_EdKey.Exe"
Global Const $APP_INI = "VD_EdKey.ini"
Global Const $APPTitle = "VirtualDub2" ; VirtualDub2 matches as "VirtualDub2" with traiiling "Build number" on title bar.
Global Const $Watching = " VD_EdKey is WATCHING "
Global Const $VdFrameNo = "[CLASS:Static; INSTANCE:1]" ; Frame Indicator box (bottom middle of window, just above status line)
Global Const $VDRange = "[CLASS:msctls_statusbar32; INSTANCE:1]" ; Frame Range (bottom Left of window, 'Selecting Frames...' when range selected)
;
; CAN CHANGE below "Notepad" and "Edit" to change editor, use AutoIt Au3Info program to get names (try 1st with NotePad.exe to see how to use it).
Global Const $EdTitle = "[CLASS:Notepad]" ; NotePad Window name.
Global Const $EditControl = "[CLASS:Edit; INSTANCE:1]" ; NotePad text editor window control.
; eg for NotePad2, Comment out above two lines and uncomment below two lines (Semi Colon is comment character).
; After changes, in AutoIt SciTE source editor, hit F7 to rebuild executable. (probably the same key in the basic AutoIt included editor).
;Global Const $EdTitle = "[CLASS:Notepad2]" ; NotePad2 Window name.
;Global Const $EditControl = "[CLASS:SysListView32; INSTANCE:1]" ; NotePad2 text editor window control.
;
Global $Doze = 250
Global Const $ShowCntLimit = 2000 / $Doze
Global $InAPP = False
Global $ShowCnt = 0
Global $RangeEndIsExclusive= 0 ; 0=Avisynth, 1=VDub : Will Get from VD_EdKey.ini if exists
If _Singleton($APP_NAME, 1) = 0 Then
MsgBox($MB_SYSTEMMODAL, "Warning", "An occurrence of " & $APP_NAME & " is already running")
Exit
EndIf
; Get defaults from ini file (if exists).
$RangeEndIsExclusive = IniRead(@ScriptDir & "\" & $APP_INI, "Default", "RangeEndIsExclusive", 0)
; Update ini file.
IniWrite(@ScriptDir & "\" & $APP_INI, "Default", "RangeEndIsExclusive", $RangeEndIsExclusive)
;
OnAutoItExitRegister("Fn_AtExit") ; Whatever cleanup to do on termination
HotKeySet("^+!{PAUSE}", "Fn_Terminate") ; CTRL+SHIFT+ALT+PAUSE {PAUSE aka BREAK} is TERMINATE Program (or close via System Tray icon)
; Main Program Loop
Do
If Not $InAPP Then
If WinActive($APPTitle) And WinExists($EdTitle) Then
Bind() ; Make HotKeys active
$InAPP = True
EndIf
Else
If Not WinActive($APPTitle) Or Not WinExists($EdTitle) Then
UnBind() ; Deactivate Hotkeys
$InAPP = False
EndIf
EndIf
Sleep($Doze)
If $ShowCnt > 0 Then
$ShowCnt = $ShowCnt - 1
If $ShowCnt = 0 Then
ToolTip("") ; Display time expired, Switch off "VD_EdKey is WATCHING"
EndIf
EndIf
Until (1+1 <> 2) ; 4E4, ... for a long time.
;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
Func Bind()
HotKeySet("^{INSERT}", "InsertFrame") ; CTRL/INSERT : Insert Frame
HotKeySet("^+{INSERT}", "InsertRange") ; CTRL/SHIFT/INSERT : Insert Range
HotKeySet("^{DELETE}", "DeleteFrame") ; CTRL/DELETE : Delete Frame
HotKeySet("^+{DELETE}", "DeleteRange") ; CTRL/SHIFT/DELETE : Delete Range
$ShowCnt = $ShowCntLimit
if $RangeEndIsExclusive <> 0 Then
ToolTip($Watching & " --- Range End Is Exclusive")
Else
ToolTip($Watching)
EndIf
EndFunc
Func UnBind()
ToolTip("") ; switch off tooltips.
$ShowCnt = 0
; Disable HotKeys
HotKeySet("^{INSERT}") ; CTRL/INSERT
HotKeySet("^+{INSERT}") ; CTRL/SHIFT/INSERT
HotKeySet("^{DELETE}") ; CTRL/DELETE
HotKeySet("^+{DELETE}") ; CTRL/SHIFT/DELETE
EndFunc
Func Fn_AtExit()
HotKeySet("+^!{PAUSE}") ; Disable Program Terminate Hotkey
UnBind()
EndFunc
Func Fn_Terminate()
Exit 0; Goodbye cruel world. ; Will call Fn_AtExit to clean up (assuming OnAutoItExitRegister registered to Fn_AtExit)
EndFunc
Func GetFrameNo() ; Return VirtualDub Frame Number as string, else "" on Error
Local $Frm = ""
Local $E = ControlGetText($APPTitle,"", $VdFrameNo)
; MsgBox($MB_SYSTEMMODAL, "", "The text in Edit1 is: " & $E)
if StringLeft($E,6) = "Frame " Then ; Case Insignificant
$E= StringMid($E,7) ; Strip 'Frame '
While $E <> "" and StringIsDigit(StringMid($E,1,1))
$Frm = $Frm & StringMid($E,1,1)
$E=StringMid($E,2)
Wend
EndIf
if $Frm=="" then
Beep(500,50)
EndIf
Return $Frm
EndFunc
Func GetRange() ; Return Selected Range as string, else "" on Error (comma separated range or single frame if only 1 frame ramge)
Local $Rng = ""
Local $S = ControlGetText($APPTitle,"", $VdRange)
if StringMid($S,1,17) = "Selecting frames " Then ; Case Insignificant
$S = StringMid($S,18) ; Strip 'Selecting Range '
While $S <> "" and StringIsDigit(StringMid($S,1,1))
$Rng = $Rng & StringMid($S,1,1)
$S=StringMid($S,2)
Wend
if StringMid($S,1,1) = "-" then
Local $E=StringMid($S,2) ; Strip '-'
Local $RngE=""
if StringIsDigit(StringMid($E,1,1)) then
While $E<> "" and StringIsDigit(StringMid($E,1,1))
$RngE = $RngE & StringMid($E,1,1)
$E=StringMid($E,2)
Wend
Local $IS=Number($Rng)
Local $IE=Number($RngE)
if $RangeEndIsExclusive <> 0 then
$IE = $IE - 1 ; VDub, End of Range is Exclusive
EndIf
if $IE < $IS Then
$Rng=""
ToolTip("Range Is Exclusive (No Frames)")
$ShowCnt = $ShowCntLimit * 2
Elseif $IE > $IS Then
$Rng = StringFormat("%d,%d",$IS,$IE)
EndIf
EndIf
Endif
Else
ToolTip("No Range")
$ShowCnt = $ShowCntLimit * 2
EndIf
if $Rng=="" then
Beep(500,50)
EndIf
Return $Rng
EndFunc
Func InsertFrame()
Local $Frm=GetFrameNo()
if $Frm <> "" Then
ControlSend($EdTitle, "", $EditControl, $Frm, 1) ; Send Frame Number
ControlSend($EdTitle, "", $EditControl, "{ENTER}", 0) ; Send ENTER key, 1 line down.
endif
EndFunc
Func InsertRange()
Local $Rng=GetRange()
if $Rng <> "" Then
ControlSend($EdTitle, "", $EditControl, $Rng, 1) ; Send Range
ControlSend($EdTitle, "", $EditControl, "{ENTER}", 0) ; Send ENTER key, 1 line down.
endif
EndFunc
Func DeleteFrame()
Local $Frm=GetFrameNo()
if $Frm <> "" Then
ControlSend($EdTitle, "", $EditControl, "-" & $Frm, 1) ; Send -ve Frame Number
ControlSend($EdTitle, "", $EditControl, "{ENTER}", 0) ; Send ENTER key, 1 line down.
endif
EndFunc
Func DeleteRange()
Local $Rng=GetRange()
if $Rng <> "" Then
ControlSend($EdTitle, "", $EditControl, "-" & $Rng, 1) ; Send -ve Range
ControlSend($EdTitle, "", $EditControl, "{ENTER}", 0) ; Send ENTER key, 1 line down.
endif
EndFunc
See UTILITY directory @ MediaFire in my sig below.
VD_EdKey v1.02 for VirtualDub2 [recently about build 43602].
VD_EdKey, is a compiled AutoIt script utility, intended to assist in creating Avisynth frames command files.
Create command file in VirtualDub2 with VD_EdKey, and use command file in Avisynth script functions.
VD_EdKey is used together with VirtualDub2 and NotePad. You must run the app, with BOTH VirtualDub2 and the
NotePad Editor VISIBLE, you can scroll through a video clip, and press eg CTRL/INSERT to insert the current frame number
into the NotePad Editor. You press the keys with VDub2 as the active window (not NotePad).
VD_EdKey requires VirtualDub2, neither VirtualDub Std nor VirtualDubMod will be recognised.
After creating Command file in NotePad, Save as eg Command.txt and provide it as eg SelectRanges(Cmd="Command.txt") or
RejectRanges((Cmd="Command.txt") {Select/RejectRanges supplied with both Framesel and Prune Avisynth plugins).
*** Current frame is shown in VirtualDub2 in the middle of the status bar. ***
*** Ranges are marked in VirtualDub2 via HOME and END keys, shown at Left of status bar (when marked). ***
It is important to NOT do any VirtualDub2 clip editing, if you eg delete a frame in VirtualDub2, then all frames after that frame will
be off by 1, and so all VD_EdKey edited ranges/frames inserted later into NotePad file will be also off by 1.
The VDub2 loaded clip can be either an AVI or AVS clip, it makes no difference.
All VD_EdKey Keyboard commands:-
# Inserted into NotePad Text file
CTRL/INSERT Insert current frame eg '42'.
CTRL/SHIFT/INSERT Insert current range eg '42,52'. (single frame range is converted to single frame)
# Special use (where script frames file processor gives special meaning to -ve frame or range):
CTRL/DELETE Insert -ve current frame '-42'.
CTRL/SHIFT/DELETE Insert -ve current range '-42,52'. (single frame range is converted to single frame)
# Terminate:
CTRL+SHIFT+ALT+PAUSE is TERMINATE Program (or close via System Tray icon). PAUSE is also known as BREAK, usually next to Scroll Lock.
NOTE: A range shown in VDub2 status bar as eg "Selecting Frames 100-102(2 frames)" represents frames 100 and 101, frame 102 is exclusive and
does not count. By default, VD_EdKey uses Inclusive END frame ranges (same as Avisynth where end frame DOES count).
You can change the default behaviour to behave the same as VDub2 by Running VD_EdKey.Exe at least once and changing the auto created
VD_EdKey.ini file contents from "RangeEndIsExclusive=0" to "RangeEndIsExclusive=1". When using VDub2 "RangeEndIsExclusive=1" mode,
we subtract 1 from the End Frame to convert to Avisynth End Frame Inclusive specification when writing range to NotePad command.
When sending a command using VDub exclusive mode with a status bar range of "100-100(frames=0)", it will beep and show a "No Frames"
type error message for a few seconds, in Avisynth Inclusive mode it will send a 1 frame range command to the NotePad window.
It is easy to see what is happening as the NotePad window will be visible and after each insertion into NotePad, an ENTER key
will also be sent to move the cursor down one line, each command is on its own line. If you make a mistake, it is easy to
just switch to NotePad window and delete the erroneous line.
Will only work with Windows System NotePad, and not a hard wired replacement text editor.
That is it, thats all it does. Is easier than switching windows, insert/delete frame number, and then back to original window again.
The -ve frame numbers and ranges may be of use if some script or other can use this info to eg remove a scene change when -ve,
or insert one when +ve, how the +ve, -ve numbers are used is in your court.
AutoiIt compiled executable with source provided, just click Menu Tools/build to create executable (In Scite4AutoIt3 editor).
Requires AutoIt3 and Scite4AutoIt3 editor to re-build executable.
ssS
AutoIt Source
#cs ----------------------------------------------------------------------------
This program is free software; you can redistribute it and/or modify
it under an terms terms you like.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Use at you own risk.
#ce ----------------------------------------------------------------------------
; VD_EdKey v1.01 by StainlessS ... compiled with AutiIt v3.3.14.5
#include <MsgBoxConstants.au3>
#include <Misc.au3>
Opt("MustDeclareVars", 1)
;;;
Global Const $APP_NAME = "VD_EdKey.Exe"
Global Const $APP_INI = "VD_EdKey.ini"
Global Const $APPTitle = "VirtualDub2" ; VirtualDub2 matches as "VirtualDub2" with traiiling "Build number" on title bar.
Global Const $Watching = " VD_EdKey is WATCHING "
Global Const $VdFrameNo = "[CLASS:Static; INSTANCE:1]" ; Frame Indicator box (bottom middle of window, just above status line)
Global Const $VDRange = "[CLASS:msctls_statusbar32; INSTANCE:1]" ; Frame Range (bottom Left of window, 'Selecting Frames...' when range selected)
;
; CAN CHANGE below "Notepad" and "Edit" to change editor, use AutoIt Au3Info program to get names (try 1st with NotePad.exe to see how to use it).
Global Const $EdTitle = "[CLASS:Notepad]" ; NotePad Window name.
Global Const $EditControl = "[CLASS:Edit; INSTANCE:1]" ; NotePad text editor window control.
; eg for NotePad2, Comment out above two lines and uncomment below two lines (Semi Colon is comment character).
; After changes, in AutoIt SciTE source editor, hit F7 to rebuild executable. (probably the same key in the basic AutoIt included editor).
;Global Const $EdTitle = "[CLASS:Notepad2]" ; NotePad2 Window name.
;Global Const $EditControl = "[CLASS:SysListView32; INSTANCE:1]" ; NotePad2 text editor window control.
;
Global $Doze = 250
Global Const $ShowCntLimit = 2000 / $Doze
Global $InAPP = False
Global $ShowCnt = 0
Global $RangeEndIsExclusive= 0 ; 0=Avisynth, 1=VDub : Will Get from VD_EdKey.ini if exists
If _Singleton($APP_NAME, 1) = 0 Then
MsgBox($MB_SYSTEMMODAL, "Warning", "An occurrence of " & $APP_NAME & " is already running")
Exit
EndIf
; Get defaults from ini file (if exists).
$RangeEndIsExclusive = IniRead(@ScriptDir & "\" & $APP_INI, "Default", "RangeEndIsExclusive", 0)
; Update ini file.
IniWrite(@ScriptDir & "\" & $APP_INI, "Default", "RangeEndIsExclusive", $RangeEndIsExclusive)
;
OnAutoItExitRegister("Fn_AtExit") ; Whatever cleanup to do on termination
HotKeySet("^+!{PAUSE}", "Fn_Terminate") ; CTRL+SHIFT+ALT+PAUSE {PAUSE aka BREAK} is TERMINATE Program (or close via System Tray icon)
; Main Program Loop
Do
If Not $InAPP Then
If WinActive($APPTitle) And WinExists($EdTitle) Then
Bind() ; Make HotKeys active
$InAPP = True
EndIf
Else
If Not WinActive($APPTitle) Or Not WinExists($EdTitle) Then
UnBind() ; Deactivate Hotkeys
$InAPP = False
EndIf
EndIf
Sleep($Doze)
If $ShowCnt > 0 Then
$ShowCnt = $ShowCnt - 1
If $ShowCnt = 0 Then
ToolTip("") ; Display time expired, Switch off "VD_EdKey is WATCHING"
EndIf
EndIf
Until (1+1 <> 2) ; 4E4, ... for a long time.
;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
Func Bind()
HotKeySet("^{INSERT}", "InsertFrame") ; CTRL/INSERT : Insert Frame
HotKeySet("^+{INSERT}", "InsertRange") ; CTRL/SHIFT/INSERT : Insert Range
HotKeySet("^{DELETE}", "DeleteFrame") ; CTRL/DELETE : Delete Frame
HotKeySet("^+{DELETE}", "DeleteRange") ; CTRL/SHIFT/DELETE : Delete Range
$ShowCnt = $ShowCntLimit
if $RangeEndIsExclusive <> 0 Then
ToolTip($Watching & " --- Range End Is Exclusive")
Else
ToolTip($Watching)
EndIf
EndFunc
Func UnBind()
ToolTip("") ; switch off tooltips.
$ShowCnt = 0
; Disable HotKeys
HotKeySet("^{INSERT}") ; CTRL/INSERT
HotKeySet("^+{INSERT}") ; CTRL/SHIFT/INSERT
HotKeySet("^{DELETE}") ; CTRL/DELETE
HotKeySet("^+{DELETE}") ; CTRL/SHIFT/DELETE
EndFunc
Func Fn_AtExit()
HotKeySet("+^!{PAUSE}") ; Disable Program Terminate Hotkey
UnBind()
EndFunc
Func Fn_Terminate()
Exit 0; Goodbye cruel world. ; Will call Fn_AtExit to clean up (assuming OnAutoItExitRegister registered to Fn_AtExit)
EndFunc
Func GetFrameNo() ; Return VirtualDub Frame Number as string, else "" on Error
Local $Frm = ""
Local $E = ControlGetText($APPTitle,"", $VdFrameNo)
; MsgBox($MB_SYSTEMMODAL, "", "The text in Edit1 is: " & $E)
if StringLeft($E,6) = "Frame " Then ; Case Insignificant
$E= StringMid($E,7) ; Strip 'Frame '
While $E <> "" and StringIsDigit(StringMid($E,1,1))
$Frm = $Frm & StringMid($E,1,1)
$E=StringMid($E,2)
Wend
EndIf
if $Frm=="" then
Beep(500,50)
EndIf
Return $Frm
EndFunc
Func GetRange() ; Return Selected Range as string, else "" on Error (comma separated range or single frame if only 1 frame ramge)
Local $Rng = ""
Local $S = ControlGetText($APPTitle,"", $VdRange)
if StringMid($S,1,17) = "Selecting frames " Then ; Case Insignificant
$S = StringMid($S,18) ; Strip 'Selecting Range '
While $S <> "" and StringIsDigit(StringMid($S,1,1))
$Rng = $Rng & StringMid($S,1,1)
$S=StringMid($S,2)
Wend
if StringMid($S,1,1) = "-" then
Local $E=StringMid($S,2) ; Strip '-'
Local $RngE=""
if StringIsDigit(StringMid($E,1,1)) then
While $E<> "" and StringIsDigit(StringMid($E,1,1))
$RngE = $RngE & StringMid($E,1,1)
$E=StringMid($E,2)
Wend
Local $IS=Number($Rng)
Local $IE=Number($RngE)
if $RangeEndIsExclusive <> 0 then
$IE = $IE - 1 ; VDub, End of Range is Exclusive
EndIf
if $IE < $IS Then
$Rng=""
ToolTip("Range Is Exclusive (No Frames)")
$ShowCnt = $ShowCntLimit * 2
Elseif $IE > $IS Then
$Rng = StringFormat("%d,%d",$IS,$IE)
EndIf
EndIf
Endif
Else
ToolTip("No Range")
$ShowCnt = $ShowCntLimit * 2
EndIf
if $Rng=="" then
Beep(500,50)
EndIf
Return $Rng
EndFunc
Func InsertFrame()
Local $Frm=GetFrameNo()
if $Frm <> "" Then
ControlSend($EdTitle, "", $EditControl, $Frm, 1) ; Send Frame Number
ControlSend($EdTitle, "", $EditControl, "{ENTER}", 0) ; Send ENTER key, 1 line down.
endif
EndFunc
Func InsertRange()
Local $Rng=GetRange()
if $Rng <> "" Then
ControlSend($EdTitle, "", $EditControl, $Rng, 1) ; Send Range
ControlSend($EdTitle, "", $EditControl, "{ENTER}", 0) ; Send ENTER key, 1 line down.
endif
EndFunc
Func DeleteFrame()
Local $Frm=GetFrameNo()
if $Frm <> "" Then
ControlSend($EdTitle, "", $EditControl, "-" & $Frm, 1) ; Send -ve Frame Number
ControlSend($EdTitle, "", $EditControl, "{ENTER}", 0) ; Send ENTER key, 1 line down.
endif
EndFunc
Func DeleteRange()
Local $Rng=GetRange()
if $Rng <> "" Then
ControlSend($EdTitle, "", $EditControl, "-" & $Rng, 1) ; Send -ve Range
ControlSend($EdTitle, "", $EditControl, "{ENTER}", 0) ; Send ENTER key, 1 line down.
endif
EndFunc
See UTILITY directory @ MediaFire in my sig below.