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 trying to create an Autohotkey hotkey that will collapse a tree list that has no collapse all button. I can collapse this by repeatedly pressing left and then down. I added this hotkey:

!NumpadSub::
Loop 10
    Send,{Left}{Down}
return

Yet, when I try it in notepad or OneNote, it just moves the cursor 10 spots left. When I try in on my tree list, nothing happens. Do I need to add in delays? What am I missing?

share|improve this question
add comment

1 Answer

As I don't know what application this is, I can only guess that a small delay may be the right thing. You might try the following.

!NumpadSub::
Loop 10
    Send, {Left}
    Sleep, 200 ; Wait 200 ms
    Send, {Down}
    Sleep, 200 ; Wait 200 ms
return

Patric,

So you don't have these (+) and (-) in front of the directories to collaps them? Directory Structure in Notepad When I press < and v, nothing happens in the notepad directories though.

share|improve this answer
    
I'd expect it to move the cursor down and left in Notepad and OneNote. I'll try delays. –  Patrick Szalapski Feb 13 '13 at 3:54
add comment

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.