AutoHotKey Recipes for Vivaldi
-
When "I'm not a robot" show up, automatically search using another search engine.
Update: Oct. 24, 2022
e.g. startpage.com
Menu Tray, Icon, imageRes.dll, 96 #Persistent SetTimer,Startpage,3000 Startpage: IfWinActive, ahk_exe vivaldi.exe { SetTitleMatchMode, 2 IfWinActive, www.google.com/search?q= { ClipSaved := ClipboardAll sleep 50 send, ^k sleep 80 send, ^c ClipWait,2 send, ^w Run, https://www.startpage.com/do/search?q=%Clipboard% Clipboard := ClipSaved sleep 50 ClipSaved = } } Return
-
Multiple Search & Tile
^+k:: Gui, Color, e6e6fa, f5f5f5 Gui, Add, Edit Gui, Add, Button, Ggoogle, Google(JP) Google(En) Gui, Add, Button, Ggooduck , Google DuckDuckGo Gui, Add, Button, Gyodoama , Yodobashi Amazon Gui, show Return google: ClipSaved := ClipboardAll GuiControlGet, clipboard, , Edit1 Run, https://www.google.com/search?q=%clipboard%&num=100 Run, https://www.google.com/search?q=%clipboard%&hl=en&num=100 sleep 1000 send, ^{F9} Clipboard := ClipSaved ClipSaved = GUI, Destroy Return gooduck: ClipSaved := ClipboardAll GuiControlGet, clipboard, , Edit1 Run, https://www.google.com/search?q=%clipboard%&num=100 Run, https://duckduckgo.com/?q=%clipboard% sleep 1000 send, ^{F9} Clipboard := ClipSaved ClipSaved = GUI, Destroy Return Yodoama: ClipSaved := ClipboardAll GuiControlGet, clipboard, , Edit1 Run, https://www.yodobashi.com/?cate=&word=%clipboard%&ginput= Run, https://www.amazon.co.jp/s?k=%clipboard% sleep 1000 send, ^{F9} Clipboard := ClipSaved ClipSaved = GUI, Destroy Return
-
@shifte
I do date and time entries so often in so many apps, I just use this to automatically do date and time whenever it type 3 ds or 3 ts:*:ddd:: ;Date alone, not bold
Formattime, Currentdate,, MMM dd yyyy
SendInput %CurrentDate%
Return:*:ttt:: ;time alone
Formattime, CurrentTime,, hh:mm
sendInput %CurrentTime%
Return -
@steveshank
Great job! -
@shifte hallo, someone has already done it through AutoControl, or a different suggestion than to do so???
-
AutoControl is a extension for Chrome, so not have commands for Vivaldi.
-
@VAIO73
I'm not sure. I'm not using AutoControl now. -
Hello!!!
I have a question about session autosave!!!
https://forum.vivaldi.net/post/530280
In my environment, I don't have to set an appropriate number as the name, but if I hit enter, with no input, it automatically becomes the name of the date! Is it just me? Or was this implemented in a recent update? I forgot.
(Forgive the Japanese in the image. ️)Personally, I'd be more than happy to have it set to the date on its own, so here's what I've done!(I assign session save to Ctrl+R, so that's what the code is for.)
#Persistent IfWinExist ahk_exe vivaldi.exe { WinActivate, ahk_exe vivaldi.exe Sleep 300 Send,^r Sleep,300 Send,{Enter} } else { Run, "%LOCALAPPDATA%\Vivaldi\Application\vivaldi.exe" Sleep 4000 Send,^r Sleep,300 Send,{Enter} } Sleep 300 ExitApp
Still, great code, thanks seriously! Woo hoo!!!
-
@naporitan0sushi
Yeah, you're right! I have never noticed that.
With the Stable Channel, I can't press the save button when the Session Name is blank.
With the Snapshot, I can press the save button. -
【translation】
Yay!!!
Question.When the Vivaldi browser is inactive, is it possible to save the session and then make the originally open window active again?
For example.
1, I am working in Notepad.
2, At the time specified in the task scheduler, the Vivaldi browser becomes active and automatically saves the session.
3, minimize the Vivaldi browser and make Notepad active again...I have tried everything in my own way and asked ChatGPT for a few days, but I couldn't get it to work...
The idea is to get the current active window before executing the code, and switch to the acquired active window after executing the code...?
Or, minimize the Vivaldi browser after the code is executed, but not if Vivaldi was already active before the code was executed...?
I can come up with the idea, but I am having trouble with the technology to code it....
I've asked various ChatGPTs to code it for me, but they were all very subtle.
It minimizes even when Vivaldi is active, and vice versa, it doesn't minimize even when the Vivaldi browser is not active....
I would be glad if you could let me know if you have some free time.... Ignoring is totally OK. Sorry for asking so brazenly.
Translated with www.DeepL.com/Translator (free version)
【Text before translation】
やっほーーです!!
質問です。Vivaldiブラウザがアクティブではない時、セッション保存した後、元々開いていたウィンドウをアクティブに戻すことは可能でしょうか?
例:
1、メモ帳で作業している
2、タスクスケジューラで指定した時刻になり、Vivaldiブラウザがアクティブになり、セッションを自動保存する
3、Vivaldiブラウザを最小化して、再度、メモ帳をアクティブに戻す…数日、自分なりに色々試してみたり、ChatGPTに聞いてみたりしましたが、うまい具合にできなくて…。
考え方としては、コード実行前に現在のアクティブウィンドウを取得して、コード実行後に取得したアクティブウィンドウに切り替える…とかですかね…?
それとも、コード実行後にVivaldiブラウザを最小化するようにして、コード実行前に既にVivaldiがアクティブだった場合は、最小化しない…的な感じですかね…?
考え方は思いつくのですが、それをコード化する技術がなくて困っています…。
色々ChatGPTに聞いて、コードを作成してもらいましたが、どれも微妙な感じでした。
Vivaldiがアクティブの時でも、最小化しちゃったり、その逆でVivaldiブラウザがアクティブじゃない時も最小化してくれなかったり…。
暇なときでいいので、もしよろしければ、教えていただければ、嬉しいです…。無視でも全然OKです。図々しく聞いてすみません
-
@naporitan0sushi
It just needs to add "WinMinimize ahk_exe C:\your installation path\vivaldi\Application\vivaldi.exe " to one line above "ExitApp".btw, what a coincidence! I wanted to ask you as well.
As for https://www.naporitansushi.com/vivaldi-forum-recently-posted-height/ .
Could you move the post content?
-
@naporitan0sushi
Sorry, I was mistaken!
↓ Try this!#Persistent IfWinExist ahk_exeC:\software\vivaldi\Application\vivaldi.exe { IfWinActive ahk_exeC:\software\vivaldi\Application\vivaldi.exe { Send,^!+s Sleep,300 IME_OFF() Sleep,300 Random, rnd ,10,99 Send,%rnd% Sleep 500 Send,{Enter} } IfWinNotActive ahk_exeC:\software\vivaldi\Application\vivaldi.exe { WinActivate, ahk_exe C:\software\vivaldi\Application\vivaldi.exe Sleep 300 Send,^!+s Sleep,300 IME_OFF() Sleep,300 Random, rnd ,10,99 Send,%rnd% Sleep 500 Send,{Enter} sleep 200 WinMinimize ahk_exe C:\software\vivaldi\Application\vivaldi.exe } } else { Run, C:\software\vivaldi\Application\vivaldi.exe Sleep 3000 Send,^!+s Sleep,300 IME_OFF() Sleep,300 Random, rnd ,10,99 Send,%rnd% Sleep 500 Send,{Enter} Sleep 200 } Sleep 300 ExitApp IME_OFF() { If (IME_IsON(WinExist("A"))) { IME_ON(WinExist("A"), False) } } IME_IsON(hWindow) { ; WM_IME_CONTROL= 0x0283 ; IMC_GETOPENSTATUS = 0x0005 bufCurrentDetectMode := A_DetectHiddenWindows DetectHiddenWindows, On buf := DllCall("user32.dll\SendMessageA", "UInt", DllCall("imm32.dll\ImmGetDefaultIMEWnd", "Uint",hWindow), "UInt", 0x0283, "Int", 0x0005, "Int", 0) DetectHiddenWindows, %bufCurrentDetectMode% Return buf } IME_ON(hWindow, IsON) { ; WM_IME_CONTROL = 0x0283 ; IMC_SETOPENSTATUS = 0x0006 bufCurrentDetectMode := A_DetectHiddenWindows DetectHiddenWindows, On buf := DllCall("user32.dll\SendMessageA", "UInt", DllCall("imm32.dll\ImmGetDefaultIMEWnd", "Uint",hWindow), "UInt", 0x0283, "Int", 0x0006, "Int", IsON) DetectHiddenWindows, %bufCurrentDetectMode% Return buf }
-
@shifte said in AutoHotKey Recipes for Vivaldi:
Hello.
Could you move the post content?
What does this mean? Sorry I don't understand English. Stop publishing articles and write only in the Vivaldi forum! Does this mean? ...🥲Or do you want me to keep the article but write the content in the Vivaldi forum? I didn't have the idea of writing in the Vivaldi forum because it's kind of my record .
Sorry, I was mistaken!
Oooooh! Thank you. After staring at it for a few hours since then, I am now using the following code.
; Vivaldiウィンドウをアクティブにする IfWinNotActive, ahk_exe vivaldi.exe { WinActivate, ahk_exe vivaldi.exe } else { Sleep 100 Send, ^r Sleep 100 Send, {Enter} ExitApp } WinGet, winList, List, ahk_exe vivaldi.exe Loop, %winList% { this_id := winList%A_Index% WinGetTitle, title, ahk_id %this_id% If (title != "ピクチャー イン ピクチャー") { WinActivate, ahk_id %this_id% Sleep 100 Send, ^r Sleep 100 Send, {Enter} WinMinimize, ahk_id %this_id% break } } ExitApp
I knew you would use IfWinNotActive in the same way...! Excellent. It is very helpful. If I have created another window with Picture-in-Picture, the Picture-in-Picture will be active and executed, so I try to execute it on the Vivaldi window, not on the window title "Picture-in-Picture".
It is mostly left to ChatGPT rather than me creating it...
Note that I am using the snapshot version, so it is not a random number, just Enter. It saves it with the current date.
Thank you so much for taking the trouble to send me the modified code. I'm glad to hear it. Have a great day.
Translated with www.DeepL.com/Translator (free version)
-
@naporitan0sushi
すいません。言葉足らずで、物凄い想定外の勘違いをさせてしまいました。
「post content」は画像の赤で囲った部分のことです。ナポさんのブログ記事のことではありません。
赤を黄緑の所に移動できると良いなあ、という話のつもりでした。
「 -
日本語助かります…️️️️️
物凄い想定外の勘違いをさせてしまいました
想定外すぎる勘違いしちゃってすみません(笑)ちょー面白いです(笑)
画像の赤で囲った部分
なるほど!って、よっぽど @shifte 様のほうが詳しいとは思いますが、僕のほうでも試してみました。以下のCSSって感じですかね?
/*スレッドのタイトル横幅*/ .col-md-6 { width: 75%; } /*スレッド内容の横幅、左余白*/ .col-md-3 { width: 68%; margin-left: 70px; }
タイトルと内容の横幅(width)は、好みで調整する感じです。スレッド内容の左余白(margin-left)の数値も好みで調整します。
本当は、以下のコードも必要かなーと思ったんですが、なんか、内容の横幅を変えたら、勝手に下に移動してくれたので、いらないのかな?とも思ったり。
/*スレッド内容、下部移動*/ li[component="categories/category"]>div:nth-of-type(3) { float: none; }
僕はデザインセンスが全くないので、単に下移動、ちょっとインデントみたいに、左余白を設けているだけです。
-
/*スレッドのタイトル横幅*/ .col-md-6 { width: 75%; } /*スレッド内容の横幅、左余白*/ .col-md-3 { width: 68%; margin-left: 70px; }
↓素晴らしい!! 何か上手くいかなくて「ナポさんならできるだろ」と丸投げに走りましたw
記事の公開をやめて、Vivaldi フォーラムだけに書き込みましょう! これはどういう意味ですか?
これが何の話なのかが最初は全く分からなくて・・・行き違いをしていることに気が付くのに2分かかりました(笑)
これだけ想定外だった勘違いは、友達8人くらいで「銀座のライオン」で待ち合わせをしたら、他の7人が三越のライオンの像の前に集まっていたのに、
1人、ビアホールの銀座ライオンでビールを飲んで待っていたN君以来の出来事ですw -
Move window from the left monitor to the right monitor:
WIN + Right key
#right:: WinGet, mm, MinMax, A WinRestore, A WinGetPos, X, Y,,,A WinMove, A,, X+A_ScreenWidth, Y if(mm = 1) { WinMaximize, A } return
Move window from the right monitor to the left monitor:
WIN + Left key#left:: WinGet, mm, MinMax, A WinRestore, A WinGetPos, X, Y,,,A WinMove, A,, X-A_ScreenWidth, Y if(mm = 1) { WinMaximize, A } return
I can't remember where I got it.
-
Suppress the display of window borders. (AHKv2)
#Requires AutoHotkey v2.0 DWMWA_COLOR_DEFAULT := 0xFFFFFFFF DWMWA_COLOR_NONE := 0xFFFFFFFE BorderColor := DWMWA_COLOR_NONE SetTimer(SetBorderColor.Bind(BorderColor)) return SetBorderColor(BorderColor) { static WS_POPUP := 0x80000000 static DWMWA_BORDER_COLOR := 34 for hWnd in WinGetList('ahk_exe vivaldi.exe') { try { Style := WinGetStyle('ahk_id' hWnd) if (Style & WS_POPUP) return _DwmSetWindowAttribute(hWnd, DWMWA_BORDER_COLOR, BorderColor, 4) } } _DwmSetWindowAttribute(hWnd, dwAttribute, pvAttribute, cbAttribute) { DllCall('dwmapi.dll\DwmSetWindowAttribute', 'Ptr', hWnd, 'UInt', dwAttribute, 'UInt*', pvAttribute, 'UInt', cbAttribute) } }
-
I made DoubleCursor to help me scroll two documents at the same rate. With scrollwheel it works 100%, but the other buttons sometimes are sent to only one tile. I don't know why, but if you have suggestions please let me know!
-
@barbudo2005 win+shift+arrow is the native shortcut for that, works for all windows