Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 74f4355

Browse files
committed
fixed some bugs
1 parent 3898d8a commit 74f4355

1 file changed

Lines changed: 68 additions & 11 deletions

File tree

DOCUMENTATION.md

Lines changed: 68 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2478,17 +2478,18 @@ A collection of Build-in Function available in HT++.
24782478
1. [str](#str)
24792479
2. [int](#int)
24802480
3. [float](#float)
2481-
4. [Chr](#chr)
2482-
5. [InStr](#instr)
2483-
6. [RegExMatch](#regexmatch)
2484-
7. [RegExReplace](#regexreplace)
2485-
8. [StrLen](#strlen)
2486-
9. [SubStr](#substr)
2487-
10. [Trim](#trim)
2488-
11. [StrReplace](#strreplace)
2489-
12. [Mod](#mod)
2490-
13. [Asc](#asc)
2491-
14. [StrLower](#strlower)
2481+
4. [input](#input)
2482+
5. [Chr](#chr)
2483+
6. [InStr](#instr)
2484+
7. [RegExMatch](#regexmatch)
2485+
8. [RegExReplace](#regexreplace)
2486+
9. [StrLen](#strlen)
2487+
10. [SubStr](#substr)
2488+
11. [Trim](#trim)
2489+
12. [StrReplace](#strreplace)
2490+
13. [Mod](#mod)
2491+
14. [Asc](#asc)
2492+
15. [StrLower](#strlower)
24922493

24932494
---
24942495

@@ -2624,6 +2625,62 @@ This function is essential for converting integer values, string representations
26242625

26252626
---
26262627

2628+
### input <a id="input"></a>
2629+
2630+
[Go back](#build-in-functions)
2631+
2632+
**input**: Prompts the user for input and returns the user's response.
2633+
2634+
#### Syntax:
2635+
2636+
```ahk
2637+
str userInput = input(prompt)
2638+
```
2639+
2640+
#### Parameters:
2641+
2642+
- _prompt_: The text message to display to the user when asking for input.
2643+
2644+
#### Return Value:
2645+
2646+
- Returns the text entered by the user as a string.
2647+
2648+
#### Example 1:
2649+
2650+
```ahk
2651+
str userName := input("Please enter your name: ")
2652+
MsgBox, % "Hello, " . userName . "!"
2653+
```
2654+
2655+
#### Explanation:
2656+
2657+
The `input` function displays a prompt to the user and captures their input as a string. This is useful for gathering user input in a script, such as names, preferences, or other data.
2658+
2659+
In Example 1:
2660+
2661+
- `input("Please enter your name: ")` shows a prompt asking the user to enter their name.
2662+
- The variable `userName` captures the user's input.
2663+
- `MsgBox` then displays a greeting message: "Hello, [userName]!"
2664+
2665+
#### Example 2:
2666+
2667+
```ahk
2668+
str userAge := input("Enter your age: ")
2669+
MsgBox, % "You are " . userAge . " years old."
2670+
```
2671+
2672+
#### Explanation:
2673+
2674+
In Example 2:
2675+
2676+
- `input("Enter your age: ")` prompts the user to enter their age.
2677+
- The variable `userAge` stores the input as a string.
2678+
- `MsgBox` displays a message: "You are [userAge] years old."
2679+
2680+
The `input` function is essential for creating interactive scripts that require user feedback or data. It enables the script to capture and use user-provided information in various applications.
2681+
2682+
---
2683+
26272684
### Chr <a id="chr"></a>
26282685

26292686
[Go back](#build-in-functions)

0 commit comments

Comments
 (0)