<comment author="abcd">
</comment>
with the carat left on the blank line between the beginning and ending comment tag. Here's my hotstring:
Code: Select all
:*b0t0:<c*::{bs}omment author="abcd">{enter 2}<\comment>{enter}{left 12}
<omment author="abcd">
<\comment>
c
and the carat is left at the beginning of the closing <\comment> line. I've experimented with changing the SendMode from Input to Event, adding k99 to the b0t0 and even adding {sleep, 500} before each of the different 'keystroke' commands. I can mess it up worse but I can't get to what I'm trying. Anyone know what I'm doing wrong? (Longer explanation below)
The whole story is I'm using a modified script I found on the internet to load two different scripts. Here's the MasterScript:
Code: Select all
======================
; Master AHK Script
; Modified from https://autohotkey.com/board/topic/5119-launching-multiple-ahk-scripts/
; ----- Common Settings -----
#SingleInstance force
StringCaseSense On
; ----- AutoExecute commands -----
;...
; ----- Included Scripts -----
GoSub WebformSetup
GoSub AutoCorrectSetup
GoTo Shared
AutoCorrectSetup:
#include c:\tools\ahk_scripts\AutoCorrect.ahk
Return
WebformSetup:
#include c:\tools\ahk_scripts\Webform.ahk
Return
Shared:
; ----- Shared subroutines, functions ---
====================
Code: Select all
====================
;#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
;SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
;SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
OldSendMode := A_SendMode
SendMode Event
; ----- Hotstrings -----
#IfWinActive PROG
:*b0t0:<t*::{sleep, 500}{bs}itle author="abcd"><\title>{sleep, 500}{left 8}
:*b0t0:<c*::{bs}omment author="abcd">{enter 2}<\comment>{enter}{left 12}
SetKeyDelay -1
SendMode %OldSendMode%
====================
Notice I do similar things for <t* and <c* - but <t* actually works...and the only difference I can see is the '{enter 2}'...
Moderator Note: Added code tags. ~ sinkfaze