AutoHotkey Community

It is currently May 24th, 2012, 2:42 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 154 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 11  Next
Author Message
 Post subject: remapped up/down
PostPosted: January 2nd, 2005, 2:27 am 
Offline

Joined: May 16th, 2004, 6:16 pm
Posts: 7
Location: Seattle
thanks alot for posting your awesome script. I mapped up/down (and pgup/pgdn) to ctl-p and ctl-n, so you can go up and down without my hands leaving home row.

Having each application name (or shortened app name) first before window title in the window list could be nice.

thanks again.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 2nd, 2005, 4:13 pm 
Offline

Joined: October 9th, 2004, 8:55 pm
Posts: 217
Location: Budapest, Hungary
An update for the new year:
  • The currently selected window can also be activated with a double click. Mouse users can change the activation key to a mouse button (e.g. middle button) and this way the switcher can be operated with the mouse only.
  • The switcher window can be moved horizontally with the left/right arrow keys if it blocks the view of windows under it. If you hold the arrow key down instead of pressing it several times the current selection changes in the listbox. I think it's a limitation of AutoHotkey (but Chris is the authority in this question), because the script cannot move the window fast enough and the arrow key presses reach the listbox while the result of the previous Input command is being processed. It's not a big deal, I usually press the right/left arrow key 2-3 times. There is no need to hold it down.

Edit: See the latest version of the script in the first post.


Last edited by keyboardfreak on January 7th, 2005, 7:54 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: remapped up/down
PostPosted: January 2nd, 2005, 4:15 pm 
Offline

Joined: October 9th, 2004, 8:55 pm
Posts: 217
Location: Budapest, Hungary
mo wrote:
Having each application name (or shortened app name) first before window title in the window list could be nice.

Good idea, though I don't know if it is possible to get the actual name of the application. Anyone?

Window class is not always good, the name of the executable can also be misleading. Is there an other method?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 2nd, 2005, 10:05 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
keyboardfreak wrote:
If you hold the arrow key down instead of pressing it several times the current selection changes in the listbox. I think it's a limitation of AutoHotkey
I think this is most likely caused by SetWinDelay being at it's default of 100ms. Try decreasing it to -1 right before the move (you can restore it later if you need the former value).

If that doesn't solve it, I'd like to work with you more to find out the cause.

Quote:
I don't know if it is possible to get the actual name of the application
You can get the process name of a window with "WinGet, OutputVar, ProcessName, WinTitle". This might be a relatively slow operation, which is probably only of concern if you call it dozens of times consecutively.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 3rd, 2005, 6:07 pm 
Offline

Joined: October 9th, 2004, 8:55 pm
Posts: 217
Location: Budapest, Hungary
Chris wrote:
I think this is most likely caused by SetWinDelay being at it's default of 100ms. Try decreasing it to -1 right before the move (you can restore it later if you need the former value).

Setting win delay to -1 solved the problem. It works nicely. Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 3rd, 2005, 6:20 pm 
Offline

Joined: October 9th, 2004, 8:55 pm
Posts: 217
Location: Budapest, Hungary
Chris wrote:
keyboardfreak wrote:
I don't know if it is possible to get the actual name of the application
You can get the process name of a window with "WinGet, OutputVar, ProcessName, WinTitle". This might be a relatively slow operation, which is probably only of concern if you call it dozens of times consecutively.

It seems to return the name of the executable (e.g. wincmd32.exe) which is suitable if there is no other alternative.

