Script for deleting from cursor position in a segment?

Dear colleagues,

I have been using the following script to delete all text from cursor position in a target segment, but all of a sudden it's no longer working (maybe a conflict in key assignment after installing new programs on my computer?)  Can someone help me tweak this script to make it work again?  I just took a quick look at Studio 2017's shortcuts and only see a shortcut for clear target text, not exactly what I was looking for.

Thank you!

Chunyi

 

^D:: ; Delete to end of segment
 sendinput, +^{PgDn}
 sendinput, {Delete}
 sleep, 100
 sendinput, {Esc}
 return