<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kolmafia.us/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alphacow</id>
	<title>Kolmafia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kolmafia.us/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alphacow"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Special:Contributions/Alphacow"/>
	<updated>2026-04-25T06:27:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Cli_execute&amp;diff=2829</id>
		<title>Cli execute</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Cli_execute&amp;diff=2829"/>
		<updated>2010-02-11T16:10:48Z</updated>

		<summary type="html">&lt;p&gt;Alphacow: group together many cli_execute commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;[[boolean]] cli_execute( [[string]] command )&#039;&#039;&#039;&lt;br /&gt;
Executes the given command as a CLI command, rather than ASH.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// snippet from my aftercore.ash script&lt;br /&gt;
    cli_execute(&amp;quot;outfit &amp;quot;+consumption_outfit);&lt;br /&gt;
    &lt;br /&gt;
    if (use_milk_of_mag) cli_execute(&amp;quot;use milk of magnesium&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    foreach i in food_items&lt;br /&gt;
    {&lt;br /&gt;
    &lt;br /&gt;
      cli_execute(&amp;quot;eat &amp;quot;+food_items[i]);&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    foreach i in booze_items&lt;br /&gt;
    {&lt;br /&gt;
    &lt;br /&gt;
      cli_execute(&amp;quot;drink &amp;quot;+booze_items[i]);&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    foreach i in spleen_items&lt;br /&gt;
    {&lt;br /&gt;
    &lt;br /&gt;
      cli_execute(&amp;quot;use &amp;quot;+spleen_items[i]);&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    if (switch_ode_polka)&lt;br /&gt;
    {&lt;br /&gt;
      cli_execute(&amp;quot;uneffect ode to booze&amp;quot;);&lt;br /&gt;
      cli_execute(&amp;quot;nuns&amp;quot;);&lt;br /&gt;
      cli_execute(&amp;quot;cast 35 polka of plenty&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you can speed things up (and possibly reduce the number of HTTP requests sent to KoL) by combining multiple requests in one command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # from bottom of above code...&lt;br /&gt;
    if (switch_ode_polka)&lt;br /&gt;
    {&lt;br /&gt;
      cli_execute{&lt;br /&gt;
         uneffect ode to booze;&lt;br /&gt;
         nuns;&lt;br /&gt;
         cast 35 polka of plenty;&lt;br /&gt;
      } # note the lack of a semicolon here!&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alphacow</name></author>
	</entry>
</feed>