javascript – Chrome browser looses focus after confirm dialog

In my JS app Im registering

    window.onbeforeunload = function(e) {
        return "Do you want to exit this page?";
    };

This works, but when reloading the page it causes the entire browser to loose focus. I have to click the window so it regains focus. Is there a way around this?

I tried focusing an element, like el.focus() but it’s the whole browser that looses focus.

How can i use Autohotkey to open google chrome paste a link and restore focus back to the original focus?

So I’m really new to ahk (any tips are well appreciated) I’ve never coded before too so this is really confusing me. What I’m trying to do is create a code that allows me to open the chrome app if not already open, paste a link change focus to the zoom application, click on the join with audio button. If you can, can you make it so it brings the focus back to the original window?

Yeah, I know that I shouldn’t join my zooms without being there but I leave to eat or just go downstairs a lot and my teachers don’t let anyone in after 5 minutes of the meeting starting. If you need any other information please ask and I will provide it.

One of my friends had a code to do something he said was similar so here

SetControlDelay -1

!PgDn::
    ActiveWindow := WinActive("A") ;store the hwnd of current active window
    Run, https://www.google.com
    WinWaitActive, ahk_exe chrome.exe ;wait for chrome to get focus
    WinActivate, % "ahk_id " ActiveWindow ;restore focus
    ControlClick, x1570 y600, Google - Google Chrome, , , , NA
Return

canon – Where can I find or make a script for focus stacking using Raynox DCR 250?

Really old thread. Anyway, it seems people confuse ‘stacking’ and ‘bracketing’. Bracketing is used to capture a number of pictures of a scene while varying a parameter, exposure, focus, what have you. Stacking is a post processing technique for combining bracketed photos to create HDR or increased depth of field, for instance.

For the original posters question, long time back i loaded up my Canon A720IS with the hacked CHDK firmware which facilitates scripting and wrote a script based on the hyperfocal distances. It worked ok and stacking the focus bracketed shots did result in enhanced DOF.

Some google fu came up with https://chdk.fandom.com/wiki/UBASIC/Scripts/CanonA640:_Focus_Bracketing

timelapse – Can I modify a Logitech C615 webcam for infinity focus?

I had the same issue/idea as you and decided to see if I could alter the camera to focus father away. After taking it apart, the four spokes don’t appear to allow adjustment of the focus. They don’t turn. As the camera focuses the lens assembly (including this 4 spoke thing) moves closer to the sensor (for far away focus) and farther from the sensor (for close up focus). I verified by watching it work as it focused close up and far away.

I did, however, desolder the focus assembly’s leads and removed the assembly. Underneath there was a clear plastic sticky pad which I removed. That moved the lenses very slightly closer to the sensor which changes the focal range to allow it to focus slightly farther away. If you do this, make sure the top part of the focus assembly doesn’t separate from the bottom increasing the distance or causing it to be slanted… mine did this and I had to super glue it together after I was done working on it.

It still won’t focus very far out, but it’s significantly better. If you can figure out a way to shave some more distance (being literal) you should be able to extend the focus farther. I couldn’t think of a way to do it without designing a new bracket, and only needed it to focus better at about 6-10 feet. It may be possible to ‘lap’ the bracket down if you’re very careful to keep it flat.

It’s still not as focused at 6′ compared to 4″ so even for my use I would benefit from less distance between the lens assembly and the sensor. The impact to the ‘macro’ performance of the camera appears minimal… I think this thing was designed to focus too close – even as a webcam…

film cameras – Rangefinder focus shadow discrepancy

What you describe is a misaligment of the beam splitter (which, despite its name, in this case combines or overlays the image from the moving mirror or prism in the RF over the straight-through image in the main viewfinder).

Correcting this is possible in almost all rangefinders, and fairly routine for an experienced technician. Be sure you mention it when you drop off or mail in the camera for servicing. I’d recommend also having the shutter and advance/cocking mechanism serviced at the same time; it saves shipping the downtime compared to having to do them separately, and for a camera that old (40-50 years), both most likely need service.

That said, many self-repairers have performed this kind of adjustment — I would, however, recommend starting with a camera that doesn’t have metering and flash wiring under the top cover, as those complicate the process of accessing the rangefinder and closing up after the work is done.

focus – Would a screw in 2x converter double the minimum focusing distance?

What you bought is called a close-up lens or perhaps a supplemental lens. The close-up lens is a cousin of the lenses used in reading eyeglasses. When you mount such a lens, it changes the minimum distance, camera-to-subject. Now many will tell you that that’s not the way to go because they degrade the quality of the resulting image. I tell you that in most cases they work just fine, you will hardly notice any hindering.

Photo-grade close-up lenses are constructed using two lenses mounted together. This tried and true method mitigates an aberration called chromatic. Chromatic aberration shows itself as a rainbow fringe around the edges of objects in your image.
The power of a close-up is labeled as +1 or +2 or +3 etc. Sometimes they are called 2X or 3X or 4X etc.

