Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running AutoHotkey 1.0.48.05 on Windows 7.

I have this script:

::sw::
    InputBox, providedString, SVN Switch, Switch the current directory to where?
    if NOT ErrorLevel
    {
        Send svn switch %providedString%{Enter}
    }
Return

So I if type sw{Enter} in PowerShell (or anywhere), I'll be prompted by a text box. Currently that text box is blank.

How can I prepopulate it with a particular string?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Syntax for Inputbox:

InputBox, OutputVar [, Title, Prompt, HIDE, Width, Height, X, Y, Font, Timeout, Default]

So what you want is to add a Default value:

::sw::
    InputBox, providedString, SVN Switch, Switch the current directory to where?,,,,,,,,<a particular string>
    if NOT ErrorLevel
    {
        Send svn switch %providedString%{Enter}
    }
Return
share|improve this answer
1  
Wow, I'd looked at the docs (autohotkey.com/docs/commands/InputBox.htm) but somehow hand't seen that. Thanks. –  Ryan Sep 27 '12 at 17:35

Your Answer

 
discard

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.