Sign in to follow this  
Followers 0
majstang

Script for navigating/toggle windows toolbars with remote problem

3 posts in this topic

Hi!

I have created Toolbars on my Windows Taskbar containing folders (mediafiles) I often use. My problem is that

I can't navigate to these Toolbars with a reliable method. I use a remotecontrol to my HTPC and I want to

quickly navigate to the first chevron and popupmenu on my first toolbar "Inspelat" with one button on my

remote and toggle from the first chevron/popupmenu to the next with an another button on remote.

I manage to navigate to the first toolbar and toggle the toolbars with keyboard but when making a script

seding these keystrokes i suffer from several unexspected anomailies described as followed:

"Nah...this was no solution that is reliable. After some testing i did stumbled on some anomalies. The simple

code used earlier does only work as intended when I have one or more applications running. Doesn't matter

which applications running, it seem only to require some active application on Taskbar application field is

opened. When trying to navigate to first Toolbar on windows Taskbar without any other application running I

sometimes fail to hit target. It seem to be dependant what on Taskbar is highlighted when executing the code.

I need some focusing of some kind. I thought hitting the Startbutton was the focusing but apparently not in

every case. When leftclicking on desktop once and then execute the code I always hit target. But when first

Toolbar is choosen my togglecode doesn't work. Instead of TABbing forward to next Toolbar it goes back to the

first Quick Launch Icon. Instead of sending ESC and TAB it seem to send ESC and SHIFT+TAB. Very strange!! I

really need some help with getting to first Toolbar without sending keystrokes. Pretty much like a postmessage

command does for applications. This must be possible but I don't know how to do it."

I run my HTPC with two different monitors (FullHD Samsung 1920x1080 and a HD-ready TV with a resolution of

1376X768) in two different rooms. Because of the different resolutions I want to eliminate every

positiondependant (mouseclicks) scripts cuz it will only work with one of my monitors/TVs. Don't wanna have

two scripts for each resolution cuz it would take up buttons on my remote that i don't have (there is no more

programmable buttons left as it is). The only way to make this script work on both TVs is either a script

sending keystrokes, which I already tried but with strange anomalies as result or this alternative way below.

I didn't expect this operation, that appears to be so easy when navigating with mouse, to get this complicated

though.

I have now had this dilemma of mine out on the Autohotkey Forum asking those sharp poeople for help but nobody

seem to be abled to solve this problem so far. Therefor I now turn to the AutoIt Forum hoping somebody here

has the solution for my script. This is the latest scriptattempt I got from an Autohotkey member (Serenity), but it doesn't

work...problem is it causing Explorer to crash. Maybe somebody could debug/alter this script making it work as

supposed to?

; constants 
RB_GETBANDINFOA := 0x41D, RB_SETBANDINFOA := 0x406 
RB_GETBANDINFOW := 0x41C, RB_SETBANDINFOW := 0x40B 
RB_GETBANDINFO := 0x405, RB_GETBANDINFO := RB_SETBANDINFOA 

; fMask 
RBBIM_CHILD := 0x10, RBBIM_CHILDSIZE := 0x20, RBBIM_IDEALSIZE = 0x200, 
RBBIM_ID := 0x100, RBBIM_STYLE := 0x1, RBBIM_TEXT := 0x4, RBBIM_SIZE := 0x40 

; fStyle 
RBBS_FIXEDBMP := 0x20, RBBS_GRIPPERALWAYS := 0x80, RBBS_USECHEVRON := 0x200 
RBBS_VARIABLEHEIGHT := 0x40 

; first we get REBARBANDINFO 
; http://msdn.microsoft.com/en-us/library/bb774451(VS.85).aspx 

VarSetCapacity( RB_GETBANDINFO, 80, 0 ); Struct size = 80 

; set the cbSize member of this structure to the size of the REBARBANDINFO structure 
Numput( 80, RB_GETBANDINFO, 0, "UInt" ) 

; set the fMask member to the items you want to retrieve 
; fMask := RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_IDEALSIZE | RBBIM_ID | RBBIM_STYLE | RBBIM_TEXT 

; Additionally, you must set the cch member of the REBARBANDINFO structure 
; to the size of the lpText buffer when RBBIM_TEXT is specified. 

; (let's just see if this works for now), crashes with both 
; fMask := RBBIM_CHILDSIZE | RBBIM_ID | RBBIM_SIZE | RBBIM_STYLE 
fMask := RBBIM_CHILDSIZE + RBBIM_ID + RBBIM_SIZE + RBBIM_STYLE; 0x161 
Numput( %fMask%, RB_GETBANDINFO, 4, "UInt" ) 

SendMessage, RB_GETBANDINFOW, 0, &RB_GETBANDINFO, RebarWindow321, ahk_class Shell_TrayWnd 
Msgbox % Errorlevel; 0

My Toolbar folders are named:

1. Inspelat

2. Film

3. Timeshift

4. Blu-Ray

5. DVD

6. TV-Serier

For those who wanna check out my original topic att the Autohotkey Forum here's the link:

http://www.autohotkey.com/forum/viewtopic.php?t=35942

Share this post


Link to post
Share on other sites



your post have too many info so that someone lose 15 minuter reading it and another 15 to understand what r you trying to say, can you make smaler post (reedit your post)? this is too confusing :P


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

your post have too many info so that someone lose 15 minuter reading it and another 15 to understand what r you trying to say, can you make smaler post (reedit your post)? this is too confusing :P

Yeah...I know it's plenty of information to grasp :( But i don't tihnk I'm that confusing describing what I'm after.

When creating toolbars on Windows Taskbar (rightclicking the Taskbar and choose new toolbar) and create an opportunity to quickly access all your mediafiles instead of the usual Explorer-way. Navigating to your mediafolders with explorer are very slow and irritating. Navigating these toolbars with remote is a dream in comparison.

Try to create a toolbar yourself and everything will be clear what I'm after. Every toolbar has a clickable chevron...clicking that with mouse a popupmenu shows containing the folders and files you have in that toolbarfolder. And this is the first thing I want the script to do simply by pressing a button on my remotecontrol. Second step (a separat script that I'll manage to do myself) is to jump/TAB to next toolbar/chevron/popupmenu to the right (if you have more than one toolbar created).

The code I did post in the first message is an attempt to make the first step to work as I want. Hope this is a bit less confusing :idea:

Don't konw how to simplify my wishes further....

Edited by majstang

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0