User Tools

Site Tools


gemus_script_reference:functions:add_clp
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Last revision
gemus_script_reference:functions:add_clp [2020/05/12 11:25] – created Jimbo
Line 1: Line 1:
 +Back to [[.:|Script Function Reference]]
  
 +====== Add_CLP() ======
 +
 +The Add_CLP() function adds text to the emulator's command line arguments. It automatically adds quotes around long filenames if they contain spaces. If you do not wish to have the quotes automatically added, use [[.:add_clp2|Add_CLP2()]].
 +
 +===== Syntax =====
 +
 +<code>Add_CLP(text)</code>
 +
 +===== Arguments =====
 +
 +^ Argument ^ Required ^ Description ^
 +| //text// | Yes | The text to add to the emulator's command line. Any [[..:environment_variables|script environment variables]] found in //text// will be replaced by their actual values when the script is executed. |
 +\\ 
 +
 +===== Examples =====
 +
 +<code>
 +Add_CLP(%gamefile%,%imageindex%)
 +
 +Add_CLP( -autotype "LOAD")
 +</code>
 +
 +Note the " " (space) at the start of the second example's arguments. This is needed when continuing the command line across multiple Add_CLP() calls, because the exact contents enclosed within the parentheses is directly appended to the command line. If you called both examples above one after the other, without including the space character in the second example, the resulting command line would be:
 +
 +<code>%gamefile%,%imageindex%-autotype "LOAD"</code>
 +instead of:
 +<code>%gamefile%,%imageindex% -autotype "LOAD"</code>
 +
 +===== Remarks =====
 +
 +You can call this function multiple times, each one adding more text to the emulator's command line. If the script is set to use long filenames, any replaced environment variables that correspond to a filepath or filename will be surrounded by double quotes ("") only if they contain a space character.
 +
 +===== See Also =====
 +
 +  * [[.:add_clp2|Add_CLP2()]]
 +  * [[.:edit_clp|Edit_CLP()]]
 +  * [[.:clear_clp|Clear_CLP()]]
 +  * [[.:|Script Function Reference]]
gemus_script_reference/functions/add_clp.txt · Last modified: 2023/10/04 14:15 by 127.0.0.1