Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Templates: Set global alert keys (2) 1998-11-03 -- Bertus Viljoen Newsgroups: topspeed.products.c4
Editors note: Please note that some lines may wrap in the template code.
Here is it.
It is more for CW2.
#TEMPLATE(BertusViljoen,'Extention to add Global Hot keys to your Application')
#Extension(HotKeys,'Add Hotkeys to your application - Version 2'),APPLICATION
#Boxed('Application Hotkey Definition')
#Prompt('Hotkeys',Keycode),%hotkeyname,Multi('Hotkeys'),Unique
#Prompt('Procedures',Procedure),%HotProcedure,Multi('Procedures')
#EndBoxed
#AtStart
#Declare(%ForCounter,Long)
#EndAt
#At(%WindowInitializationCode)
#If (%Window)
#For(%HotKeyName)
%Window{Prop:Alrt,255} = %Hotkeyname
#EndFor
#EndIf
#EndAt
#AT(%EventCaseBeforeGenerated)
#If (%Window)
#Set(%ForCounter,1)
OF EVENT:AlertKey
Case Keycode()
#For(%HotKeyName)
#Select(%HotProcedure,%ForCounter)
Of %HotKeyName
Start(%HotProcedure,25000)
#Set(%ForCounter,%ForCounter+1)
#EndFor
End
OF EVENT:PreAlertKey
! Do Some Stuff
#EndIf
#ENDAT
Today is November 21, 2024, 7:10 am This article has been viewed 35216 times. Google search has resulted in 5 hits on this article since January 25, 2004.
|
|