Jump to content

Recommended Posts

Posted

I've recently been annoyed by how google images works. You can't click an image and see the full res image. You have to go to the website and find the image on the page and occasionally, it won't allow you to view the image easily. This script makes it easy to view any image in google images in full resolution immediately. You just press Ctrl + Q while hovering over the image you want and it'll open full res in a new tab. This is only tested in firefox, but it shouldn't be hard to modify for another browser.

Here it is:

#include <Misc.au3>
#include <MsgBoxConstants.au3>
#include <AutoItConstants.au3>
#include <Clipboard.au3>
#include <Array.au3>
#include <String.au3>

Local $clipB
Local $urlArray
Local $theLink

HotKeySet("^q", "OpenImage")

Func DecodeUrl($src)
    Local $i
    Local $ch
    Local $buff

    ;Init Counter
    $i = 1

    While ($i <= StringLen($src))
        $ch = StringMid($src, $i, 1)
        ;Correct spaces
        If ($ch = "+") Then
            $ch = " "
        EndIf
        ;Decode any hex values
        If ($ch = "%") Then
            $ch = Chr(Dec(StringMid($src, $i + 1, 2)))
            $i += 2
        EndIf
        ;Build buffer
        $buff &= $ch
        ;Inc Counter
        $i += 1
    WEnd

    Return $buff
EndFunc   ;==>DecodeUrl

Func OpenImage()
   MouseClick($MOUSE_CLICK_RIGHT)
   Send("A")
   Sleep(100)
   $clipB = _ClipBoard_GetData($CF_TEXT)
   $theLink = DecodeUrl($clipB)
   $urlArray = _StringBetween($theLink, "=", "&")
   If StringInStr($urlArray[0], "?") <> 0 Then
      $urlArray = _StringBetween($theLink, "=", "?")
   EndIf
   ShellExecute($urlArray[0])
EndFunc

While 1

Wend

 

  • 2 weeks later...
Posted

Nice.

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...