AutoHotKey Recipes for Vivaldi
-
@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