TheSwamp

Code Red => .NET => Topic started by: nobody on November 07, 2017, 03:31:53 AM

Title: SentString Example
Post by: nobody on November 07, 2017, 03:31:53 AM
I've never used the sendstringtoexecute, and probably never will again.  After all I've done (several hundred thousand lines of code), this sentence turned out to the be the biggest pain in the rear to figure out, I fail miserably at scripting in net  :crazy2:

Code - C#: [Select]
  1. SendStringToExecute("_.justifytext\n" + "P\n\n" + decision + "\n" + "jt\n" + "\x03", false, false, true)
Title: Re: SentString Example
Post by: MexicanCustard on November 07, 2017, 12:48:03 PM
Looks like you're trying to use end of line characters to represent the enter key.  Just use spaces where you want the enter key.  If your input includes spaces then just wrap it in single quotes inside your double quote string.

Code - C#: [Select]
  1. SendStringToExecute($"_.justifytext P \n {decision} jt ", false, false, true)
Title: Re: SentString Example
Post by: nobody on November 08, 2017, 12:03:31 AM
Thanks! The toughest part was figuring out a way so that when i hit enter or return is repeated my command rather than justifytext