In this post, I’ll show you how to use the AutoHotKey system utility to make a simple script file to quickly automate zooming the font size up and down in the FoxPro IDE using keyboard shortcuts or the mouse wheel. This is a common feature in most modern code editors, but it is not a native feature of our much older FoxPro IDE. (Jim Nelson gave me this idea when he explained you can Enlarge and Reduce the code window font size through the Format menu when you are working in a code window). So, I used AutoHotKey, which is a tool that can be used to create macros and scripts keyboard shortcuts and mouse gesture for any app running on your Windows machine. It allows for very complex hotkey and mouse combinations that FoxPro macros do not support. This quick-zoom feature is something that most modern IDE’s have and I’ve badly wanted this feature in FoxPro for a long time.
FoxPro IDE does font-zooming : http://www.youtube.com/watch?v=oRjMC-IDmKQ
With these hotkeys (Ctrl+NumPadPlus , Ctrl+NumPadMinus) or mouse (Ctrl+MouseWheelUp, Crtl+MouseWheelDown) you can quickly increase or decrease the font size in the code window, multiple times, if desired, to create a zoom-in or zoom-out effect.
- ControlKey + the [PLUS] key on the number pad of your keyboard to zoom the font larger.
- ControlKey + the [MINUS] key on the number pad of your keyboard to zoom the font smaller.
- ControlKey + [Mouse Wheel] to zoom the font larger or smaller. Try it in both directions to see which way it goes. If you want to reverse the direction of wheel behavior, just edit the script to reverse the WheelUp/WheelDown assignments, or use the X-Mouse Button Control utility to reverse the mouse wheel direction for your whole system.
Here are the scripts:
(Save to your .ahk file, then double-click the file in Windows File Explorer to activate the macros.)
Note that AutoKey allows you to restrict these assignments based on the Window handle, so they will only affect the FoxPro App, as these macros would likely not work in the menu system of any other app.
#IfWinActive ahk_class vfp99400000
Go from this:
by pressing the hotkeys or Ctrl+MouseWheel to zoom in or out as much as you want.