Jump to content
Macro Express Forums

if capslock is "on" ?


Recommended Posts

You could make a second macro, activated by a hot key, that sets/clears a flag for pause/go.

Your main macro could check the flag and delay, or not.  Checking the flag could be as frequently as you want, and the delays could be short or long, depending on how responsive you need it to be.

The flag you set could be a registry value, the existence or non-existence of a file, etc.

Link to comment
Share on other sites

You can test Caps Lock state in Version 6. For example:

 

Get Key State "CAPS Lock" into %CapsLockState%
If Variable %CapsLockState% Equals "True"
  Text Box Display: Caps Lock is ON
Else
  Text Box Display: Caps Lock is OFF
End If

 

<GET KEY STATE Key="CAPS Lock" Dest="%CapsLockState%"/>
<IF VARIABLE Variable="%CapsLockState%" Condition="\x00" Value="True" IgnoreCase="FALSE"/>
<TEXT BOX DISPLAY Title="Caps Lock is ON" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs14 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
<ELSE/>
<TEXT BOX DISPLAY Title="Caps Lock is OFF" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs14 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
<END IF/>

 

When writing MEP scripts that involve the Caps Lock key, there are two checkboxes on the "Miscellaneous" tab that you may need to uncheck:

 

image.png.b28845b25e666bd127d771859731f71a.png

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...