AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mouse scroll script won't integrate into 'Master' script

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
geor



Joined: 16 Jun 2008
Posts: 66

PostPosted: Sun Feb 01, 2009 1:17 pm    Post subject: Mouse scroll script won't integrate into 'Master' script Reply with quote

In searching the forum for mouse - controlled scrolling scripts,
I found this one that gets focus & scrolls the window under the pointer -
at least it works for Windows Explorer, & many websites under IE7
that have a scroll-able frame/window on the Left, usually.

I love not having to click, to establish focus when alternating between
the windows pane & the explorer folder tree on the Left.

Code:
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;   Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

CoordMode Mouse, Screen

WheelTime  = 500
WheelDelta:= 120 << 16
WheelMax  := 4 * WheelDelta

WheelUp::
   Critical
   If (A_ThisHotKey <> A_PriorHotKey OR A_TimeSincePriorHotkey > WheelTime)
        WCnt = %WheelDelta%
   Else If (WCnt < WheelMax)
        WCnt+=  WheelDelta
   MouseGetPos m_x, m_y
   hw_m_target := DllCall("WindowFromPoint", "int",m_x, "int",m_y)
   SendMessage 0x20A, WCnt, (m_y<<16)|m_x,,ahk_id %hw_m_target% ; WM_MOUSEWHEEL
return

WheelDown::
   Critical
   If (A_ThisHotKey <> A_PriorHotKey OR A_TimeSincePriorHotkey > WheelTime)
        WCnt = %WheelDelta%
   Else If (WCnt < WheelMax)
        WCnt+=  WheelDelta
   MouseGetPos m_x, m_y
   hw_m_target := DllCall("WindowFromPoint", "int",m_x, "int",m_y)
   SendMessage 0x20A,-WCnt, (m_y<<16)|m_x,,ahk_id %hw_m_target% ; WM_MOUSEWHEEL
return


However, I would like to add this to my 'Master' script of hotkeys, etc,
that runs @ system startup, & also 'runs' continuously.

Because that seems to save several MB of memory to have it running
in an already-running process, vs. having a 2nd script running.

Any comments or feedback on this observation ?

The problem is that when I add it to my 'Master' script,
it doesn't work - can someone help me understand why?

I recompiled the 'Master' after adding the code,
& it doesn't seem to matter where I add it - top or bottom.

But it runs fine by clicking on it,
then I have 2 scripts running in the system tray.

This isn't even a very big deal,
but I want to understand the PRINCIPLE of it -
because my goal is to eventually be able to write AHK commands
& replace several of the utilities w/ 1 script,
thus saving 25 MB or so RAM,
and being able to port the script to other machines
& eventually (hopefully) Windows 7.

Thank you for your help.
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 2428

PostPosted: Sun Feb 01, 2009 5:40 pm    Post subject: Reply with quote

Would you mind posting your master script? If you are willing to post it would you mind commenting in the script what insertion points you've already tried?
_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message
geor



Joined: 16 Jun 2008
Posts: 66

PostPosted: Sun Feb 01, 2009 7:37 pm    Post subject: Reply with quote

sinkfaze wrote:
Would you mind posting your master script? If you are willing to post it would you mind commenting in the script what insertion points you've already tried?


I'd be happy to, sorry I didn't to begin with !
I simply tried after the beginning comments,
as well as at the very end.

It's pretty loooong, as I'm beginner and like to comment
on everything so I can remember who's who!

But, it's all hotkeys & mouse stuff, that's it.

would love to add more as I can understand more.

Thank you for your interest/response Very Happy

Code:
#NoEnv 
; Recommended for performance and compatibility with future AutoHotkey releases.

SendMode Input 
; Recommended for new scripts due to its superior speed and reliability.

SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


;   *******************************************************************************


;   The default < AutoHotKey.ahk > file is created in %My Documents% , wherever that path is located.
;   When  C:\Program Files\AutoHotkey\AutoHotkey.exe  is executed, it calls the file from  %My Documents%

