Page 1 of 1
AutoHotkey used in IDE?
Posted: Thu Jan 05, 2017 9:10 am
by HanPBF
Hello PureBasicians!
Is AutoHotkey used widely around editor by PureBasic community?
Example:
Code: Select all
CapsLock::
input, cm, L1
ks := GetKeyState("Shift")
if cm=q
if ks=0
SendInput CompilerIf
else
SendInput CompilerEndIf `;
if cm=p
if ks=0
SendInput procedure ()
else
SendInput endProcedure `;
return
Would be nice to see what scripts else are used!
Thanks for any hint!
Regards!
Re: AutoHotkey used in IDE?
Posted: Thu Jan 05, 2017 10:18 am
by Marc56us
Hi HanPBF,
For me I don't use AutoHotkey for macros but a very little tool
TyperTask
It is a small free tool (53ko! one only exe) offered by a company that develops a Windows automation tool that I have been using for years (vTask Studio).
TyperTask is a standalone program that use the same syntax as AutoHotkey (AutoIt and some other macro tools)
I realized several macros that allow me to type faster, especially commands that look similar and whose completion list is then too long (ie: SetGadget...)
For PB, I have wrote
Code: Select all
; PureBasic
pbw--=#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered
msb--=MessageRequester("", ""){left}{left}{left}{left}{left}{left}
sgt--=SetGadgetText(){left}
sgs--=SetGadgetState(){left}
pcd--=Procedure{return}EndProcedure{up}{space}
--+=; -----------------------------------------------------------------------------{enter}
(As the replacement is done continuously, I suffix my macros with -- to make sure that the system does not replace an existing word.
Any char can be used, I use -- because it's on numeric pad top right, so easy to access)
I use it the same way for example for the mail, to type the courtesy formulas
Re: AutoHotkey used in IDE?
Posted: Thu Jan 05, 2017 12:40 pm
by HanPBF
Nice examples!
Thanks for the info!