Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
little script to change \ to /
#1
I'm trying to write a small script which change any backslashes found in the text in the clipboard to / and then paste the resulting text into the current app.
My script is:
Code:
Copy      Help
            string s = clipboard.copy();
            s = s.Replace(@"\","/");
            print.it(s);
            clipboard.paste(s);

Two problems:
  1. often times I'm getting an error in LA:
    Warning: Au.Types.AuException: Failed to copy.
       at line 83 in Hotkey triggers.cs, Program.<>c.<TextTools>b__11_5(PMItem o)

    (line 83 is the first line shown above)
  2.  the print command in the 3d line shows the original text, so it seems my line 2 doesn't do what it should - but I don't see any fault there!?


Messages In This Thread
little script to change \ to / - by MBaas - 07-03-2023, 05:26 PM
RE: little script to change \ to / - by Gintaras - 07-03-2023, 06:16 PM
RE: little script to change \ to / - by MBaas - 07-04-2023, 04:43 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)