Jump to content

Autoit Script To Start Quicklaunch By Keybord Shortcut


tiny
 Share

Recommended Posts

Hi,

I search an option to bring the quicklaunch bar from the tray into Focus independently from the display resolution without using the mouse.

If its possible to focus the quicklauch toolbar with autoit my problem will be solved. Is This possible?

Link to comment
Share on other sites

  • Moderators

Does this work?

$WinTitleOpt = Opt('WinTitleMatchMode', 4)
ControlFocus('classname=Shell_TrayWnd', 'Quick Launch', 'ToolbarWindow323')
Opt('WinTitleMatchMode', $WinTitleOpt)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Another thing you might want to look at... (I have no idea why your wanting to get focus on the quick launch, unless it's to run a program from there), is if you know what your looking for, you could use something like this (I have FireFox in my quick launch, so this is an example useing that):

Local $GetQuickLaunch = QuickLaunchTools()
If IsArray($GetQuickLaunch) Then
    For $i = 1 To UBound($GetQuickLaunch) - 1
        $GotShortCutInfo = FileGetShortcut($GetQuickLaunch[$i])
        If StringInStr($GotShortCutInfo[0], 'firefox') Then
            Run($GotShortCutInfo[0])
        EndIf
    Next
EndIf

Func QuickLaunchTools()
    Local $a_QuickLaunchArray = ''
    Local $h_Destination = @AppDataDir & '\Microsoft\Internet Explorer\Quick Launch\'
    Local $h_Search = FileFindFirstFile($h_Destination & '*.lnk')  
    If $h_Search = - 1 Then
        Exit
    EndIf
    While 1
        $h_FilesFound = FileFindNextFile($h_Search) 
        If @error Then ExitLoop
        $a_QuickLaunchArray &= $h_Destination & $h_FilesFound & Chr(01)
    WEnd
    FileClose($h_Search)
    $a_QuickLaunchArray = StringSplit(StringTrimRight($a_QuickLaunchArray, 1), Chr(01))
    Return $a_QuickLaunchArray
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

@SmOke_N

Your first solution works great, but it doesn't cares about the toolsbars name.

Thanks anyway.

Huh? :)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...