<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[bookmark bar toggle via AutoHotKey]]></title><description><![CDATA[<p dir="auto">So here's a clunky, primitive macro that navigates the GUI to operate a control - the sort of thing we used to make buttons for, back when Opera had a built-in system for clunky macros. But now you have to get that separately - and AutoHotKey is there. Free, open source - and a serious language, which you can use quite casually, or use to build applications. Download from <a href="http://ahkscript.org" target="_blank" rel="noopener noreferrer nofollow ugc">http://ahkscript.org</a> . (There's been a revolution in AHK-land, and the zombie hordes now control <a href="http://AutoHotKey.com" target="_blank" rel="noopener noreferrer nofollow ugc">AutoHotKey.com</a>. Or something.)</p>
<p dir="auto">One benefit of learning to use it - it sits on top of everything, and lets you automate procedures, add functions, or change your keyboard in any application, and in Windows too.</p>
<p dir="auto">There's nothing clever here. The macro just opens the Settings page, puts "book" in the search field to make the page shrink, clicks a location which if all goes well holds the radio button that toggles the bar, and dismisses the page. Because the radio button is lower on the page when the bar is showing, two commands are used.</p>
<p dir="auto">It's brittle - it jumps blindly to a specific location on the page, and won't work if you change page size. More sophisticated forms that find the position of the control, and will work regardless of resizing, are possible (any volunteers?). And you might have to adjust the delays which are put in to let Opera finish responding to one action before the next is launched; machine speed matters, and the delays I've used are just the shortest that haven't failed here.</p>
<p dir="auto">You will need to set up a script and put a shortcut to it in your startup folder. It can include sections to work with other programs too. Here's the code for the toggle:</p>
<pre><code> #IfWinActive ahk_class Chrome_WidgetWin_0			; Opera 20
 !b::					; show bookmark bar
 send !p
 sleep 400
 send book
 sleep 500
 click 496,170
 send ^w
 return
 !c::					; clear bookmark bar
 send !p
 sleep 400
 send book
 sleep 500
 click 496,200
 send ^w
 return
</code></pre>
<p dir="auto">There's a utlity in AHK called Window Spy you use to determine the location to click.<br />
If there's anyone to whom this seems worth investigating - and, after all, there used to be a little band of button-makers - well great!</p>
]]></description><link>https://forums.opera.com/topic/2241/bookmark-bar-toggle-via-autohotkey</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 15:37:35 GMT</lastBuildDate><atom:link href="https://forums.opera.com/topic/2241.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Apr 2014 05:06:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to bookmark bar toggle via AutoHotKey on Sun, 27 Apr 2014 06:16:12 GMT]]></title><description><![CDATA[<p dir="auto">Here's a more competent form - a one-key toggle, which doesn't rely on screen position &amp; works regardless of resizing.</p>
<pre><code> #IfWinActive ahk_class Chrome_WidgetWin_0			; Opera 20
 !b::							; bookmark bar toggle 
 send !p
 sleep 1000
 send book
 sleep 600
 send {tab}{space}^w
 return
</code></pre>
<p dir="auto">The 1-second delay, waiting for the settings page to load, isn't always enough; seems to take especially long when one is on this site, for some reason. But no harm is done if it fails.</p>
]]></description><link>https://forums.opera.com/post/36751</link><guid isPermaLink="true">https://forums.opera.com/post/36751</guid><dc:creator><![CDATA[bpm2]]></dc:creator><pubDate>Sun, 27 Apr 2014 06:16:12 GMT</pubDate></item><item><title><![CDATA[Reply to bookmark bar toggle via AutoHotKey on Thu, 24 Apr 2014 05:25:14 GMT]]></title><description><![CDATA[<p dir="auto">[]</p>
]]></description><link>https://forums.opera.com/post/36242</link><guid isPermaLink="true">https://forums.opera.com/post/36242</guid><dc:creator><![CDATA[bpm2]]></dc:creator><pubDate>Thu, 24 Apr 2014 05:25:14 GMT</pubDate></item><item><title><![CDATA[Reply to bookmark bar toggle via AutoHotKey on Thu, 24 Apr 2014 05:22:07 GMT]]></title><description><![CDATA[<p dir="auto">[<strong>mod edit:</strong> thanks for sharing <img src="https://forums.opera.com/assets/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=f58hvca1lju" class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face" title=":)" alt="🙂" /><br />
I moved your corrected code up into your original post]</p>
]]></description><link>https://forums.opera.com/post/36241</link><guid isPermaLink="true">https://forums.opera.com/post/36241</guid><dc:creator><![CDATA[bpm2]]></dc:creator><pubDate>Thu, 24 Apr 2014 05:22:07 GMT</pubDate></item></channel></rss>