The problem was solved
Release the S key
Add a delay
key ESH
_s.getsel
_s.trim
if !_s.beg("'") and !_s.beg("''")
_s=F"'{_s}'"
_s.setsel
key- S
else if _s.beg("'")
_s.findreplace("'" "''")
_s.setsel
key- S
else if _s.beg("''")
_s.findreplace("''" "")
_s.setsel
0.2
key S ;;CapsLock turn off
But the order of logical execution is reversed, Why?
Release the S key
Add a delay
key ESH
_s.getsel
_s.trim
if !_s.beg("'") and !_s.beg("''")
_s=F"'{_s}'"
_s.setsel
key- S
else if _s.beg("'")
_s.findreplace("'" "''")
_s.setsel
key- S
else if _s.beg("''")
_s.findreplace("''" "")
_s.setsel
0.2
key S ;;CapsLock turn off
But the order of logical execution is reversed, Why?