;   So just overwrite the < AutoHotKey.ahk > file in  %My Documents%  with the archived/saved .ahk file -
;      currently @ D:\_z biology\____Admin_Backup\Reg Backups for Program Settings

;   Conversely, save any changes to  %My Documents%\AutoHotKey.ahk to the archived copy in 
;               D:\_z biology\____Admin_Backup\Reg Backups for Program Settings
 
 

;   *****************************************************************************



;   to Edit AutoHotKey --->      #/   =   Win_/


;     The following code causes this main Startup AHK file to auto-reload when it's saved by Ctrl+S !



SetTimer, ReloadScriptIfChanged, 500

ReloadScriptIfChanged:
{
  FileGetAttrib, FileAttribs, %A_ScriptFullPath%
  IfInString, FileAttribs, A
  {
    FileSetAttrib, -A, %A_ScriptFullPath%
    TrayTip, Reloading Script..., %A_ScriptName%, , 1
    Sleep, 500
    Reload
    TrayTip
  }
  Return
}

;   *******************************************************************************



;    Hotkeys are generally listed either in alphabetical or numerical order,
;       OR as they occur on the keyboard from L - R / Bottom to Top.
;
; Win   # keys are first, followed by their combinations with other hotkeys.
; Alt   ! keys are next,     "         "      "
; Ctrl  ^ keys are next,     "         "      "
; Shift + keys are next,     "         "      "


;   *******************************************************************************


;   using "KeyTweak" program ---> remap these keys 1st !!! :

;            F1          > L Win 
;            CapsLock    > Backspace
;            Scroll Lock       > Capslock
;            Keypad 0/Ins   > Delete  (quicker than searching for a small Delete button)
                     
;   on Toshiba laptop,    Up arrow    > Right Shift
;            Keypad 1/End   > Up arrow (to re-enable *Volume Up* hotkey)
;            Right Context   > Right Win


;         Nero   (n*E*ro)      #E      Win_E
;         Revo Uninstaller      !R      Alt_R  ( keeps Win_R = *Run* box)
;         Alcohol 120         ^!A      Ctrl_Alt_A      
;         WinRAR            ^!W      Ctrl_Alt_W

;         Icon Extractor         #1      Win_1
;         Icons Folder   D:\Icons   ^1      Alt_1

;         (ultra) *I*so         #I      Win_I  (because Win_U = Utilities)
;         URL Helper         !U      Alt_U

;   Icons      D:\Icons         !1      Alt_1
;   My Documents   D:\__Documents         !D      Alt_D
;   My Music   D:\__Documents\My Music      #M      Win_\
;   Recent Documents       *History*      #H      Win_H


;   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^







;   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  Standby - Shutdown - Reboot  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



