AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Moving the Windows task bar from the bottom to the right

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
albedoa



Joined: 18 May 2008
Posts: 18

PostPosted: Sun May 18, 2008 6:01 am    Post subject: Moving the Windows task bar from the bottom to the right Reply with quote

What is the easiest way to take a hidden task bar at the bottom of the screen, unhide it, and move it to the right side of the screen?
Back to top
View user's profile Send private message
keybored



Joined: 18 Jun 2006
Posts: 90
Location: Phoenix, AZ

PostPosted: Sun May 18, 2008 2:37 pm    Post subject: delegate it to someone else Reply with quote

1. drag your mouse to the bottom of the screen.
2. right click select properties
3. if lock taskbar is checked uncheck and press OK
4. again drag your mouse to the bottom of the screen
5. click and hold the left mouse button
6. while still holding the button drag to the right unclick
Back to top
View user's profile Send private message
Icarus



Joined: 24 Nov 2005
Posts: 440

PostPosted: Sun May 18, 2008 2:41 pm    Post subject: Reply with quote

I think albedoa means:
whats the easiest way to do it by ahk code

no?

Smile
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
albedoa



Joined: 18 May 2008
Posts: 18

PostPosted: Sun May 18, 2008 3:49 pm    Post subject: Reply with quote

Ha, yeah I didn't think I needed to clarify that. Smile
Back to top
View user's profile Send private message
n-l-i-d
Guest





PostPosted: Sun May 18, 2008 4:08 pm    Post subject: Reply with quote

SHAppBarMessage

Question
Back to top
albedoa



Joined: 18 May 2008
Posts: 18

PostPosted: Sun May 18, 2008 5:19 pm    Post subject: Reply with quote

Okay thanks, so I understand that the function and arguments I want to use in order to unhide the taskbar is:

Code:
SHAppBarMessage(ABM_SETSTATE, 0)


But for AHK, I need to use DllCall, right? How do I use DllCall with the above function? Is it easy?
Back to top
View user's profile Send private message
interiot



Joined: 06 Nov 2005
Posts: 64

PostPosted: Sun May 18, 2008 6:25 pm    Post subject: Reply with quote

Remember this Google search term, it's very very useful:

site:autohotkey.net


(in this particular case, this post gives you most of the DllCall syntax you'll need)
Back to top
View user's profile Send private message
albedoa



Joined: 18 May 2008
Posts: 18

PostPosted: Sun May 18, 2008 7:00 pm    Post subject: Reply with quote

Right, I know how to search for pages in a particular site, and I saw that post. It's great that I can copy and paste that code and have it work, but that post does not explain what any of the code means, which is why I created a new thread.

I was looking more for an explanation so I can learn and so my scripts aren't all CnP'd from others.

But thank you, regardless.
Back to top
View user's profile Send private message
n-l-i-d
Guest





PostPosted: Sun May 18, 2008 7:07 pm    Post subject: Reply with quote

SKAN's code is a good start. I'm not sure you can move the taskbar with it though.
Back to top
interiot



Joined: 06 Nov 2005
Posts: 64

PostPosted: Sun May 18, 2008 9:03 pm    Post subject: Reply with quote

Bah, n-l-i-d is probably right.

Anyway, I coded up the SHAppBarMessage method before I realized this, so, just in case any of the code is useful to others...

Code:
ABE_LEFT   := 0
ABE_TOP    := 1
ABE_RIGHT  := 2
ABE_BOTTOM := 3

APPBARDATA := ABM_QUERYPOS(ABE_RIGHT)
DllCall("Shell32.dll\SHAppBarMessage",  "UInt",ABM_SETPOS:=3,  "UInt",&APPBARDATA  )
return



; MSDN:
;   An appbar should send this message before sending the ABM_SETPOS message.
;   When the request is made, the message proposes a screen edge and a bounding
;   rectangle for the appbar. The system adjusts the bounding rectangle so that the
;   appbar does not interfere with the Windows taskbar or any other appbars.
ABM_QUERYPOS(uEdge) {
   VarSetCapacity( APPBARDATA , 36, 0 )
   next := NumPut(  36, APPBARDATA    )
   ;next := NumPut( WinExist("ahk_class Shell_TrayWnd"), next+0 )
   next := NumPut( 0, next+0 )
   next := NumPut( 0, next+0 )
   next := NumPut( uEdge, next+0 )
   next := NumPut( 1, next+0 )   ; proposed left
   next := NumPut( 2, next+0 )   ; proposed top
   next := NumPut( 3, next+0 )   ; proposed right
   next := NumPut( 4, next+0 )   ; proposed bottom
   DumpAPPBARDATA(APPBARDATA)
   DllCall("Shell32.dll\SHAppBarMessage",  "UInt",ABM_QUERYPOS:=2,  "UInt",&APPBARDATA  )
   DumpAPPBARDATA(APPBARDATA)      ; Hrm.  It doesn't seem to have changed...

   return APPBARDATA
}


DumpAPPBARDATA(ByRef APPBARDATA) {
   hWnd   := NumGet( &APPBARDATA, 4 )
   uEdge  := NumGet( &APPBARDATA, 12 )
   left   := NumGet( &APPBARDATA, 16 )
   top    := NumGet( &APPBARDATA, 20 )
   right  := NumGet( &APPBARDATA, 24 )
   bottom := NumGet( &APPBARDATA, 28 )
   lParam := NumGet( &APPBARDATA, 32 )
   MsgBox,hWnd=%hWnd%`nuEdge=%uEdge%`nleft=%left%`ntop=%top%`nright=%right%`nbottom=%bottom%`nlParam=%lParam%
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group