Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sudden error in 's.setsel'
#1
Hi

I have been using macro I wrote for some while, and all of a sudden I get this error:

QM highlights 's.setsel' and says:

"Error (RT) in LowerCase: cannot paste. Make sure that this window is editable,
supports Ctrl+V, and accepts this clipboard format. Some windows use Shift+Insert instead."

Does not seem to be any reason why this should happen.

i am using QM with RoboHelp to supply me with the shortcuts that RoboHelp badly lacks.

I have written a macro that covers text to lower case:

str s.getsel
if(!s.len) ret
int i is
for i 0 s.len
,if(isalpha(s[i]))
,,is=1
,,s[i]=tolower(s[i])
if(is) s.setsel


Thanks,

- avi
#2
setsel stores text in clipboard and presses Ctrl+V. Also it does various things to make this operation synchronous and reliable. It fails if it detects that the window did not accept the operation (did not get the text from the clipboard). Usually it is because at that time is focused another control, where text cannot be pasted.

After s.setsel add
err
,s.setclip
,key Cv
,out "s.setsel failed"

or just err
#3
Well I didn't do anything, but since the time you replied, it all started working again.

Obviously, this forum has mystical powers...

:-)

avi
#4
I've noticed at times that if threads are terminated from QM some of the functions of QM will start throwing some odd ball errors on functions that are normally extremely reliable.

If something starts to throw errors where there were no errors before it is always a good starting point to re-start Quick Macros.

If that doesn't solve the problem, restart your computer...

If that doesn't solve the problem...then it is probably your code. Usually I never have to restart my computer and restarting QM does the trick. If you ever have to end a thread, you'll see that Gintaras has included a recommendation to restart QM. Don't ignore what Gintaras has to say about things...he's usually right!

Thanks,
Jimmy Vig


Forum Jump:


Users browsing this thread: 1 Guest(s)