topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday April 18, 2024, 3:36 am
  • Proudly celebrating 15+ 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: AHK: ClickControl with a spinner / updown buttons  (Read 4974 times)

Ampa

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
  • I am cute ;)
    • View Profile
    • MonkeyDash - 2 Player strategy boardgame
    • Donate to Member
AHK: ClickControl with a spinner / updown buttons
« on: January 07, 2008, 06:30 AM »
I found an AHK script HERE which toggles the active screen when using a Wacom tablet in a dual screen setup.

I am new to AHK but the script looks very basic, and I would like to improve and extend it to better serve my needs. In the first instance I am trying to replace the MouseClick commands with ControlClick which seems to respond quicker(?)

One of the controls that I need to 'click' is an updown toggle.

Wacom.png

I have tried the following...

ControlClick, msctls_updown321

and...

ControlSend, msctls_updown321, Up

but neither work (change the value in the edit box).

What am I doing wrong?

Thanks for any help / advice, Ampa.

;Wacom Helper
;by Ampa, from an original script by finchie.
!^Left::
Run C:\WINDOWS\system32\pentablet.cpl
blockinput mouse
WinWait, Pen Tablet,
IfWinNotActive, Pen Tablet, , WinActivate, Pen Tablet,
ControlClick, Button12
KeyWait Space, D
WinWait, Pen Mode Details,
ControlSend, msctls_updown321, Up
KeyWait Space, D
ControlClick, Button14
IfWinNotActive, Pen Tablet, , WinActivate, Pen Tablet,
WinClose, Pen Tablet
blockinput off
return

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: AHK: ClickControl with a spinner / updown buttons
« Reply #1 on: January 07, 2008, 07:00 AM »
I think that controlsend is sending "up" literally (an 'u' and a 'p'). Replace it with {up}, to send the arrow up and it should solve the problem.
For more info, check here.

Ampa

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
  • I am cute ;)
    • View Profile
    • MonkeyDash - 2 Player strategy boardgame
    • Donate to Member
Re: AHK: ClickControl with a spinner / updown buttons
« Reply #2 on: January 07, 2008, 10:21 AM »
Ah-ha! Yes that little tip pointed me in the right direction...

Ended up targeting the editbox rather than the spinner and sending {Up} (seems to be case sensitive).

ControlSend, Edit1, {Up}

Thanks for your help.

I shall expend on my little Wacom Helper and upload to share with others when I am done.