New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

Workaround for scan popup functionality

General discussion

Re: Workaround for scan popup functionality

Postby Blessing » Wed Jul 24, 2013 3:49 pm

I'm really interested in using this on Chrome
I tried the three codes here, but none seems to work anymore on Chrome 28
Anyone still using this successfully on Chrome?
I also particularly want to use this on adobe reader... but they do not work too
Blessing
 
Posts: 4
Joined: Fri Jun 28, 2013 6:46 am

Re: Workaround for scan popup functionality

Postby wlhunag » Wed Jul 24, 2013 5:11 pm

Of course it works since then.
I still use it in Chrome 28

Code: Select all
~LButton::

  Loop {
  LButtonDown := GetKeyState("LButton","P")
  If (!LButtonDown)
     Break
  }

WaitTime:=DllCall("GetDoubleClickTime")/4500
KeyWait, LButton, D T%WaitTime%
If errorlevel=0
   GoSub, Routine
Return

Routine:
{
clipboard =
   ifwinactive ahk_class CabinetWClass
   {
      return
   }

   ifwinactive ahk_class ATL:000000014015A8C0
   {
   return
   }
 
  sleep,50
   send ,{Ctrl down}c{Ctrl up}

   clipboard = %clipboard%
   ClipWait,0.05
         StringLen, cliplen, clipboard
      if cliplen > 20
      {
      ;avoid non-English string
         return
      }
      if cliplen < 2
      {
      ;avoid non-English string
         return
      }
run D:\XXXXXX\GoldenDict\GoldenDict.exe  %clipboard% 
;   send,{Ctrl down}cc{Ctrl up}

   return
}

return


Please edit the last third line, so that it match the GoldenDict folder you use now. For example:
Code: Select all
run D:\Downloads\Dictionaries\GoldenDict-1.5.0-RC-11-g6a39192_(QT_4_8_4)(Abs62)\GoldenDict\GoldenDict.exe  %clipboard% 
wlhunag
 
Posts: 10
Joined: Wed May 23, 2012 3:07 pm

Re: Workaround for scan popup functionality

Postby Blessing » Thu Jul 25, 2013 10:56 am

wlhunag wrote:Of course it works since then.
I still use it in Chrome 28

Code: Select all
~LButton::

  Loop {
  LButtonDown := GetKeyState("LButton","P")
  If (!LButtonDown)
     Break
  }

WaitTime:=DllCall("GetDoubleClickTime")/4500
KeyWait, LButton, D T%WaitTime%
If errorlevel=0
   GoSub, Routine
Return

Routine:
{
clipboard =
   ifwinactive ahk_class CabinetWClass
   {
      return
   }

   ifwinactive ahk_class ATL:000000014015A8C0
   {
   return
   }
 
  sleep,50
   send ,{Ctrl down}c{Ctrl up}

   clipboard = %clipboard%
   ClipWait,0.05
         StringLen, cliplen, clipboard
      if cliplen > 20
      {
      ;avoid non-English string
         return
      }
      if cliplen < 2
      {
      ;avoid non-English string
         return
      }
run D:\XXXXXX\GoldenDict\GoldenDict.exe  %clipboard% 
;   send,{Ctrl down}cc{Ctrl up}

   return
}

return


Please edit the last third line, so that it match the GoldenDict folder you use now. For example:
Code: Select all
run D:\Downloads\Dictionaries\GoldenDict-1.5.0-RC-11-g6a39192_(QT_4_8_4)(Abs62)\GoldenDict\GoldenDict.exe  %clipboard% 

Thank you so much! It works so well!!
Just one more thing though (ignore me if you don't have time)
Is it possible to change the behavior to launching scan pop-up when highlighting text but not just a double click?
This will be useful when I want to look up the definition of a phrase.
Thank you again~
Blessing
 
Posts: 4
Joined: Fri Jun 28, 2013 6:46 am

Re: Workaround for scan popup functionality

Postby wlhunag » Thu Jul 25, 2013 11:20 am

Blessing wrote:Is it possible to change the behavior to launching scan pop-up when highlighting text but not just a double click?
This will be useful when I want to look up the definition of a phrase.

I don't know.
I just use Ctrl +CC in such situation.
wlhunag
 
Posts: 10
Joined: Wed May 23, 2012 3:07 pm

Re: Workaround for scan popup functionality

Postby Blessing » Thu Jul 25, 2013 11:51 am

wlhunag wrote:
Blessing wrote:Is it possible to change the behavior to launching scan pop-up when highlighting text but not just a double click?
This will be useful when I want to look up the definition of a phrase.

I don't know.
I just use Ctrl +CC in such situation.

I see... Your script is more than amazing already
Now I can fully enjoy using GoldenDict in Chrome 8-)
Blessing
 
Posts: 4
Joined: Fri Jun 28, 2013 6:46 am

Re: Workaround for scan popup functionality

Postby Robert Webber » Mon Oct 21, 2013 12:12 pm

Yeah, it supports Internet Explorer 9, but not firefox 4+! What the hell? I have also tried in opera, chrome and safari. Works really well in all the browsers except Firefox! I think the developers are somewhat allergic to Firefox!
Robert Webber
 
Posts: 1
Joined: Mon Oct 21, 2013 12:10 pm

Re: Workaround for scan popup functionality

Postby chulai » Fri Oct 25, 2013 12:43 pm

Robert Webber wrote:Yeah, it supports Internet Explorer 9, but not firefox 4+! What the hell? I have also tried in opera, chrome and safari. Works really well in all the browsers except Firefox! I think the developers are somewhat allergic to Firefox!

No, I personally like Firefox but it's not easy to implement scan popup feature in modern browsers. For more info read https://github.com/goldendict/goldendict/issues/29 and https://github.com/goldendict/goldendict/pull/26
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 45 guests