Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • July 24, 2016, 05:35:21 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: SuperClick  (Read 6539 times)

937o5

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
SuperClick
« on: September 29, 2009, 12:11:46 PM »
Allows you to hold down the Right Shift key and click with the mouse buttons to simulate multiple clicks, you can select how many clicks and the delay time with hotkeys as well, the script pretty much explains it when you run it and Right Click the tray icon, then click Commands.

Code: AutoIt [Select]
  1. #SingleInstance,Force
  2. Clicks = 2
  3. Delay = 50
  4. Gosub,TRAYMENU
  5.  
  6. RShift & Up::Clicks += 1
  7. RShift & Right::Clicks += 100
  8. RShift & Down::Clicks -= 1
  9. RShift & Left::Clicks -= 100
  10. RCtrl & Up::Delay += 1
  11. RCtrl & Right::Delay += 100
  12. RCtrl & Down::Delay -= 1
  13. RCtrl & Left::Delay -= 100
  14. RShift & Backspace::Clicks = 2
  15. RCtrl & Backspace::Delay = 50
  16. RShift::
  17. TrayTip, SuperClick, `Clicks: %Clicks%, 1,
  18. SetTimer, RemoveTrayTip, 2500
  19. RCtrl::
  20. TrayTip, SuperClick, `Delay: %Delay%ms, 1,
  21. SetTimer, RemoveTrayTip, 2500
  22. RShift & LButton::
  23. Loop, %Clicks%
  24. {
  25. Send, {Click, Left}
  26.     Sleep, %Delay%
  27. }
  28. RShift & RButton::
  29. Loop, %Clicks%
  30. {
  31. Send, {Click, Right}
  32.     Sleep, %Delay%
  33. }
  34. RShift & MButton::
  35. Loop, %Clicks%
  36. {
  37. Send, {Click, Middle}
  38.     Sleep, %Delay%
  39. }
  40. RShift & Esc::ExitApp
  41.  
  42. SETTINGS:
  43. Gui, Destroy
  44. Gui, Add, Text,, Clicks:
  45. Gui, Add, Edit, vClicks
  46. Gui, Add, Text,, Delay:
  47. Gui, Add, Edit, vDelay
  48. Gui, Add, Button, default, OK
  49. Gui, Show
  50.  
  51. ButtonOK:
  52. Gui, Submit
  53. TrayTip, SuperClick, `Clicks: %Clicks% `nDelay: %Delay%, 1,
  54. SetTimer, RemoveTrayTip, 2500
  55.  
  56. CONTROLS:
  57. MsgBox,, SuperClick Controls, RShift and Left/Right/Middle Click (SuperClick) `nTap RCtrl for Delay information. `nTap RShift for Clicks information. `nRShift and Down (-1 Clicks) `nRShift and Up (+1 Clicks) `nRShift and Left (-100 Clicks) `nRShift and Right (+100 Clicks) `nRShift and Backspace (2 Clicks) `nRCtrl and Down (-1ms Delay) `nRCtrl and Up (+1ms Delay) `nRCtrl and Left (-100ms Delay) `nRCtrl and Right (+100ms Delay) `nRCtrl and Backspace (50ms Delay) `nRShift and Esc (Exit)
  58.  
  59. TRAYMENU:
  60. Menu,Tray,NoStandard
  61. Menu,Tray,DeleteAll
  62. Menu,Tray,Add,Settings,SETTINGS
  63. Menu,Tray,Add,Controls,CONTROLS
  64. Menu,Tray,Add,Exit,EXIT
  65. Menu,Tray,Tip,SuperClick
  66.  
  67.  
  68. RemoveTrayTip:
  69. SetTimer, RemoveTrayTip, Off
  70.  
  71. ExitApp

I know noone requested this, but I figured that others might benefit from this in some way, it's my first script. =P

EDIT: Nevermind! I found an icon. :D

EDIT 2: Added support for right and middle mouse buttons!

EDIT 3: I think this'll be my final version.. Added a crude GUI and configured the tray tips, etc. Also got the Traytip timers working!

EDIT 4: Fixed delays not working, they're fine now. I had to completely change how the click sending is done, it's through a loop now. And the delay time now puts the clicks through a Sleep command for the amount of time speicified under Delay, repeating the loop depends on how many "Clicks" it's currently set to send, so 2 clicks = loop 1 time, 5 clicks = loop 4 times, etc.

EDIT 5: Tested Win+Click, all appeared to be well until I HELD DOWN the Windows key while I clicked, then it went spazzy.. So, for now. I changed Left Shift and Left Control to Right Shift and Right Control, since Left Shift and Left Control are more widely used due to Copying, Pasting, Cutting, etc. Suggestions are still welcome! I'm learning as I go, so, I'll try my best. =P

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,064
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: SuperClick
« Reply #1 on: September 29, 2009, 12:14:11 PM »
hey i can see how that would be useful  :up:

937o5

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: SuperClick
« Reply #2 on: September 29, 2009, 08:02:30 PM »
Updated! Final version I think. =P

Anyone got any ideas if I should add/edit anything?

937o5

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: SuperClick
« Reply #3 on: October 01, 2009, 08:57:29 AM »
I just realized.. The delay time isn't working right.. It won't set it more than once when the script runs... Do I need to set it via ini file and reload the script every time the delay time changes?..

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: SuperClick
« Reply #4 on: October 01, 2009, 09:10:35 AM »
I just realized.. The delay time isn't working right.. It won't set it more than once when the script runs... Do I need to set it via ini file and reload the script every time the delay time changes?..

Quote from: AutoHotKey
Every newly launched thread (such as a hotkey, custom menu item, or timed subroutine) starts off fresh with the default setting for this command. That default may be changed by using this command in the auto-execute section (top part of the script).

So you'll need to call this command each time the Delay changes.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,185
    • View Profile
    • Donate to Member
Re: SuperClick
« Reply #5 on: October 01, 2009, 09:23:21 AM »
wow, thanks 937o5 :)

it's something I've needed without having ever thought of it (for windows at any rate). I'm a hater of the double-click, mainly due to shoulder problems in my mouse arm.

1) is that code an AHK script? - yes, just tried it!
2) and just in case: you mention a possible ini file - could you make sure it has a distinctive name (cause it will be in my AHK scripts folder where there is already an unidentified "Settings.ini" file)
3) and eh . . dumb question time ;) - why would one want a delay?
Tom

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: SuperClick
« Reply #6 on: October 01, 2009, 09:29:38 AM »
why would one want a delay?

Some programmes don't react well when they receive input too fast (did I recently read a post about FARR misbehaving because of fast typing??).

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,185
    • View Profile
    • Donate to Member
Re: SuperClick
« Reply #7 on: October 01, 2009, 02:04:28 PM »
there's a problem with using shift + click - [edit] I forgot to say I've set it at double click with delay left empty [edit]
FF & Opera both use shift+click to open links in new tabs (or is it FF with TabMixPlus ?)
I havent tried Opera today but FF is acting up a bit now when I use shift+click - link opens in a new window instead of in a new tab and occasionally I get a pop-up notice from the system tray

that would make a problem with control key as well, maybe Alt or Windows might be better default keys?

It also occurred to me that using shift+click to open files (=double click) could be problematic in file manager  when trying to select many files and using shift as qualifier key (is that the right term - select a file, press shift key and select file down the list)

[see edit above]
Tom
« Last Edit: October 01, 2009, 02:21:45 PM by tomos »

937o5

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: SuperClick
« Reply #8 on: October 01, 2009, 05:01:26 PM »
There was a problem with the delay time that I was fixing, and now it works just fine with them. I never thought of the Shift+Click messing anything up, it used to be Alt+Click before I put it on here, but in things like MSN, Alt makes it act up a bit... I'm thinking Win+Click might be the best solution... I'm renewing the script/exe that are posted here, so if you've gotten them already, I'd recommend deleting the old copies, and getting the current posted code/exe. Back to testing for now, going to see how that Win+Click works out...

937o5

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: SuperClick
« Reply #9 on: October 01, 2009, 05:17:19 PM »
Updated info/script/exe. Read top post for details.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,185
    • View Profile
    • Donate to Member
Re: SuperClick
« Reply #10 on: October 02, 2009, 04:16:36 AM »
with the script I get this message on start
---------------------------
SuperClickRight.AHK
---------------------------
Error: Target label does not exist.  The current thread will exit.

Specifically: EXIT

   Line#
   062: Return
   065: MsgBox,,SuperClick Controls,RShift and Left/Right/Middle Click (SuperClick)
Tap RCtrl for Delay information.
Tap RShift for Clicks information.
RShift and Down (-1 Clicks)
RShift and Up (+1 Clicks)
RShift and Left (-100 Clicks)
RShift and Right (+100 Clicks)
RShift and Backspace (2 Clicks)
RCtrl and Down (-1ms Delay)
RCtrl and Up (+1ms Delay)
RCtrl and Left (-100ms Delay)
RCtrl and Right (+100ms Delay)
RCtrl and Backspace (50ms Delay)
RShift and Esc (Exit)
   066: Return
   069: Menu,Tray,NoStandard
   070: Menu,Tray,DeleteAll
   071: Menu,Tray,Add,Settings,SETTINGS
   072: Menu,Tray,Add,Controls,CONTROLS
--->   073: Menu,Tray,Add,E&xit,EXIT
   074: Menu,Tray,Tip,SuperClick
   075: Return
   079: SetTimer,RemoveTrayTip,Off
   080: TrayTip
   081: Return
   081: Exit
   082: Exit

---------------------------
OK  
---------------------------
it shows in the systray but there is no option (on right clcik) to exit

~~~~~~~~~~~~~~~~~~~~~~

The exe works but I'm confused - it works with left Shift - maybe you forgot to change the exe?

edit/ corrected last sentence (Left Shift instead of Left click)
Tom
« Last Edit: October 02, 2009, 04:29:59 AM by tomos »

937o5

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: SuperClick
« Reply #11 on: October 02, 2009, 05:22:48 AM »
Oh wow, sorry. The script I had up accidentally had the bottom cut off, fixed that. I also re-uploaded the new SuperClick EXE, so it's using Right Shift now, too.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,185
    • View Profile
    • Donate to Member
Re: SuperClick
« Reply #12 on: October 06, 2009, 07:17:32 AM »
Oh wow, sorry. The script I had up accidentally had the bottom cut off, fixed that. I also re-uploaded the new SuperClick EXE, so it's using Right Shift now, too.

thanks :)  :Thmbsup:
Tom