Using GetString andGetValue

Using GetString andGetValue

5

    May 15, 2021#1

    I understand that the parameter after GetString and GetValue is a prompt to get a response.
    I'm confused where the response gets stored. Can I define a variable to hold it so I can further use the value repetitively in the macro?
    If so, how to I insert the value in a specific location? Can I put a value after the insert command?

    Thanks

    6,603548
    Grand MasterGrand Master
    6,603548

      May 16, 2021#2

      UltraEdit macros do not support variables. The string/value entered by the user is written into active file at current position of the caret. For that reason many of my macros using GetString or GetValue move the caret first to top of the file, then call one of the two macro commands, use next command SelectToTop and Cut to cut the user input string/value to clipboard (usually one of the 9 user clipboards) and then use Paste or a non-regular expression or an UltraEdit regular expression replace with ^c to insert the user input string/value where needed in the file. A non-regular expression or an UltraEdit regular expression find can contain also ^c to reference the clipboard content of currently active clipboard.

      UltraEdit scripts support variables and for that reason the scripting commands UltraEdit.getString() and UltraEdit.getVaule() have two function parameters. The first function parameter is the prompt text and the second parameter is either 0 for writing the input string/value into active file at current caret position or 1 to return the string/value as a result of the function call for assigning it to a string or integer variable for further processing by the script.
      Best regards from an UC/UE/UES for Windows user from Austria

      5

        May 16, 2021#3

        Thank you very much