Classic Shell development was stopped in December 2017. For now the forum remains online as reference, but is read-only. Registration of new users is disabled.
It is currently Mon Oct 06, 2025 3:20 am

All times are UTC - 8 hours [ DST ]


Forum rules


Please, keep discussions on topic and in the right forum. The start menu topics go into the Classic Start Menu forum, etc. This makes it easier for people to locate topics they are looking for.
If you get a satisfactory response to your question, please mark the topic as "solved". Click the green √ button in the bottom-right of the post.



Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Wed Jun 05, 2013 11:03 pm 
Offline

Joined: Wed Jun 05, 2013 11:00 pm
Posts: 5
I have search enabled on my start menu and several custom search menus. Normally if a search returns item(s) from programs/path, the top result is highlighted. However, if there are no results, you have to go back to the mouse, or use the arrow keys to highlight the custom search.

Is there a way to make it so if no app results are found, the top custom search menu item is highlighted, so you can just press enter after typing the search string?

Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 05, 2013 11:23 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
The thing is the search box also accepts commands. If there are no search results then the text you typed is considered a command and will be executed with Enter.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 06, 2013 12:23 am 
Offline
User avatar

Joined: Sun Jan 06, 2013 1:44 pm
Posts: 1996
what if it detected if what your typing is actually a command or not? then acted accordingly (i know a window pops up saying "Windows cannot find 'YourQuery'. Make sure you typed the name correctly), so it should just be a matter of detecting that window, automatically closing it, and re-directing the text :P

although personally i dont care either way, this is just a possible way to do it :P


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 06, 2013 8:40 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
It is hard to know if something is going to be a valid command or not. Maybe it is an exe that's in the path, or maybe in the AppPaths regsity, or maybe it is a document, or a website, or something entirely different that Windows accepts as a command.
I do not have an exhaustive list of everything that's acceptable, and how to check for its validity.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 06, 2013 3:48 pm 
Offline
User avatar

Joined: Sun Jan 06, 2013 1:44 pm
Posts: 1996
and theres no way to detect the popup of the window that tells you its an invalid path?


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 06, 2013 3:53 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
Maybe there is, but for that I have to try to execute the command first. We don't want anything to be executed until you press Enter.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 06, 2013 6:58 pm 
Offline
User avatar

Joined: Sun Jan 06, 2013 1:44 pm
Posts: 1996
ah ok :P


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 06, 2013 10:13 pm 
Offline

Joined: Wed Jun 05, 2013 11:00 pm
Posts: 5
I was going to play around with changing MenuCommands.cpp form

Code:
if (bShift && bCtrl)
ExecuteCommandElevated(buf);
else
ExecuteCommand(buf);

to something like this:

Code:
if (bShift && bCtrl)
ExecuteCommandElevated(buf);
else if (bShift)
ExecuteCommand(buf);
else
ActivateItem(0,ACTIVATE_SELECT,NULL);


But I got this error compiling, even before making changes:
Quote:
Error1fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directoryc:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h28ClassicShellLib


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 06, 2013 10:16 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
Looks like the error message got mangled somehow.
What is the exact message, what version of Visual Studio are you using, and what version of the Windows SDK?


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 07, 2013 12:04 am 
Offline

Joined: Wed Jun 05, 2013 11:00 pm
Posts: 5
I am running VS 2008 and have the Win7 SDK. Do I need the Win8 one? Do I have to manually add references to the project?

I get lots of these errors:

Error 1 fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h 28 ClassicShellLib


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 08, 2013 10:28 pm 
Offline

Joined: Wed Jun 05, 2013 11:00 pm
Posts: 5
Let me know if you have any ideas how I can implement this myself, I think this would be a good thing to have as an option in settings, either run as a command or run as the first default search item (could run the other option when Shift depressed--e.g. can run a command in that mode instead of the search when shift is pressed).


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 08, 2013 10:35 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
You can set a shortcut for the search, like Alt+I for Internet search


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 245 guests


You cannot post new topics in this forum
You cannot 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:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group, Almsamim WYSIWYG Classic Shell © 2010-2016, Ivo Beltchev.
All right reserved.