<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cheatengine.org/index.php?action=history&amp;feed=atom&amp;title=Lua%3AinputQuery</id>
	<title>Lua:inputQuery - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cheatengine.org/index.php?action=history&amp;feed=atom&amp;title=Lua%3AinputQuery"/>
	<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Lua:inputQuery&amp;action=history"/>
	<updated>2026-05-20T09:41:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Lua:inputQuery&amp;diff=7784&amp;oldid=prev</id>
		<title>Leunsel: Minor edit. Added Version Notice Template.</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Lua:inputQuery&amp;diff=7784&amp;oldid=prev"/>
		<updated>2025-12-04T19:04:52Z</updated>

		<summary type="html">&lt;p&gt;Minor edit. Added Version Notice Template.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:04, 4 December 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lua]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lua]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{VersionNotice|6.4+}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''function''' inputQuery(''Caption'', ''Prompt'', ''InitialString'') ''':''' String or nil&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''function''' inputQuery(''Caption'', ''Prompt'', ''InitialString'') ''':''' String or nil&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Leunsel</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Lua:inputQuery&amp;diff=7622&amp;oldid=prev</id>
		<title>Leunsel: Created page with &quot;Category:Lua '''function''' inputQuery(''Caption'', ''Prompt'', ''InitialString'') ''':''' String or nil  Displays a dialog box that prompts the user to input a string....&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Lua:inputQuery&amp;diff=7622&amp;oldid=prev"/>
		<updated>2025-07-10T23:55:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php?title=Category:Lua&quot; title=&quot;Category:Lua&quot;&gt;Category:Lua&lt;/a&gt; &amp;#039;&amp;#039;&amp;#039;function&amp;#039;&amp;#039;&amp;#039; inputQuery(&amp;#039;&amp;#039;Caption&amp;#039;&amp;#039;, &amp;#039;&amp;#039;Prompt&amp;#039;&amp;#039;, &amp;#039;&amp;#039;InitialString&amp;#039;&amp;#039;) &amp;#039;&amp;#039;&amp;#039;:&amp;#039;&amp;#039;&amp;#039; String or nil  Displays a dialog box that prompts the user to input a string....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Lua]]&lt;br /&gt;
'''function''' inputQuery(''Caption'', ''Prompt'', ''InitialString'') ''':''' String or nil&lt;br /&gt;
&lt;br /&gt;
Displays a dialog box that prompts the user to input a string.  &lt;br /&gt;
Returns the entered string, or nil if the user cancels the dialog.&lt;br /&gt;
&lt;br /&gt;
===Function Parameters===&lt;br /&gt;
{|width=&amp;quot;85%&amp;quot; cellpadding=&amp;quot;10%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
!align=&amp;quot;left&amp;quot;|Parameter&lt;br /&gt;
!align=&amp;quot;left&amp;quot;|Type&lt;br /&gt;
!style=&amp;quot;width: 80%;background-color:white;&amp;quot; align=&amp;quot;left&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|Caption&lt;br /&gt;
|String&lt;br /&gt;
|The title of the input dialog window.&lt;br /&gt;
|-&lt;br /&gt;
|Prompt&lt;br /&gt;
|String&lt;br /&gt;
|The prompt or question to display to the user.&lt;br /&gt;
|-&lt;br /&gt;
|InitialString&lt;br /&gt;
|String&lt;br /&gt;
|The default value shown in the input field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- Ask the user for their name&lt;br /&gt;
local name = inputQuery(&amp;quot;User Name&amp;quot;, &amp;quot;Please enter your name:&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
if name then&lt;br /&gt;
  showMessage(&amp;quot;Hello, &amp;quot; .. name .. &amp;quot;!&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
  showMessage(&amp;quot;You cancelled the input.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- Prompt for a file name with a default value&lt;br /&gt;
local filename = inputQuery(&amp;quot;Save File&amp;quot;, &amp;quot;Enter the file name to save:&amp;quot;, &amp;quot;myfile.txt&amp;quot;)&lt;br /&gt;
if filename then&lt;br /&gt;
  print(&amp;quot;Saving to: &amp;quot; .. filename)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- Use inputQuery for a password (not masked)&lt;br /&gt;
local password = inputQuery(&amp;quot;Authentication&amp;quot;, &amp;quot;Enter your password:&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
if password then&lt;br /&gt;
  print(&amp;quot;Password entered.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[showMessage]]&lt;br /&gt;
* [[Lua]]&lt;/div&gt;</summary>
		<author><name>Leunsel</name></author>
		
	</entry>
</feed>