Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Templates: Set global alert keys (3) 2000-12-31 -- Roberto Artigas Jr Newsgroups: TopSpeed.Topic.Templates
Editors note: Please note that some lines may wrap in the template code.
Heavenes - I found a couple of similar templates posted in the newsgroups
and since I wanted to do something a little different (their posts where
not exactly what I needed) I created my own based on the information they
had posted. Here are the results.
Feel free make changes, enhance, and please post again.
Thank You
Roberto Artigas Jr
ascend@netten.net
#!====================================================================
#!====================================================================
#!====================================================================
#EXTENSION(GlobalHotKeys, 'Application Global Hot Keys'),APPLICATION
#!====================================================================
#SHEET
#TAB('Global Hot Keys')
#BUTTON('Hot Key and Procedure Pairs'),AT(,,173,),MULTI(%HotPair,%GlobalAlertKey & ' ' &
%GlobalAlertProc)
#PROMPT('Key to Alert',KEYCODE),%GlobalAlertKey,UNIQUE
#PROMPT('Procedure to Run:',PROCEDURE),%GlobalAlertProc,UNIQUE
#ENDBUTTON
#BOXED('')
#DISPLAY('Template will allow you to enter hotkey and procedure')
#DISPLAY('pairs that will be applied to every window in your')
#DISPLAY('application.')
#ENDBOXED
#ENDTAB
#ENDSHEET
#!====================================================================
#ATSTART
#ENDAT
#!====================================================================
#ATEND
#ENDAT
#!====================================================================
#AT(%WindowInitializationCode)
#IF (%Window)
!BEG - GlobalHotKeys
#FOR(%HotPair)
%Window{PROP:Alrt,255} = %GlobalAlertKey
#ENDFOR
!END - GlobalHotKeys
#ENDIF
#ENDAT
#!====================================================================
#AT(%WindowEventHandling,'AlertKey')
#IF (%Window)
!BEG - GlobalHotKeys
CASE KEYCODE()
#For(%HotPair)
OF %GlobalAlertKey
#!EMBED(%BeforeGlobalKey,'Embed Before Global Key'),%GlobalAlertKey
START(%GlobalAlertProc, 25000)
#!EMBED(%AfterGlobalKey,'Embed After Global Key'),%GlobalAlertKey
#EndFor
END
!END - GlobalHotKeys
#ENDIF
#ENDAT
!====================================================================
#!
Today is November 21, 2024, 3:47 am This article has been viewed 35299 times. Google search has resulted in 8 hits on this article since January 25, 2004.
|
|