AutoHotkey used in IDE?

Working on new editor enhancements?
HanPBF
Enthusiast
Enthusiast
Posts: 563
Joined: Fri Feb 19, 2010 3:42 am

AutoHotkey used in IDE?

Post 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!
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: AutoHotkey used in IDE?

Post 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

:wink:
HanPBF
Enthusiast
Enthusiast
Posts: 563
Joined: Fri Feb 19, 2010 3:42 am

Re: AutoHotkey used in IDE?

Post by HanPBF »

Nice examples!

Thanks for the info!
Post Reply