It is currently Sat Jan 23, 2021 2:10 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: AutoHotkey used in IDE?
PostPosted: Thu Jan 05, 2017 9:10 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 544
Hello PureBasicians!

Is AutoHotkey used widely around editor by PureBasic community?


Example:
Code:
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!


Top
 Profile  
Reply with quote  
 Post subject: Re: AutoHotkey used in IDE?
PostPosted: Thu Jan 05, 2017 10:18 am 
Offline
Addict
Addict

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 966
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:
; 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:


Top
 Profile  
Reply with quote  
 Post subject: Re: AutoHotkey used in IDE?
PostPosted: Thu Jan 05, 2017 12:40 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 544
Nice examples!

Thanks for the info!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye