Help for a newbie

Get help with using AutoHotkey and its commands and hotkeys
barbudo2005
Posts: 3
Joined: 03 Dec 2019, 20:39

Help for a newbie

04 Dec 2019, 18:45

I am newbie to AutoHotkey and I want some help.

I use Vivaldi and the settings open all the bookmarks in a new tab. I have a "black new tab" (from my disk) that open when Vivaldi begin.

So I make a macro (CTRL-m ) in MacroExpressPro that when the only tab is the "black new tab" open a bookmark in the same tab to use it, when i click the whell button in my mouse (set to run CTRL - m).

I want AHK recognize the title "Page.htm" and when I ckick a folder of bookmarks and open the list of bookmarks , when I click with the left button run the macro CTRL + m.

With WindowSpy I discovered that the title of Vivaldi is Page.htm - Vivaldi and ahk_class Chrome_WidgetWin_1, but when the list of bookmarks appears and the cursor is on the list there is no title and the class is ahk_class Chrome_WidgetWin_2.

My code is (don't work):

Code: Select all


#IfWinActive, Page.htm - Vivaldi

WinWait, ahk_class Chrome_WidgetWin_2
LButton::
Send ^m
return

#IfWinActive

Thank you very much in advance
User avatar
Xtra
Posts: 1526
Joined: 02 Oct 2015, 12:15

Re: Help for a newbie

04 Dec 2019, 20:21

Put the winwait in the hotkey block:

Code: Select all

#IfWinActive, Page.htm - Vivaldi

LButton::
    WinWait, ahk_class Chrome_WidgetWin_2
    Send ^m
return

#IfWinActive
barbudo2005
Posts: 3
Joined: 03 Dec 2019, 20:39

Re: Help for a newbie

04 Dec 2019, 21:03

Xtra

Thank you but don't work. Don't recognize Page.htm - Vivaldi.

I put a msgbox so every time Page.htm - Vivaldi is active run the message.

Code: Select all

#IfWinActive, Page.htm - Vivaldi
MsgBox, Page activa
LButton:: 
    WinWait, ahk_class Chrome_WidgetWin_2
    Send ^m
return

#IfWinActive


barbudo2005
Posts: 3
Joined: 03 Dec 2019, 20:39

Re: Help for a newbie

04 Dec 2019, 21:04

Instead when I run the script the message appear.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], dead_line, spencer and 206 guests