Auto Hotkey Macros for vivaldi
-
[Mod note: discussion forked from https://forum.vivaldi.net/topic/24825/mnemonic-shortcuts/12]
For many years I have used the software Macro Express Pro (paid) for my work. It permit macro and shortcuts you can use on all software.
Those shortcuts are different of CTRL+f. They permit expand a mnemonic to a word or phrase.
For example : ara expand to Arquitectura. I use the rule the first two letters of the word and the last. (I have 50 words I usually use in email daily, imagine the faster is to type ara instead of Arquitectura 100 times a day). (You also can do it with AHK)
So when I view your comment of "Mnemonic Shortcuts" I relate to AHK.
In AHK you can do your examples: (maybe your shortcuts are different)
The syntax is:
Key Syntax
Alt : !
Ctrl : ^
Shift : +
Win Logo: #The key SPACE "close" and trigger the shortcut.
TOGGLE ADDRESS BAR
ta{SPACE} trigger ALT+ a
::ta::!a
TOGGLE BOOKMARKS BAR
tb{SPACE} trigger CTRL+SHIFT+b
::tb::^+b
TOGGLE STATUS BAR
ts{SPACE} trigger Ctrl+Shift+S
::ts::^+s
OPEN FILE:///O:/DOCUMENTS/TODO.TXT
todo{SPACE} trigger open TODO.txt
::todo:: WinActivate ahk_exe vivaldi.exe send ^n (new tab) send {F8} (focus address) send "FILE:///O:/DOCUMENTS/TODO.TXT"
GO TO VIVALDI FORUMS
vf{SPACE} trigger open https://forum.vivaldi.net/recent
::vf:: Clipboard := "https://forum.vivaldi.net/recent" Run , "C:\Users\XXXXX\AppData\Local\Vivaldi\Application\vivaldi.exe" "%clipboard%" return
As you see in AHK your imagination is the limit.
I invite and encourage to power users to use AHK, is so simple.
The steps are:
1.- Download and install AHK:
https://autohotkey.com/download/
You will never open the software again.
2.- Download and install an specific editor for AHK: SciTE4AutoHotkey
http://fincs.ahk4.net/scite4ahk/
3.- Open a new file in the editor and save as CUSTOM.ahk in any folder.
4.- Make a shortcut of CUSTOM.ahk and put it in the folder Start of Windows
That is all!!!
5.- Every time you modify the file CUSTOM you have to go to icon of AHK and click "Reload this script"
I am a totally newbie to AHK. (there are thousand of script in the AHK forum and all web) This is a list of scripts I use:
;OPEN A PAGE OF VIVALDI IN CHROME - Control+| ^|:: Clipboard := WinActivate ahk_exe vivaldi.exe Sleep,150 send, {F8} Sleep,50 send, {F8} Sleep,100 send ^c Sleep,100 Run , "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "%clipboard%" return ;OPEN A PAGE OF CHROME IN VIVALDI- Control+1 ^1:: Clipboard :="" send, !d Sleep 100 send, ^c Sleep 150 Sleep,100 Run , "C:\Users\XXX\AppData\Local\Vivaldi\Application\vivaldi.exe" "%clipboard%" return ;SEARCH SEVERAL ENGINES - Control+2 ^2:: send ^c Sleep,50 Run, https://www.XXXX.com/search/title/?title=%clipboard% Run, https://www.XXXX.com/index.php?buscar=%clipboard% Run, http://www.XXXX.net/search?filter=%clipboard% Run, https://XXXX.com/?search=%clipboard% Run, https://www.XXXXX.net/search/?q=%clipboard% Run, https://www.XXXX.com/search/?q=%clipboard%&m=1&x=0&y=0 return ; SET CTRL + LEFT WINDOWS KEY FOR SWITCHING TO PREVIOUS APP OR WINDOW ^$LWin::Send !{Tab} ; VOLUME KEYS (Not mine) ; Custom volume buttons +NumpadAdd:: Send {Volume_Up} ;shift + numpad plus +NumpadSub:: Send {Volume_Down} ;shift + numpad minus break::Send {Volume_Mute} ; PAUSE key mutes return ; ALWAYS ON TOP ; ctrl + space (Not mine) ^SPACE:: Winset, Alwaysontop, , A ; ctrl + space Return ; DEFAULT STATE OF LOCK KEYS (Not mine) SetNumlockState, AlwaysOn SetCapsLockState, AlwaysOff SetScrollLockState, AlwaysOff return ; UPPER CASE (Not mine) ; Script Function: ;Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder) ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. ^u:: ; Convert text to upper OldClipboard:= Clipboard Clipboard:= "" Send, ^c ;copies selected text ClipWait StringUpper Clipboard, Clipboard Send %Clipboard% Sleep 1000 Clipboard:= OldClipboard return ^l:: ; Convert text to lower OldClipboard:= Clipboard Clipboard:= "" Send, ^c ;copies selected text ClipWait StringLower Clipboard, Clipboard Send %Clipboard% Sleep 1000 Clipboard:= OldClipboard return +^k:: ; Convert text to capitalized OldClipboard:= Clipboard Clipboard:= "" Send, ^c ;copies selected text ClipWait StringUpper Clipboard, Clipboard, T Send %Clipboard% Sleep 1000 Clipboard:= OldClipboard return ;OPEN DITTO (Clipboard software, I recommend): DOUBLE-CLICKING LEFT CTRL ~LControl:: if (A_PriorHotkey <> "~LControl" or A_TimeSincePriorHotkey > 400) { KeyWait, LControl return } Send, ^x return ;F2 : DOUBLE-CLICKING LEFT WIN KEY ~LWin:: if (A_PriorHotkey <> "~LWin" or A_TimeSincePriorHotkey > 400) { KeyWait, LWin return } Send, {F2} return ;FULLSCREEN : DOUBLE-CLICKING LEFT SHIFT ~LShift:: if (A_PriorHotkey <> "~LShift" or A_TimeSincePriorHotkey > 400) { KeyWait, LShift return } Send, {F11} Sleep 100 return ;SEARCH GOOGLE : DOUBLE-CLICKING LEFT ALT KEY ~LAlt:: if (A_PriorHotkey <> "~LAlt" or A_TimeSincePriorHotkey > 400) { KeyWait, LAlt return } Send, ^k Send, ^+v return ;ALL STYLES OFF : DOUBLE-CLICKING | KEY ~|:: if (A_PriorHotkey <> "~|" or A_TimeSincePriorHotkey > 400) { KeyWait, | return } Sleep 100 Send, !w return ; DARK READER OFF : : DOUBLE-CLICKING 1 KEY ~1:: if (A_PriorHotkey <> "~1" or A_TimeSincePriorHotkey > 400) { KeyWait, 1 return } Send, !+d return
Enjoy
-
If you use this syntax (:*:) there is no need to use the {SPACE} at the end:
:*:vf:: Run , "https://forum.vivaldi.net/recent" return
(This is a simpler code that the former and is also OK)
This is the list of keys and buttons of the mouse:
https://www.autohotkey.com/docs/KeyList.htm
The help page is excellent and has examples.
-
@barbudo2005 I didn't reply here but this thread was already bookmarked as useful having AHK on PC
-
OK.
It is a pity nobody measure the potential it has. -
@barbudo2005 I used it often to do very basic macros on mini games or to simulate custom actions/buttons in explorer compiling the exe (like opening panels, scroll windows and so on).
-
@barbudo2005 It’s only available for Windows. No real point in writing about it in a feature request topic. But you could create a new topic with tips and tricks for Autohotkey for Vivaldi users on Windows.
-
You had mention a very important issue.
It has all the point in writing in this feature request topic, because my intention was to give a solution to this request now, today not in many years more!!!
In 1 or 2 days you can forget about to remember the 50 shortcuts.
What is better?
To have a solution of the request now and maybe more powerful that the future internal, or have it in two or more years later.
And please don't despise my post because of "It’s only available for Windows" because the majority of actual and future users of this excellent browser are or will come from Windows.
This issue is a lot related with my thread : https://forum.vivaldi.net/topic/44540/please-don-t-complain
A few days before some user says about Multiline Tabs :
"Man, this solution sucks. I won't switch to Vivaldi until I see an officially-supported, and easy to use multi-row tabs solution.
I'll keep using my trusty PaleMoon web browser until then."I believe this user came from old Firefox.. Old Firefox didn't have internal Multiline Tabs so you had to use the extension Tab Mix Plus.
Do you believe something had the courage to request in the Firefox forum to have internal Multiline Tabs?
Of course not. The philosophy then and I think still today should be:
We give you an excellent browser with more features than others browsers, but in the areas we don't, in the meantime use Extensions, CSS, Styles, or AHK to supply the requests you have. Remember we are a child browser. A genius browser but still very young.
-
@barbudo2005 I think your solution is fine for the people that can implement it. Still, native in the browser would be better, for everyone who wants it. The feature request forum board is a place to express suggestions and wishes. There’s no reason coming here telling users their request is pointless, or linking to a thread that complains about people wanting a certain feature. Relax, look for your towel and most importantly: don’t panic.
-
This post is deleted! -
This is a AHK solution for Mnemonic Shortcuts.
You forget about using normal shortcuts like Ctrl + Alt + F6. Instead you use a 2 letter mnemonic shortcuts:
The rules are:
1.- One Word: the first and the last letter.
Bookmarks : BS
Settings : SS2.- Two words: the first letters of the two words.
Tile Vertically : TV
Reload Page : RP3.- Three or more words : the first letters of the two words most representative.
Developer Tools Console : DC
Spatial Navigation Down : NDSome exceptions, adds and rarities:
1.- For a few mnemonic words I had to change a little the rules because they repeat in another shortcut.
2.- For Paste and Go I add Copy before Paste and Go, so you don't have to apply copy to a highlight word.
3.- I add Paste : PE
4.- I find that Alt + Home simulate browser restart so I add it to the list.
5.- Delete A, W, D and S Spatial Navigation Shortcuts.
6.- I add Open Vivaldi Forum : FV and Open Vivaldi Blog : VG
7.- They only apply to Vivaldi except Full Screen (FE) because I think is useful to have it for others software.The list is: (about 75 shortcuts)
#IfWinActive, ahk_exe vivaldi.exe ; ******* WINDOW ******* ;Ctrl + N ;New Window ;NW :*:nw::^n ;Ctrl + Shift + N ;New Private Window ;PW :*:pw::^+n ;F2 ;Quick Commands ;QC :*:qc::{F2} ;Shift + Esc ;Task Manager ;TM :*:tm::+{Esc} ;Ctrl + F12 ;Settings ;SS (Delete A, W, D and S Spatial Navigation Shotcuts) :*:ss::^{F12} ;Ctrl + Shift + E ;Extensions ;ES :*:es::^+e ;Ctrl + H ;History ;HY :*:hy::^h ;Ctrl +B ;Bookmarks ;BS :*:bs::^b ;Ctrl + F1 ;Show All Keyboard Shortcuts ;KS :*:ks::^{F1} ;F6 ;Focus Next Pane ;NP :*:np::^{F6} ;Shift + F6 ;Focus Previous Pane ;PP :*:pp::+{F6} ;Ctrl + U ;View Page Source ;VS :*:vs::^u ;Ctrl + Shift + I ;Developer Tools ;DT :*:dt::^+i ;Ctrl + Shift + J ;Developer Tools Console ;DC :*:dc::^+j ;Ctrl+ Shift + V ;Paste and Go ;PG :*:pg:: ^c ^+v return ;Ctrl+ V ;Paste ;PE :*:pe::^v ; ******* VIEW ******* ;F11 ;Full ScrEen ;FE :*:fe::{F11} ;Ctrl + Shift + B ;Bookmarks Bar ;BB :*:bb::^+b ;Ctrl + Shift + S ; Status Bar ;SB :*:sb::^+s ;Ctrl + F11 ;Toggle UI ;TU :*:tu::^{F11} ;0 ;Page Zoom In ;ZI :*:zi::0 ;9 ;Page Zoom Out ;ZO :*:zo::9 ;Ctrl + 0 ;Page Zoom Reset ;ZR :*:zr::^0 ;F4 ; Open Panel ;OP :*:op::{F4} ;F7 ;focus PaneL ;PL :*:pl::{F7} ;Alt + F7 ;Open neXt Panel ;XP :*:xp::!{F7} ;Alt + Shift + F7 ;Open preVious Panel ;VP :*:vp::!+{F7} ;Ctrl + Alt + F6 ;Bookmarks Panel ;BP :*:bp::^!{F6} ;Ctrl + Shift + D ;Downloads Panel ;DP :*:dp::^+d ;Shift + O ;NoteS panel ;NS :*:ns::+o ;Ctrl + Shift + H ;History Panel ;HP :*:hp::^+h ; ******* TAB ******* ;Ctrl + T ;New taB ;NB :*:nb::^t ;Ctrl + w ;Close Tab ;CT :*:ct::^w ;Ctrl + Shift + Tab ;Tab Cycler Back ;TB :*:tb::^+{Tab} ;Ctrl + Tab ;Tab Cycler Forward ;TF :*:tf::^{Tab} ;Ctrl + Page Up ;Previous Tab (by order) ;PT :*:pt::^{PgUp} ;Ctrl + Page Down ;Next Tab (by order) ;NT :*:nt::^{PgDn} ;Num 4 ;Previous tab (Recent) ;PR :*:pr::4 ;Num 3 ;Next tab (Recent) ;NR :*:nr::3 ;Ctrl + Shift + Page Up ;Move Active Tab Backward ;AB :*:ab::^+{PgUp} ;Ctrl + Shift + Page Down ;Move Active Tab Forward ;AF :*:af::^+{PgDn} ;Ctrl + 1 ;Switch to Tab 1 ;T1 :*:t1::^{Numpad1} ;Ctrl + 2 ;Switch to Tab 2 ;T2 :*:t2::^{Numpad2} ;Ctrl + 3 ;Switch to Tab 3 ;T3 :*:t3::^{Numpad3} ;Ctrl + 4 ;Switch to Tab 4 ;T4 :+:t4::^{Numpad4} ;Ctrl + 5 ;Switch to Tab 5 ;T5 :*:t5::^{Numpad5} ;Ctrl + 6 ;Switch to Tab 6 ;T6 :*:t6::^{Numpad6} ;Ctrl + 7 ;Switch to Tab 7 ;T7 :*:t7::^{Numpad7} ;Ctrl + 8 ;Switch to Tab 8 ;T8 :*:t8::^{Numpad8} ;Ctrl + 9 ;Switch to the Last Tab ;LT :*:lt::^{Numpad9} ;Ctrl + Z ;Re-open Last Closed Tab ;RT :*:rt::^z ;Ctrl + F9 ;Tile Vertically ;TV :*:tv::^{F9} ;Ctrl + F8 ;Tile Horizontally ;TH :*:th::^{F8} ;Ctrl + F7 ;Tile to Grid ;TG :*:tg::^{F7} ;Ctrl + F6 ;Untile Tabs ;UT :*:ut::^{F6} ;Ctrl + Shift + Alt + I ;Load Images ;LI :*:li::^+!i ; ******* PAGE ******* ;Ctrl + D ;Create Bookmark ,CB :*:cb::^d ;F8 ;Focus Address Field ;FA :*:fa::{F8} ;F5 ;Reload Page ;RP :*:rp::{F5} ;Ctrl + F5 ;Force Reload Page ;FR :*:fr::^{F5} ;F9 ;Focus paGe ;FG :*:fg::{F9} ;Ctrl + K ;Focus Search Field ;FS :*:fs::^k ;Ctrl + F ;FinD in page ;FD :*:fd::^f ;Backspace ;History Back ;HB :*:hb::{Backspace} ;Ctrl + Right key ;History Forward ;HF :*:hf::^{Right} ;Esc ;Stop Loading ;SL :*:sl::{Esc} ;Ctrl + O ;Open File ;OF :*:of::^o ;Ctrl + S ;Save Page As ;SP :*:sp::^s ;Home ;Home ;HE :*:he::{Home} ;Alt + Home ;Simulate Browser Restart (New shortcut) ;BR :*:br::!{Home} ;Ctrl + Shift + C ;Copy Selected Text to Note ;CN :*:cn::^+c ;Shift + Down Key ;Spatial Navigation Left ;NL :*:nl::+{Left} ;Shift + Up Key ;Spatial Navigation Up ;NU :*:nu::+{Up} ;Shift + Right Key ;Spatial Navigation Right ;NR :*:nr::+{Right} ;Shift + Down Key ;Spatial Navigation Down ;ND :*:nd::+{Down} ; ******* BONUS ******* ; Open Vivaldi Forum :*:vf:: Run , "https://forum.vivaldi.net/recent" return ; Open Vivaldi Blog :*:vg:: Run , "https://vivaldi.com/blog/" return #IfWinActive ;F11 ;Full Screen ;FE :*:fe::{F11}
For those that have installed AHK, this is the ahk file:
https://drive.google.com/file/d/1vWv9G97r1tN4pX5i218bEbOw-cxV3dlU/view?usp=sharing
For those that want to use it without install, this is the exe file (701 kB):
https://drive.google.com/file/d/1arG8YT31-GUjXpmhXIP79mizN_4AKoMm/view?usp=sharing
You have to make a shortcut and put it in the Start folder of Windows.
Is still in Beta. Only has the drawback related with the Address, Search and Find fields. When you type a word (not very often, no when you paste) with the 2 letters of a mnemonic, it will trigger the shortcut. (I am looking for a solution. Maybe a AHK user expert could have a solution to exclude the fields)
-
Ppafflick moved this topic from Third-Party Apps on