I wonder if there is a method to retrieve the human readable name of an application (if it's registered somewhere). For example: "Windows Commander" instead of "wincmd32.exe".


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2005, 12:43 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
keyboardfreak wrote:
I wonder if there is a method to retrieve the human readable name of an application (if it's registered somewhere). For example: "Windows Commander" instead of "wincmd32.exe".
I don't recall seeing anything thing like that offered by any of the OS API calls.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2005, 12:19 pm 
Offline
User avatar

Joined: December 20th, 2004, 12:19 pm
Posts: 794
Location: LooseChange911.com Ask Questions, Demand Answers █ The WTC bldgs █ shouldn't have fallen █ that fast
Chris wrote:
keyboardfreak wrote:
I wonder if there is a method to retrieve the human readable name of an application (if it's registered somewhere). For example: "Windows Commander" instead of "wincmd32.exe".
I don't recall seeing anything thing like that offered by any of the OS API calls.

...I didn't read this entire thread, but if wincmd32.exe has a version resource, can't AHK read that?...hrm, I guess it can't, FileGetVersion only gets the version number or something, perhaps a new command...

Code:
FileGetVersionInfo, OutputVar, Property, Filename

...property being any string on the left side of the version tab (dynamic, not limited to normal properties) & also the special properties, like description, that aren't in the list, it should retrieve the text at the top next to "Description:". It should support the real name of the property (as specified in the version resource before being compiled) "ProductName" as well as the display (pretty) name "Product Name" (at least for the normal properties). Hrm, with creative use of...

Code:
Run, properties wincmd32.exe, , hide

...you could open the properties window, switch to the version tab & get the text, it would be a little difficult cuz run can't give you an hwnd (ahk_id) for the window you just created, just a pid. & even with an hwnd, you can't easily operate on hidden windows (without having to turn on DetectHiddenWindows & get any slowdowns involved with it, if any).

_________________
AutoHotkey-Hotstring.ahk - Helping the world spell "AutoHotkey" correctly! (btw, it's a lowercase k!)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2005, 9:28 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I've added your ideas to the informal to-do list. Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 6th, 2005, 6:20 pm 
Offline

Joined: October 9th, 2004, 8:55 pm
Posts: 217
Location: Budapest, Hungary
Changes:
  • Fixed unwanted selection change when the switcher window is moved horizontally with the arrow keys. Thanks Chris!
  • Added required AutoHotkey version
  • Added option to show the process name before the window title. The extension (.EXE) is trimmed from the process name. The width of the switcher window has been increased a bit, so that the titles are visible when this option is enabled.

    Thanks to mo for the idea.

Edit: See the latest version of the script in the first post.


Last edited by keyboardfreak on January 7th, 2005, 7:55 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2005, 2:52 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Idea for KF: Instead of punishing our vertical scroll bars on every page, perhaps you could simply edit your post on the first page? Great progress on it, by the way. I use this a lot.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2005, 7:07 am 
Offline

Joined: October 9th, 2004, 8:55 pm
Posts: 217
Location: Budapest, Hungary
jonny wrote:
Instead of punishing our vertical scroll bars on every page, perhaps you could simply edit your post on the first page?

This issue came up before, here's my answer again:
Quote:
Sorry about posting the script that many times in different posts. It would have been more practical to update the script code in my first post, but it didn't occur to me then and now I don't want to mix up the topic by making changes to previous posts.

It might even be instructive to some to see who a script develops from the first idea to a more mature version.

So you're perfectly right, this would be the correct way to do it, but I'm too lazy to edit all my previous posts. No one pays me to do it, I work on the switcher only when I feel like it, so I usually put off working on the boring bits. ;)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2005, 7:13 am 
Offline

Joined: October 9th, 2004, 8:55 pm
Posts: 217
Location: Budapest, Hungary
I'll try to overcome my lazyness and do it in the next update.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2005, 7:21 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Well... why not simply start a new thread? No editing necessary, everyone can still follow the original development process, and the problem is solved! (May want to rename the original post to avoid confusion)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2005, 7:29 am 
Offline

Joined: October 9th, 2004, 8:55 pm
Posts: 217
Location: Budapest, Hungary
jonny wrote:
Well... why not simply start a new thread? No editing necessary, everyone can still follow the original development process, and the problem is solved!

Well, the reference to the development process was only a pretext on my part to justify my lazyness. :) I don't think people are really interested in it, they probably want to use the latest version and that's it, so I really should do the cleanup sometime.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 154 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 11  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], xXDarknessXx and 27 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group