;   (F1 remapped = Left Win key, so that's combined w/  F2  F3  F4 for these commands:)



#F2::   DllCall("PowrProf\SetSuspendState", "int", 0, "int", 1, "int", 1)
return
;         **** System Standby  F1_F2 ****

#F3::   Shutdown, 13
return
;         **** System Shutdown - Turn off (forced)  F1_F3 ****

#F4::   Shutdown, 6
return
;         **** System Reboot - Restart  F1_F4 ****





;   ^^^^^^^^^^^^^^^^^^ Volume Controls - simple, no OSD (on-screen display) ^^^^^^^^^^^^^^^^^^


#Left::   Send {Volume_Mute}
return

#Up::   Send {Volume_Up 1}
return

#Down::   Send {Volume_Down 1}
return



;   ****************     Ergonomically great Placeholders remaining     ***************

;      Note: use accelerator keys ! # ^ + with mouse Lbutton/Rbutton - gives 8 more easy-to-reach commands!!
;         but be sure they don't conflict with "StrokeIt" programming

; Windows # key Placeholders remaining :

;   by alpha    K  Y

;   #2 - 0      except #6 (RapidUp)
;   #F5 - F11 
;   #!V


; Alt ! key Placeholders remaining :

;   by row     M   

;   by Alpha   M   






;   *************************************************************************************************
;   ***************************              Windows  #  key            *****************************
;   *************************************************************************************************




;            *************    Acrobat 9 Pro    *************


#A::   Run C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe, ,max
return

;         **** These next 2 activate Line & Box drawing commands in Acrobat 9 ****

#IfWinActive, ahk_class AcrobatSDIWindow

F5::Send !tcl,       ; Activates Line Drawing tool
return

F6::Send !tcr,       ; Activates Box  Drawing tool
return

F11::Send ^w      ; Closes Active Document
return

#IfWinActive

;            *************  end Acrobat 9 Pro   *************



#B::   Run ::{20d04fe0-3aea-1069-a2d8-08002b30309d}, ,max
return
;         **** Windows Explorer w/ Quizo Tab & Address Bars ****


#C::   Run C:\Documents and Settings\Administrator\Start Menu\Programs\Administrative Tools\MY.msc, ,max
return
;         **** Microsoft Management Console - customized ****


;#D          = leave system default setting as Show Desktop (minimizes *ALL* windows) ****
;C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\Show ;Desktop.scf


#E::   Run C:\Program Files\Nero\Nero Core\nero.exe, ,max
return
;         **** n*E*ro  Nero ****         


#F::   Run C:\$XPT\x-file.exe
return
;         **** X-File by Rick Downes' XPT ****


#G::   Run C:\Program Files\GSpot270a_Portable\GSpot.exe
return
;         **** GSpot ****


#H::   Run C:\Documents and Settings\Administrator\Recent, ,max
return
;         **** Recent Documents ( H = History ;) ****


#I::   Run, C:\Program Files\UltraISO\UltraISO.exe, ,max
return
;         **** ultra *I* SO  UltraISO ****


#J::   Run C:\Program Files\jv16 PowerTools 2008\jv16PT.exe
return
;         **** jv16 PowerTools Registry Editor ****


;#K         placeholder
         


;#L          = ! FORBIDDEN ! - SYSTEM " LOCKS " the machine


;#M::   WinMinimize, A   see above **** minimizes *A* Active window only !!  (#D = Show Desktop, it minimizes all) ****
           
      

#N::   Run C:\WINDOWS\NOTEPAD.EXE
return
;         **** Notepad ****


#O::   Run C:\Program Files\Opera\opera.exe, ,max
return
;         **** Opera 9.6 ****


#P:: ; do screen print and paste to MS Paint
  Send, !{PRINTSCREEN}
  Run mspaint
  WinWait, untitled - Paint,
  IfWinNotActive, untitled - Paint, , WinActivate, untitled - Paint,
  WinWaitActive, untitled - Paint,
  Send, {SHIFTDOWN}{INS}{SHIFTUP}{ENTER}
return


#Q::   Run C:\Program Files\QuickTime\QuickTimePlayer.exe
return
;         **** QuickTime Pro ****


;#R          = system default  Run box
;      **** Run Box ****
;    although Sean's script can be set to hotkey >
; DllCall(DllCall("GetProcAddress", "Uint", DllCall("GetModuleHandle", "str", "shell32"), "Uint", 61), "Uint", 0, ;"Uint",
; 0, "Uint", 0, "Uint", 0, "Uint", 0, "Uint", 0)


#S::   Run C:\Program Files\Snagit 9\Snagit32.exe, ,min
return
;         **** SnagIt 9 ****


#T::   Run C:\Program Files\TweakUI.exe
return
;         **** TweakUI ****


;#U          = ! FORBIDDEN ! - SYSTEM UTILITIES for accessability/disabled


#V::   Run C:\Program Files\Pegtop\PStart\PStart.exe
return         
;         **** Pegtop ****



#W::   Run C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE, ,max
return
;         **** Microsoft Word ****


#X::   Run C:\Program Files\xplorer2\xplorer2_UC.exe, ,max
return
;         **** xplorer2 ****



;#Y          placeholder




;      *******      IE7   & context Home=9 / New Tab=F10 / Close Tab=F11   ***********


#Z::   Run C:\Program Files\Internet Explorer\IEXPLORE.EXE, ,max
return
;         **** IE7 ****

#IfWinActive, ahk_class IEFrame
F9::Send !{Home}   ; Home Page
F10::Send ^t      ; New Tab
F11::Send ^w      ; Close Tab
return
#IfWinActive

;      **************************          end IE7          **************************




#space::   Run C:\WINDOWS\regedit.exe, ,max
return
;         **** RegEdit ****



;    ^^^^^^^^^    The following make the Win key usable as an accelerator in xplorer2 :     ^^^^^^^^^^^

;            note: program these into *StrokeIt* commands !!

;#IfWinActive ahk_class ATL:ExplorerFrame

; WM_COMMAND: New Tab
 
;#,::SendMessage 0x0111, 33036, 0
;               #, = xplorer2  *New Tab*

; WM_COMMAND: Close Tab

;#.::SendMessage 0x0111, 33043, 0
;               #. = xplorer2  *Close Tab*

; not this example
; WM_COMMAND: Copy Names
;#.::SendMessage 0x0111, 32786, 0

;#IfWinActive





;   *******************************************************************************


#/::Edit, ,max
return
;      **** Auto-opens this AutoHotKey.ahk script to be Edited !!! ****


#;::   Run C:\Program Files\CHM To PDF Converter Pro\CHM To PDF Converter PRO.exe, ,max
return
;         **** CHM to PDF Converter Pro ****
         
#'::   Run C:\Program Files\PDF Password Remover 3.0_Portable .exe
return
;         **** PDF Password ****         


#Enter::   FileRecycleEmpty
return
;         **** Recycle Bin Empty - no prompts ****


#Tab::   Run C:\WINDOWS\system32\Restore\rstrui.exe
return
;         ****  System Restore  ****         
         


#[::   Run C:\Program Files\Media_Player_Classic_Homeinema_x86_v1.2.908.0\Home_Cinema_mplayerc.exe
return
;         **** Media Player Classic Home Theatre Edition ****

#]::   Run C:\Program Files\Windows Media Player\wmplayer.exe /Task NowPlaying, ,max
return
;         **** Windows Media Player - opens @ "Now Playing" tab ****
   

;#\::   Run G:\My Music, ,max
;return         
;         **** My Music Folder ****




#`::   Run C:\WINDOWS\system32\charmap.exe
return
;         **** Character Map ****         

 
#1::   Run C:\Program Files\Icons from File\extraico.exe, ,max
return
;         **** Icon Extractor ****
      


;#2 - 5, 7 - 0     placeholders



#6::   Run C:\Program Files\RapidUploader_Portable\RapidUploader.exe
return   
;         **** RapidUploader ****


#-::   Run C:\WINDOWS\system32\calc.exe
return
;         **** Calculator ****
 

#=::   Run C:\Program Files\Convert.exe
return
;         **** Converter ****



;        ******************************         Win + Alt     #!       *************************


#!space:: Run C:\Program Files\Process_Explorer_v11.32.exe, ,max
return
;         **** Sysinternals Process Explorer ****


;#!Z::         placeholder

;#!X         placeholder

#!C::     Run C:\WINDOWS\system32\control.exe, ,max
return
;         **** Windows Control Panel ****         

;#!V         placeholder
 




;   *************************************************************************************************
;   ***************************                Alt  !  key              *****************************
;   *************************************************************************************************




;   (Alt +)   to avoid!, by alpha :    A B E F H I O T V W
           
;   (Alt +)   to avoid!, by bottom to top row :     V  B
 
;                          A  F  H

;                     W  E  T  I  O


;   Allowed for Alt key, by alpha :    C  D  G  J  K  L  M  N  P  Q  R  S  U  X  Y  Z

;   Allowed for Alt key, by bottom to top row :   X  C  N  M  ,  .  /

;                     S  D  G  J  K  L  ;  ' 

;                     Q  R  U  Y  P  [  ]  \
                     
;                     `  1 <-> 0  -  =  ;

;                     F2 <-> F11   
   

;         **************************************************************************
            

;      **** "Paint" Context-sensitive ... F5 = 'Attributes' ; F6 = 'Tool Box'   ****
;         refer to Jaco's explanation of the numbers as found by "Winspector"

!Space::   
Run, mspaint,,max
WinWait, ahk_class MSPaintApp
PostMessage,0x111,620,,,ahk_class MSPaintApp
return


#IfWinActive, ahk_class MSPaintApp
F5::Send, ^e
F6::Send, ^t
#IfWinActive

;      ***********************        end Paint        *************************


 

;!A avoid!      = F'a'vorites on the menu bar in many apps


;!B avoid!      -- NO !! this is Bookmarks in Opera !!!
      

!C::   Run C:\WINDOWS\system32\cmd.exe
return
;         **** CMD line ****


!D::   Run D:\_Documents, ,max
return
;         **** __My Documents ****


;!E avoid!      = M'e'nu  on the menu bar in many apps

;!F avoid!      = 'F'ile on the menu bar in many apps
      


!G::   Run C:\Program Files\GSpot270a_Portable\GSpot.exe,
return
;         **** G-Spot Codec Info ****




;!H avoid!      = 'H'elp on the menu bar in many apps

;!I avoid!      = 'I'nsert  in MS Word


;!J         placeholder

;!K         placeholder

;!L         placeholder


;!M taken      Quizo TabBar Menu Show-Hide


!N::   Run C:\Program Files\NoteTab Pro 5\NotePro.exe
return      
;         **** NoteTab Pro 5 ****



;!O avoid!      = F'o'rmat in MS Word & notepad apps


;!P         placeholder

;!Q         placeholder


!R::   Run C:\Program Files\Revo Uninstaller\revouninstaller.exe, ,max
return
;         **** Revo Uninstaller ****/


!S::   Run C:\WINDOWS\system32\Startup.cpl, ,max     
return         


;!T avoid!      = 'T'ools  on the menu bar in many apps   


!U::   Run C:\Program Files\URLHelper\URLHelper.exe
return
;         ****   URLHelper   ****/



;!V avoid!      = 'V'iew   on the menu bar in many apps

;!W avoid!      = 'W'indow on the menu bar in many apps


!X::   Run C:\Program Files\xplorer2\x2SettingsEditor.exe, ,max
return
;         **** xplorer2 Settings Editor ****   
      

;!Y         placeholder

!Z::   Run C:\Program Files\Internet Download Manager\IDMan.exe, ,max
return
;         **** Internet Download Manager ****




;!,         placeholder

;!.         placeholder




;!;         placeholder

;!'         placeholder

;![         placeholder

;!]         placeholder

;!\         placeholder

;!`         placeholder



!1::   Run D:\Icons, ,max
return
;         **** D:\Icons Folder ****/         



;!2         placeholder

;!3         placeholder

;!4         placeholder

;!5         placeholder

;!6         placeholder

;!7         placeholder

;!8         placeholder

;!9         placeholder

;!0         placeholder

;!-         placeholder

;!=         placeholder



;!F2         placeholder

;!F3         placeholder

;!F4         placeholder

;!F5         placeholder

;!F6         placeholder

;!F7         placeholder

;!F8         placeholder

;!F9         placeholder

;!F10         placeholder

;!F11         placeholder






;   *************************************************************************************************
;   ***************************                Ctrl  ^  key              ****************************
;   *************************************************************************************************


;      *** !!avoid! Ctrl + Letter combos!! .....  Ctrl + symbols or numbers are ok!! *** 


;      SUMMARY FOR Ctrl key :  ,  .  /  ;  '  Enter  [  ]  \  `  1 <-> 0  -  =  F2 <-> F11


;^Space     taken   Ctrl + Space = HomePage in Opera


;^,         placeholder
;^.         placeholder
;^/         placeholder



;^;         placeholder
;^'         placeholder


;^[         placeholder
;^]         placeholder
;^\         placeholder


;^`         placeholder


;^1-0         placeholder





;       *******************              Ctrl + Win    ^#        **********************************************


;^#Space      placeholder



;^#C::         placeholder



^#A::   Run C:\Program Files\Aida32_v3.93_+guide\aida32.exe, ,max
return
;         **** AIDA32 ****/


;^#S::         placeholder


;^#X::         placeholder




;   *******************             Ctrl + Alt   ^!          ******************************


;^!space         placeholder   


^!A::   Run C:\Program Files\Alcohol 120\Alcohol.exe, ,max
return
;         **** Alcohol 120 ****/


^!W::   Run C:\Program Files\WinRAR\WinRAR.exe
return
;         **** WinRar ****




;   *******************             Ctrl + Shift    ^+        *****************************

;^+A      SnagIT
;^+S      SnagIT
;^+D      SnagIT
;^+F      SnagIT





;   ***************************************************************************************
;     *****************              Shift  +  key               ****************************
;   ***************************************************************************************



 
;      **** Atlantis Word Processor ****/

+#A::   Run C:\Program Files\Atlantis\Atlantis.exe, ,max
return


;+#S         placeholder

;+#D         placeholder


;   This will run the 3 main progs I always call @ Startup

;+#Q::
;Run C:\Program Files\SnagIt 8\SnagIt32.exe, ,min
;Run C:\Program Files\Internet Explorer\IEXPLORE.EXE, ,max
;Run ::{20d04fe0-3aea-1069-a2d8-08002b30309d}, ,max
;return


;+#W         placeholder

;+#E         placeholder
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 2428

PostPosted: Sun Feb 01, 2009 8:40 pm    Post subject: Reply with quote

I probably didn't put it into your script in the most optimal fashion but I just copied and pasted the relevant portion into your main script and it worked fine. Here's how I did it:

Code:
#NoEnv
; Recommended for performance and compatibility with future AutoHotkey releases.

SendMode Input
; Recommended for new scripts due to its superior speed and reliability.

SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


;   *******************************************************************************


;   The default < AutoHotKey.ahk > file is created in %My Documents% , wherever that path is located.
;   When  C:\Program Files\AutoHotkey\AutoHotkey.exe  is executed, it calls the file from  %My Documents%

;   So just overwrite the < AutoHotKey.ahk > file in  %My Documents%  with the archived/saved .ahk file -
;      currently @ D:\_z biology\____Admin_Backup\Reg Backups for Program Settings

;   Conversely, save any changes to  %My Documents%\AutoHotKey.ahk to the archived copy in
;               D:\_z biology\____Admin_Backup\Reg Backups for Program Settings
 
 

;   *****************************************************************************



;   to Edit AutoHotKey --->      #/   =   Win_/


;     The following code causes this main Startup AHK file to auto-reload when it's saved by Ctrl+S !



SetTimer, ReloadScriptIfChanged, 500

ReloadScriptIfChanged:
{
  FileGetAttrib, FileAttribs, %A_ScriptFullPath%
  IfInString, FileAttribs, A
  {
    FileSetAttrib, -A, %A_ScriptFullPath%
    TrayTip, Reloading Script..., %A_ScriptName%, , 1
    Sleep, 500
    Reload
    TrayTip
  }
  Return
}

;   *******************************************************************************



;    Hotkeys are generally listed either in alphabetical or numerical order,
;       OR as they occur on the keyboard from L - R / Bottom to Top.
;
; Win   # keys are first, followed by their combinations with other hotkeys.
; Alt   ! keys are next,     "         "      "
; Ctrl  ^ keys are next,     "         "      "
; Shift + keys are next,     "         "      "


;   *******************************************************************************


;   using "KeyTweak" program ---> remap these keys 1st !!! :

;            F1          > L Win
;            CapsLock    > Backspace
;            Scroll Lock       > Capslock
;            Keypad 0/Ins   > Delete  (quicker than searching for a small Delete button)
                     
;   on Toshiba laptop,    Up arrow    > Right Shift
;            Keypad 1/End   > Up arrow (to re-enable *Volume Up* hotkey)
;            Right Context   > Right Win


;         Nero   (n*E*ro)      #E      Win_E
;         Revo Uninstaller      !R      Alt_R  ( keeps Win_R = *Run* box)
;         Alcohol 120         ^!A      Ctrl_Alt_A     
;         WinRAR            ^!W      Ctrl_Alt_W

;         Icon Extractor         #1      Win_1
;         Icons Folder   D:\Icons   ^1      Alt_1

;         (ultra) *I*so         #I      Win_I  (because Win_U = Utilities)
;         URL Helper         !U      Alt_U

;   Icons      D:\Icons         !1      Alt_1
;   My Documents   D:\__Documents         !D      Alt_D
;   My Music   D:\__Documents\My Music      #M      Win_\
;   Recent Documents       *History*      #H      Win_H


;   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^







;   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  Standby - Shutdown - Reboot  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



;   (F1 remapped = Left Win key, so that's combined w/  F2  F3  F4 for these commands:)



#F2::   DllCall("PowrProf\SetSuspendState", "int", 0, "int", 1, "int", 1)
return
;         **** System Standby  F1_F2 ****

#F3::   Shutdown, 13
return
;         **** System Shutdown - Turn off (forced)  F1_F3 ****

#F4::   Shutdown, 6
return
;         **** System Reboot - Restart  F1_F4 ****





;   ^^^^^^^^^^^^^^^^^^ Volume Controls - simple, no OSD (on-screen display) ^^^^^^^^^^^^^^^^^^


#Left::   Send {Volume_Mute}
return

#Up::   Send {Volume_Up 1}
return

#Down::   Send {Volume_Down 1}
return

WheelTime  = 500
WheelDelta:= 120 << 16
WheelMax  := 4 * WheelDelta

WheelUp::
   Critical
   If (A_ThisHotKey <> A_PriorHotKey OR A_TimeSincePriorHotkey > WheelTime)
        WCnt = %WheelDelta%
   Else If (WCnt < WheelMax)
        WCnt+=  WheelDelta
   MouseGetPos m_x, m_y
   hw_m_target := DllCall("WindowFromPoint", "int",m_x, "int",m_y)
   SendMessage 0x20A, WCnt, (m_y<<16)|m_x,,ahk_id %hw_m_target% ; WM_MOUSEWHEEL
return

WheelDown::
   Critical
   If (A_ThisHotKey <> A_PriorHotKey OR A_TimeSincePriorHotkey > WheelTime)
        WCnt = %WheelDelta%
   Else If (WCnt < WheelMax)
        WCnt+=  WheelDelta
   MouseGetPos m_x, m_y
   hw_m_target := DllCall("WindowFromPoint", "int",m_x, "int",m_y)
   SendMessage 0x20A,-WCnt, (m_y<<16)|m_x,,ahk_id %hw_m_target%
; WM_MOUSEWHEEL
return

;   ****************     Ergonomically great Placeholders remaining     ***************


Tested in IE, Firefox, Opera, Windows Explorer and Chatzilla.
_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message
geor



Joined: 16 Jun 2008
Posts: 66

PostPosted: Sun Feb 01, 2009 10:41 pm    Post subject: Reply with quote

I'm sorry, this still doesn't work for me -
and I even tried to run the abbreviated script you posted,
since it cuts out nearly all my hotkeys -
don't know if you meant to,
or just cut the script off after the insertion of the relevant code?

I have StrokeIt installed/running - would this be interfering?
but I can't find anywhere that I call on "WheelUp" or "WheelDown"
as a command or gesture.

Appreciate the help ~

********

more clues ? ...... when I paste the script into my Master & reload,
I IMMEDIATELY lose the ability to wheel scroll in the Master script as it runs in Notepad to be edited, as well as in any other app.

Upon deleting that script from the Master & reloading, I IMMEDIATELY regain wheel scroll functionality everwhere.

But as I said before, if I run that script separately,
the 2 scripts seem to coexist fine, & I can happily scroll anywhere,
with the mouse pointer determining focus, which is what I desire.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group