Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to combine the following two scripts into one:

How can I do this?

Note that whenever I use these AutoHotkey scripts with form input, it presses the Enter key automatically which I don't want.

share|improve this question
Those 2 links are identical. Do you mean ? – RJFalconer Jan 1 '10 at 16:07
oh yes i changed correct link – metal gear solid Jan 1 '10 at 16:23
up vote 0 down vote accepted

Select text, press Alt-R

"My Filename" to "my-filename"
"MY FILENAME" to "my-filename"
"my filename" to "MY-FILENAME"
Preserves original clipboard contents

#SingleInstance Force

save := ClipboardAll
Send ^c
original_filename := Clipboard
StringReplace, hyphen_filename, original_filename, %A_SPACE%, -, All
StringLower, hyphen_filename_toggle, hyphen_filename
If (hyphen_filename_toggle == hyphen_filename)
    StringUpper, hyphen_filename_toggle, hyphen_filename
Clipboard := hyphen_filename_toggle
Send ^v
Clipboard := save
share|improve this answer
Tested and working. Based on the two linked scripts of John T. – RJFalconer Jan 1 '10 at 17:46
Sorry i was out from city to celebrate party. yes it's working thanks – metal gear solid Jan 4 '10 at 9:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.