Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
When the clipboard fails to retrieve text
#1
I'd like to know how to continue execution when unable to retrieve text from the clipboard. In QM, I can simply use 'err' or omitted. How do I handle this in LA?
(This is an assumption: The text is empty when using the hotkey Ctrl+a)
OR, Is there a member function similar to getsel in QM for LA?

LA: 
 
Code:
Copy      Help
keys.send("Ctrl+A");
string s = clipboard.copy(); //get the selected text
//handle err ???
print.it(s);

QM:
Code:
Copy      Help
'Ca
str s.getsel
err
out s
#2
not sure on this but seems to work
 
Code:
Copy      Help
if (!clipboard.tryCopy(out var s,false, null, false, false, default,100 )) print.it("Nothing Selected") ; else {print.it(s);};
#3
Thanks for your help!


Forum Jump:


Users browsing this thread: 1 Guest(s)