Been working on this for a while & not getting anywhere. For use in other things, I need to get & modify a WinTitle for use in an emails subject line so the subject line makes sense to the receiver. I need to remove the first 26 characters & last 16 characters of the Win Title. I can remove the first 26 but despite working on this for much longer than I should have. I can't remove the last 16 characters. Could somebody please take a look at the code & see what I need here? The failed code isn't included but it was just the same concept again with negative numbers). Thanks!
Original Wintitle
Cin7 | Edit Sales Order - Stop Slow Traffic - SSLO620-81 - Google Chrome
Desitred outcome of code
Stop Slow Traffic - SSLO620-81
Code: Select all
5::
WinGetTitle, dv_wintitle, A ; ✅ WORKS
dv_wintitle_formatted := SubStr(dv_wintitle, 26) ; ✅ Works, removes the first 26 characters
; ❌ Various attemps of code was here. Tried a nunch of variations of the line above, using negative numbers. Any other research or only shows my results for depricated code.
MsgBox %dv_wintitle_formatted% ; ✅ Works & shows result. When the outcome is reached, I will remove the message box & have the variables content typed into Outlook