The value as labeled uses a language common to an optician. A +1 has a focal length of 1000mm. When mounted on your camera, and your camera is focused on infinity ∞, objects 1000mm from the front of your camera will come to focus (about 1 yard).
Mount a +2 and now you start at 500mm = 20 inches. Mount a +3 and you start at 333mm = 13 inches. Mount a +4 = 250mm = 10 inches. Mount a +5 = 200mm = inches. Mount a +6 = 166mm = 6 ½ inches.

Because camera close-up lenses are simply refined reading glass lenses, you can go to the drugstore and at the reading glass display, hand-hold any of the spectacles before your camera lens. What you see is what you would get, as to magnification. Remember, photo grade lenses are what you want. In a pinch, I have used store bought lenses from the drugstore, and this worked out OK.

Spell focus tool as it applies to Thunder Gauntlets

This question would also apply to Wands, Rods, and every other non-weapon item held in one hand. Anyway.

If I am an Articifer, Armorer, using Guardian Armor… Can I hold a Rod, Wand,or All Purpose Tool in one hand and still use that hand/gauntlet to attack in melee? Similarly, can a monk hold a Rod in one hand and use that same hand to punch a monster?

The short question is this. While holding a non-weapon magic item in my right hand, can I use that same hand to attack with a fist? I may have a short stick in my hand, but I can still punch someone (in game terms, providing no bonuses or negatives).

accessibility – Let screenreader know about content prior to focus location

Consider the Amazon search bar: it has a drop-down at the beginning that lets you select which department to search in, then the search input, and then the search submit button.

Screenshot of Amazon search bar

I’d like to have a similar search interface that opens up when the user clicks a search button. For most people – interacting visually with the site – throwing focus on the input when search opens will be the best UX. The subset who want to select a result category other than “all” can click or shift-tab to it.

However, we can’t use that approach if it means screenreader users won’t know the select even exists. Is there a way to let the screenreader user know the select drop-down is there when the focus is set on the input, later in the HTML?

The closest I have come to a solution is to use an aria-describedby attribute on the input, pointing at visually-hidden text describing the select and its relationship to the input, but my attempts at that text are clunky and long and not very clear.

gopro – Minimum focus distance with close-up lens

The GoPro has a depth of field from 30 cm to infinity (I think).

I’m looking for ways to lower the minimum distance for situations where I physically can’t move the camera further away from the subject.

There are “macro” or “close up” lenses available, they are usually described as “10X macro magnification” and they have “Close up +10” printed on them.

lens

Do those just magnify the image so that it appears closer (wouldn’t help in my situation) or do they actually allow me to focus at closer distances? Is there a way to predict what the new minimum distance would be?

There are also “16X macro lenses” available, would those lower the minimum focus distance further?

If they physically fit, would I be able to use two such lenses to lower the distance further?

canon – Image rejected by Shutterstock because the main subject is out of focus and it contains noise

Here are a few suggestions that will help you for future submissions.

Image Caption / Image Title

The correct description plays a huge role in the image being accepted or not.
An image such as this, needs a caption such as the following, or something to this effect

“A single in focus strand of purple lavender against a sea of blurry and out of focus purple flowers”

Because the depth of field in your image is so shallow, a caption such as this ensures that the image is reviewed correctly.

Focus

When taking images handheld, most images suffer from Motion blur.
Images such as flowers in a field, suffer additionally from wind!
So, even if you were using a tripod, there is no guarantee that the shutter speed was sufficient enough to capture a pin sharp image.

In the case of this image, the main subject it is not sharp and suffers from motion blur of about -70-75 degrees(going upwards towards 11oclock) at a radius of about 8-10 pixels.
This needs correcting.

In addition to this, the main subject also lacks contrast and definition and that also increases the possibility of the main subject being viewed as out of focus.

Chromatic Aberration

The motion blur around the main subject along with the back/side light, has created a Blue/Magenta tint that needs to be taken out.

Camera limitations

Finally, your camera plays a big part on the quality of the image.
What may look good on the back of the camera or great on a monitor, may not transpire to look so great when its viewed at 200%.

You have to remember, it is the Stock agencies reputation at stake and therefore your image will be scrutinised at not just a maximum of 100% resolution, but possibly a lot higher.

Along with all these technical issues, your image also needs to highlight the main subject so that it’s the brightest part of the image and where your eyes settles first.
Other brighter areas need to have the highlights reduced.

Perhaps, for this type of image, you need a lens that can provide a more “creamier” background blur so that there is a clear definition between the subject and background with the right amount of contrast.

Due to the image being backlit, or slightly to the side, I can only presume you have lifted the shadows or the camera automation has lifted the shadows and this has introduced noise.

Hope this helps