DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: SuperClick  (Read 18,655 times)

937o5

  • Participant
  • Joined in 2009
  • *
  • Posts: 14
SuperClick
« on: September 29, 2009, 05:11 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)
#SingleInstance,Force
Clicks = 2
Delay = 50
Gosub,TRAYMENU
return

RShift & Up::Clicks += 1
RShift & Right::Clicks += 100
RShift & Down::Clicks -= 1
RShift & Left::Clicks -= 100
RCtrl & Up::Delay += 1
RCtrl & Right::Delay += 100
RCtrl & Down::Delay -= 1
RCtrl & Left::Delay -= 100
RShift & Backspace::Clicks = 2
RCtrl & Backspace::Delay = 50
RShift::
TrayTip, SuperClick, `Clicks: %Clicks%, 1,
SetTimer, RemoveTrayTip, 2500
return
RCtrl::
TrayTip, SuperClick, `Delay: %Delay%ms, 1,
SetTimer, RemoveTrayTip, 2500
return
RShift & LButton::
Loop, %Clicks%
{
Send, {Click, Left}
    Sleep, %Delay%
}
return
RShift & RButton::
Loop, %Clicks%
{
Send, {Click, Right}
    Sleep, %Delay%
}
return
RShift & MButton::
Loop, %Clicks%
{
Send, {Click, Middle}
    Sleep, %Delay%
}
return
RShift & Esc::ExitApp

SETTINGS:
Gui, Destroy
Gui, Add, Text,, Clicks:
Gui, Add, Edit, vClicks
Gui, Add, Text,, Delay:
Gui, Add, Edit, vDelay
Gui, Add, Button, default, OK
Gui, Show
return

ButtonOK:
Gui, Submit
TrayTip, SuperClick, `Clicks: %Clicks% `nDelay: %Delay%, 1,
SetTimer, RemoveTrayTip, 2500
return

CONTROLS:
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)
return

TRAYMENU:
Menu,Tray,NoStandard 
Menu,Tray,DeleteAll 
Menu,Tray,Add,Settings,SETTINGS
Menu,Tray,Add,Controls,CONTROLS
Menu,Tray,Add,Exit,EXIT
Menu,Tray,Tip,SuperClick
return


RemoveTrayTip:
SetTimer, RemoveTrayTip, Off
TrayTip
return

EXIT:
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: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: SuperClick
« Reply #1 on: September 29, 2009, 05:14 PM »
hey i can see how that would be useful  :up:

937o5

  • Participant
  • Joined in 2009
  • *
  • Posts: 14
Re: SuperClick
« Reply #2 on: September 30, 2009, 01:02 AM »
Updated! Final version I think. =P

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

937o5

  • Participant
  • Joined in 2009
  • *
  • Posts: 14
Re: SuperClick
« Reply #3 on: October 01, 2009, 01:57 PM »
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
    • Participated in NANY Challenge Three Times
    • Plugin Coding Medal
Re: SuperClick
« Reply #4 on: October 01, 2009, 02:10 PM »
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: 11,970
    • Gathering Badge
    • Participated in NANY Challenge Once
Re: SuperClick
« Reply #5 on: October 01, 2009, 02:23 PM »
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
    • Participated in NANY Challenge Three Times
    • Plugin Coding Medal
Re: SuperClick
« Reply #6 on: October 01, 2009, 02:29 PM »
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: 11,970
    • Gathering Badge
    • Participated in NANY Challenge Once
Re: SuperClick
« Reply #7 on: October 01, 2009, 07:04 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, 07:21 PM by tomos »

937o5

  • Participant
  • Joined in 2009
  • *
  • Posts: 14
Re: SuperClick
« Reply #8 on: October 01, 2009, 10:01 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
  • *
  • Posts: 14
Re: SuperClick
« Reply #9 on: October 01, 2009, 10:17 PM »
Updated info/script/exe. Read top post for details.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,970
    • Gathering Badge
    • Participated in NANY Challenge Once
Re: SuperClick
« Reply #10 on: October 02, 2009, 09:16 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, 09:29 AM by tomos »

937o5

  • Participant
  • Joined in 2009
  • *
  • Posts: 14
Re: SuperClick
« Reply #11 on: October 02, 2009, 10:22 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: 11,970
    • Gathering Badge
    • Participated in NANY Challenge Once
Re: SuperClick
« Reply #12 on: October 06, 2009, 12:17 PM »
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

Original address: https://www.donationcoder.com/forum/index.php?topic=20112.0