<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://avisynth.nl/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=CallCmd</id>
		<title>CallCmd - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=CallCmd"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=CallCmd&amp;action=history"/>
		<updated>2026-06-04T12:28:03Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.24</generator>

	<entry>
		<id>http://avisynth.nl/index.php?title=CallCmd&amp;diff=11519&amp;oldid=prev</id>
		<title>Reel.Deal: CallCmd: add documentation</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=CallCmd&amp;diff=11519&amp;oldid=prev"/>
				<updated>2020-05-25T20:18:02Z</updated>
		
		<summary type="html">&lt;p&gt;CallCmd: add documentation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{FilterCat4|External_filters|Plugins|Plugins_x64|Support_filters}}&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
{{Filter3&lt;br /&gt;
|1={{Author/StainlessS}}&lt;br /&gt;
|2=v1.04&lt;br /&gt;
|3=[https://web.archive.org/web/20200525221448if_/https://files.videohelp.com/u/223002/CallCmd_x86_x64_dll_v1.04_20180404.zip CallCmd_x86_x64_dll_v1.04_20180404.zip]   &lt;br /&gt;
|4=[[:Category:Support_filters|Support filters]]&lt;br /&gt;
|5=[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
|6=[https://forum.doom9.org/showthread.php?t=166063 Doom9 Forum]&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
Plugin to execute command on selectable frames or at startup or closedown.&lt;br /&gt;
Based on Call by Nic:- http://forum.doom9.org/showthread.php?t=46506&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://www.microsoft.com/en-us/download/details.aspx?id=26368 Microsoft Visual C++ 2008 Redistributable Package (x86 / x64)] &amp;lt;includeonly&amp;gt;[[VC_9.0]]&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
:&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;***&amp;lt;/span&amp;gt; &amp;lt;tt&amp;gt;vcredist_x86.exe&amp;lt;/tt&amp;gt; is required for &amp;lt;tt&amp;gt;CallCmd-x86&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;***&amp;lt;/span&amp;gt; &amp;lt;tt&amp;gt;vcredist_x64.exe&amp;lt;/tt&amp;gt; is required for &amp;lt;tt&amp;gt;CallCmd-x64&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CallCmd(clip,string &amp;quot;Command&amp;quot;=&amp;quot;&amp;quot;, string &amp;quot;Frames&amp;quot;=&amp;quot;&amp;quot;,string &amp;quot;Insert&amp;quot;=&amp;quot;&amp;quot;,int &amp;quot;Digits&amp;quot;=6,bool &amp;quot;Once&amp;quot;=true,int &amp;quot;Offset&amp;quot;=0,&lt;br /&gt;
  bool &amp;quot;Hide&amp;quot;=false,bool &amp;quot;Debug&amp;quot;=false,string &amp;quot;Open&amp;quot;=&amp;quot;&amp;quot;,string &amp;quot;Close&amp;quot;=&amp;quot;&amp;quot;,int &amp;quot;Synchronous&amp;quot;=7)&lt;br /&gt;
&lt;br /&gt;
Command (default&amp;quot;&amp;quot;)&lt;br /&gt;
 A command string that will be executed on each frame specified by the Frames arg. Can contain a single INSERT arg character&lt;br /&gt;
 which will be replaced by a string representing the frame number with optional OFFSET. If the command naturally contains the&lt;br /&gt;
 INSERT character then choose a different INSERT charcter or use two INSERT characters in the Command string to escape it&lt;br /&gt;
 (one of them will be removed in the executed command).&lt;br /&gt;
&lt;br /&gt;
Frames (default &amp;quot;&amp;quot;)&lt;br /&gt;
 String to specify the frames upon which the COMMAND arg is executed.&lt;br /&gt;
 Comments beginning with '#' can occur in the FRAMES arg, SEMICOLON Cannot be used in a comment.&lt;br /&gt;
 SEMICOLON &amp;quot;;&amp;quot; or NewLine [Chr(10)] is used as a frame specifier terminator.&lt;br /&gt;
 COMMA &amp;quot;,&amp;quot; specifies a frame range where the 2nd range end number can be '0' meaning last frame, and eg '-4' meaning 4 frames. &lt;br /&gt;
 &amp;quot;0,0&amp;quot; Specifies ALL frames.&lt;br /&gt;
 Example: &lt;br /&gt;
    FRAMES=&amp;quot;&lt;br /&gt;
      1           # This is a comment, calls on frame 1.&lt;br /&gt;
      3;5;7       # Calls on frames 3 and 5 and 7, SEMICOLON is SOFT End Of Line and terminates any COMMENT.&lt;br /&gt;
      8           # Call Frame 8 ; 10 # *** IMPORTANT *** And because of SEMICOLON also calls on Frame 10.&lt;br /&gt;
      14,16       # Calls on frames 14 to 16, COMMA specifies a frame range.&lt;br /&gt;
      18,20;22    # Calls on Frame range 18 to 20 and frame 22.&lt;br /&gt;
      24,-4       # Specifies frames 24 to 27, ie 4 frames starting at frame 24.&lt;br /&gt;
    &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Insert (default &amp;quot;&amp;quot;)&lt;br /&gt;
  Single character which will be replaced in the Command arg string by frame number + OFFSET arg.&lt;br /&gt;
  If the command naturally contains an INSERT character then choose a different INSERT arg charcter or use two INSERT characters &lt;br /&gt;
  in the Command string to escape the naturally occuring one (one of them will be removed in the executed command).&lt;br /&gt;
&lt;br /&gt;
Digits (default 6)&lt;br /&gt;
  Minimum number of digits generated in inserted text that replaces the INSERT character in the COMMAND arg.&lt;br /&gt;
 &lt;br /&gt;
Once (default=true)&lt;br /&gt;
  If true then only executes frame commands once on each frame, if replayed, does not exec 2nd time.&lt;br /&gt;
  &lt;br /&gt;
Offset (default 0)&lt;br /&gt;
  Offset added to frame number when generating text inserted into a frame command replacing the INSERT character.&lt;br /&gt;
&lt;br /&gt;
Hide (default false)&lt;br /&gt;
 If true, hide black console window on command execution.&lt;br /&gt;
&lt;br /&gt;
Debug (default false)&lt;br /&gt;
 If true, sends debug info to DebugView Window.&lt;br /&gt;
 DebugView (Highly recommended, allows viewing of info and warnings from the plugins and other programs)&lt;br /&gt;
 http://technet.microsoft.com/en-gb/sysinternals/bb545027&lt;br /&gt;
&lt;br /&gt;
Open (default &amp;quot;&amp;quot;)&lt;br /&gt;
  Command executed on plugin start up (Constructor), before first frame.&lt;br /&gt;
  No string replacements, ie INSERT, DIGITS and OFFSET have no effect.&lt;br /&gt;
&lt;br /&gt;
Close (default &amp;quot;&amp;quot;)&lt;br /&gt;
  Command executed on plugin close down (Destructor), after last frame.&lt;br /&gt;
  No string replacements, ie INSERT, DIGITS and OFFSET have no effect.&lt;br /&gt;
&lt;br /&gt;
Synchronous (default 7, range 0 - 7)&lt;br /&gt;
  The Synchronous arg is a group of 3 bitflags, &lt;br /&gt;
    bit 0 if set means wait for process to terminate before returning from the 'Open' command.&lt;br /&gt;
    bit 1 if set means wait for process to terminate before returning from the 'Frames' commands.&lt;br /&gt;
    bit 2 if set means wait for process to terminate before returning from the 'Close' command.&lt;br /&gt;
      0 = All Asynchronous, ie dont wait at all.&lt;br /&gt;
      1 = Wait only on 'Open' command.&lt;br /&gt;
      2 = Wait only on 'Frames' commands.&lt;br /&gt;
      3 = Wait on 'Open' and 'Frames' commands.&lt;br /&gt;
      4 = Wait on 'Close' command.&lt;br /&gt;
      5 = Wait on 'Open' and 'Close' commands.&lt;br /&gt;
      6 = Wait on 'Frames' and 'Close' commands.&lt;br /&gt;
      7 = Wait on ALL commands (default).&lt;br /&gt;
&lt;br /&gt;
   Beware, if you dont wait it is very possible that any future reliance upon output of command may fail due to the&lt;br /&gt;
   output file being in use. Also, if debug true and waiting for process to complete, then will also show the process return&lt;br /&gt;
   code on successful process creation (and completion) in DebugView, cannot do this if NOT waiting completion.&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
CallCmd, does NOT replace single quotes with double quotes in Command string, was source of problems in Call().&lt;br /&gt;
Instead wrap eg filenames containing spaces in double-quotes using perhaps:&lt;br /&gt;
&lt;br /&gt;
 Function QuoteStr(String s) { return Chr(34) + s + Chr(34) }&lt;br /&gt;
&lt;br /&gt;
or use triple and single double-quotes eg&lt;br /&gt;
&lt;br /&gt;
  CallCmd(BlankClip,Close=&amp;quot;&amp;quot;&amp;quot;d:\nicecho.exe @d:\report.txt &amp;quot;Appending&amp;quot; &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
Executing on each playing, on every frame, hiding console window, sending debug info to debugview, and converting&lt;br /&gt;
command string on frame eg 0 to  &amp;quot;C:\PortableApps\ImageMagick\Mogrify.exe -flop C:\Temp\000000.tif&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  CallCmd(clip,&amp;quot;C:\PortableApps\ImageMagick\Mogrify.exe -flop C:\Temp\#.tif&amp;quot;, &amp;quot;0,0&amp;quot;,Insert=&amp;quot;#&amp;quot;,Once=false,Hide=true,Debug=true)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At Open, executes delete on wildcard files silently, without asking confirmation.&lt;br /&gt;
  CallCmd(Open=&amp;quot;&amp;quot;&amp;quot;cmd /c DEL /Q &amp;quot;C:\TEMP\test_*.tif&amp;quot; &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To execute DOS type commands, in DOS console type &amp;quot;cmd /?&amp;quot; for cmd options, and eg DEL /? for delete options.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples == &lt;br /&gt;
[[TODO]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 v0.00b beta - 27 Sept 2012, first Release&lt;br /&gt;
 v0.01b beta - 01 Oct 2012&lt;br /&gt;
 v1.00,      - 08 Oct 2012,  Changed Frames spec, added Open,Close&lt;br /&gt;
 v1.01,      - 21 Oct 2012,  Add Synchronous Arg.&lt;br /&gt;
 v1.02,      - 1 Jan 2013,   Add error message on fail.&lt;br /&gt;
 v1.03,                      SetLastError(ERROR_SUCCESS) prior to call.&lt;br /&gt;
 v1.04,      - 3 Apr 2018,   compile VS2008&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;500px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;200px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;200px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v1.04&lt;br /&gt;
|[https://web.archive.org/web/20200525221448if_/https://files.videohelp.com/u/223002/CallCmd_x86_x64_dll_v1.04_20180404.zip CallCmd_x86_x64_dll_v1.04_20180404.zip] &lt;br /&gt;
|[https://www.mediafire.com/file/hbwnmfknk2hnj1u/CallCmd_x86_x64_dll_v1.04_20180404.zip/file CallCmd_x86_x64_dll_v1.04_20180404.zip]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Support_filters|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Reel.Deal</name></author>	</entry>

	</feed>