Jump to content
Sign in to follow this  
skyteddy

How can I (de)activate toolbars

Recommended Posts

skyteddy

Hello,

I want to replace the standard windows quicklaunchbar with the FreeLaunchBar. The installation of the program via AutoIt works :rolleyes: , but how can I activate the freelaunchbar in the toolbars-menu and how can I deaktivate the default windows-launchbar. How can I control if the toolbar is already activated or not?

Second question. My taskbar has 2 rows. How can I get the position e.g. of the adress-toolbar (I don't know, if this is the right translation of the toolbar) and how can I move it to a other position. Or how can I get the position of the activated freelaunchbar in the taskbar and how can I sort the icons within this freelaunchbar. Normaly it works with drag and drop. But how get I the position of the icon?

Third question. In a new user-profile is the "Input Locale"-toolbar active. How can I call the menu via autoit to close and deaktivate this toolbar? Only the deactivation with the toolbar-menu is not enough. Normaly I must open the menu with a right click, then "close input locale" and then confirm the question.

many thanks in advance!

skyteddy

Share this post


Link to post
Share on other sites
skyteddy

Has anybody an idea how can I try it?

thanks

skyteddy

Share this post


Link to post
Share on other sites
PaulIA

Download Auto3Lib from my signature and run the code below. You should be able to adapt this same script to check the new toolbar that you want to activate. PM me if you have questions.

#include <A3LMenu.au3>
#include <A3LToolbar.au3>

Opt("MusXÛUÉ][ÝÈJBÜ
    ][ÝÕÚ[]SX]Ú[ÙI][ÝË
BÛØ[  ÌͶvæBÂb33c¶&V7BÂb33c·EöçBÂb33c¶ÖVçRÂb33c¶æFW £²Föâb33·BÆWÕÍȵÍÌÝ¥Ñ ÕÌÝ¡¥±ÝÌäíÉÉÕ¹¹¥¹) ±½­%¹ÁÕРĤ((ìн½É¥¹ÑÌof last button on task bar
$hWnd   = ControlGetHandle("[CLASS:SheÕ^UÛI][ÝË ][ÝÉ][ÝË    ][ÝÕÛÛÚ[ÝÌÌ][ÝÊBÌÍØTXÝÒõFööÆ&%ôvWD'WGFöå&V7Bb33c¶væBÂõFööÆ&%ôæFWFô6öÖÖæBb33c¶væBÂõF½±É}  ÕÑѽ¹
½Õ¹Ð ÀÌØí¡]¹¤´Ä¤¤((ì
½¹ÙÉн½É¥¹ÑÌѼÍɸٱÕÌ$tPoint = _Lib_GetPointFromXY($aRect[2], $aRect[3])
$tPÚ[HÐTWÐÛY[ÔØÜY[   ÌÍÚÛ    ÌÍÝÚ[
BÈYÚÛXÚÈÛÚÈ& ¤Ö÷W6T6Æ6²gV÷C·&vBgV÷C²ÂFÆÅ7G'V7DvWDFFb33c·EöçBÂgV÷CµgVÐ줰±±MÑÉÕÑÑÑ ÀÌØíÑA½¥¹Ð°ÅÕ½ÐídÅÕ½Ð줰İĤ((ìM±ÐÑ¡ÅÕt;Toolbars" item from the popup menu
_Menu_ClickPopup(0)

; Get the haHÈH    ][ÝÕÛÛÉ][ÝÈÜY[BÌÍÚY[HHÓXÔÜÙ]Û £²vWBFR6öÖÖæBBöbFRgV÷CµV6²ÆVæ6gV÷C²ÖVçRFVТb33c¶àô}5¹Õ}5Á±ÉÑ½È ÀÌØí¡5¹Ô°ÅÕ½ÐíDÅÕ½Ðì¤((ìU¹¡¬Ñ¡ÅÕ½ÐQuick Launch" menu item if it's checked
if $iIndex > -1 th[YÓY[WÑÙ]][PÚXÚÙY
    ÌÍÚY[K   ÌÍÚR[^
H[ÓY[WÐÛXÚÔÜ66VÂgV÷CµgV÷C²¦VæF` £²æBæ÷r&6²Fò÷W"&VwVÆ&Ç66VGVÆVB&öɵµ¥¹¸¸¸)  ±½­%¹ÁÕРĤ

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites
azure

Download Auto3Lib from my signature and run the code below. You should be able to adapt this same script to check the new toolbar that you want to activate. PM me if you have questions.

#include <A3LMenu.au3>
#include <A3LToolbar.au3>

Opt("MustDeclareVars"  , 1)
Opt("WinTitleMatchMode", 4)

Global $hWnd, $aRect, $tPoint, $hMenu, $iIndex

; Don't let user mess with us while we're running
BlockInput(1)

; Get coordinates of last button on task bar
$hWnd   = ControlGetHandle("[CLASS:Shell_TrayWnd]", "", "ToolbarWindow322")
$aRect  = _Toolbar_GetButtonRect($hWnd, _Toolbar_IndexToCommand($hWnd, _Toolbar_ButtonCount($hWnd) - 1))

; Convert coordinates to screen values
$tPoint = _Lib_GetPointFromXY($aRect[2], $aRect[3])
$tPoint = _API_ClientToScreen($hWnd, $tPoint)

; Right click on task bar
MouseClick("right", DllStructGetData($tPoint, "X"), DllStructGetData($tPoint, "Y"), 1, 1)

; Select the "Toolbars" item from the popup menu
_Menu_ClickPopup(0)

; Get the handle to the "Toolbars" popup menu
$hMenu  = _Lib_PopupGetHwnd()

; Get the command ID of the "Quick Launch" menu item
$iIndex = _Menu_MapAccelerator($hMenu, "Q")

; Uncheck the "Quick Launch" menu item if it's checked
if $iIndex > -1 then
  if _Menu_GetItemChecked($hMenu, $iIndex) then _Menu_ClickPopupAccel("Q")
endif

; And now back to your regularly scheduled programming...
BlockInput(1)
This code doesn't work with AutoITv3. I believe Auto3Lib has been integrated with the program now. I'm wanting to do the same thing. Any updates to this code by chance? I'm trying to disable the Windows Desktop Search toolbar automagically. I can get it to enter the toolbar menu, but not sure how to have it "find" the Windows Desktop Search option to uncheck it.

Please help :)

Share this post


Link to post
Share on other sites
rudi

Isn't Auto3Lib obsolete today? The Auto3Lib you point to starts with this posting:

[snip]

With the exception of "Strings" this library has been Ported to the standard UDF includes in Autoit.

This libaray is not supported by the original poster nor is it supported by the Dev team.

If installed on a system with the Latest version(s) of AutoIt you'll get bundles of errors.

Therefore I've removed the link and download, not needed anymore.

Gary

This post has been edited by GaryFrost: Nov 25 2007, 07:30 PM

Reason for edit: Removed links and Locked

So is the not ported part "Strings" availble elsewhere?

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
azure

Well.. what I meant was.. for instance:

$aRect  = _Toolbar_GetButtonRect($hWnd, _Toolbar_IndexToCommand($hWnd, _Toolbar_ButtonCount($hWnd) - 1))oÝ÷ Ùj.Ûn®x§¶®¶­sbb33c¶&V7BÒôuT7G&ÅFööÆ&%ôvWD'WGFöå&V7Bb33c¶væBÂôuT7G&ÅFööÆ&%ôæFWFô6öÖÖæBb33c¶væBÂôuT7G&ÅFööÆ&%ô'WGFöä6÷VçBb33c¶væBÒoÝ÷ Ù»­jëh×6$tPoint = _Lib_GetPointFromXY($aRect[2], $aRect[3])

I don't see any "GetPointFromXY" UDF :)

And so on and so forth through the script. I want to right click the taskbar, click the top indexed button (which is "Toolbars") and then make sure "Windows Desktop Search" is unchecked within that submenu.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.