Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

k-html: to handcode html quickly in the text editor you want


  • Please log in to reply
17 replies to this topic
Normand
  • Members
  • 90 posts
  • Last active: Aug 31 2015 10:53 AM
  • Joined: 21 May 2007
What's k-html?
A lightweight application to handcode HTML quickly in the text editor you want.

Current version: 2.1.10.19
Last update: october, 19th 2007

Posted Image
(NB: Notepad2 is not part of k-html)

New features:
- Possibility to define all hotstrings you want
- A GUI to add, modify or delete hotstrings

General caracteristics:
- QWERTY / AZERTY keyboard support
- Leaves all Windows' standard shortcuts intact
- En français (also available in English)

Website: http://normandlamour...html/index.html.

AHK file (42 kb):
; © Normand Lamoureux, 2007
; K-html est un utilitaire conçu pour insérer du code HTML à l'aide de raccourcis clavier dans n'importe quel éditeur de texte.
; Ce programme est un logiciel libre; vous pouvez le redistribuer ou le modifier au titre des clauses de la Licence Publique Générale GNU, telle que publiée par la Free Software Foundation, version 3. Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE; sans même une garantie implicite de COMMERCIABILITÉ ou DE CONFORMITÉ À UNE UTILISATION PARTICULIÈRE. Pour plus de détails, consultez le fichier licence.txt, qui contient le texte ogirinal anglais de la Licence Publique Générale GNU.
; Dernière mise à jour : 19 octobre 2007
; http://normandlamoureux.com/k-html/
; [email protected]

#NoEnv
Process Priority,,L
SetBatchLines -1
SetTitleMatchMode,2
#Persistent
CoordMode Pixel,Screen
CoordMode Mouse,Screen

Loop,11 {                              ; charger les options utilisateur
 IniRead,u%A_Index%,k-html.ini,usr,u%A_Index%
}
If u11=1                               ; régler la vitesse d'exécution de k-html
 SetKeyDelay,,0
If u11=0
 SetKeyDelay,0,0
If u10=1                               ; afficher l'heure et la date au démarrage
 GoSub AH
Loop,98 {                              ; charger les textes à afficher
 IniRead,i%A_Index%,k-html.ini,i18n,i%A_Index%
}
Loop,131 {                             ; charger les raccourcis clavier
 IniRead,%A_Index%,k-html.ini,Raccourcis clavier,%A_Index%
 k:=%A_Index%
 Hotkey,%k%,%A_Index%
}

; ############################################
; ## Démarrage ###############################
; ############################################

Menu,Tray,Tip,k-html %i2%             ; monter le menu système
Menu,Tray,NoStandard
Menu,Tray,Icon,k-html.ico
Menu,Tray,Add,%i14%,1
Menu,Tray,Add,%i97%,3
Menu,Tray,Add,%i94%,4
Menu,Tray,Add,%i80%,6
Menu,Tray,Add,%i67%,9

If u4=1
 #=Space                               ; # détermine le type d'espacement utilisé pour l'indentation
If u4=0
{
 #=Tab
 u5=1                                  ; force l'utilisation d'une seule tabulation
}
If u1=0
 GoTo 1

^LWin::Return                          ; empêche le curseur de remonter dans Notepad2 lorsqu'on appuie sur Contrôle + Windows

; ############################################
; ## Aide-mémoire - Interface ################
; ############################################

1:
IfWinExist %i80%
 Gui Destroy
IfWinExist %i94%
 Gui Destroy
IfWinExist %i97%
 Gui Destroy
IfWinNotExist %i14%
{
Loop,131 {                             ; charger les raccourcis clavier
 IniRead,%A_Index%,k-html.ini,Raccourcis clavier,%A_Index%
 k:=%A_Index%
 StringReplace,k,k,+,%i10% + 
 StringReplace,k,k,!,%i3% + 
 StringReplace,k,k,RAlt,%i4%
 StringReplace,k,k,^,%i5% + 
 StringReplace,k,k,RCtrl,%i6%
 StringReplace,k,k,~Esc,%i7%
 StringReplace,k,k,Enter,%i8%
 StringReplace,k,k,Space,%i9%
 StringReplace,k,k,Appskey,%i11%
 StringReplace,k,k,CapsLock,%i12%
 StringReplace,k,k,#,%i13% + 
 StringReplace,k,k,&,+,all
 StringReplace,k,k,+ +,+ &&
 %A_Index%:=k
}
Gui Font,,Tahoma
Gui Add,Tab,W254 H350,%i16%
Gui Add,Text,,%i17%%1%`n%i18%%2%`n%i19%%3%`n%i20%%4%`n%i21%%5%`n%i22%%6%`n%i23%%7%`n%i24%%8%`n%i25%%9%`n`n%i26%%13%`n%i27%%14%`n%i28%%15%`n%i29%%16%`n%i30%%17%`n%i31%%18%`n%i32%%19%`n%i33%%20%`n`n%i34%%11%`n%i35%%12%`n%i36%%10%
Gui Font,Norm
Gui Tab,2
Gui Add,Text,W230,DTD XHTML 1.0 Strict	%22%`n<!--  -->`t`t%21%`n`nhtml`t`t`t%28%`nhead`t`t`t%27%`ntitle`t`t`t%33%`nbody`t`t`t%24%`n`nbase`t`t`t%23%`nbdo`t`t`t%26%`n`nlink`t`t`t%29%`nmeta`t`t`t%30%`nstyle`t`t`t%34%`n`nnoscript`t`t`t%31%`nscript`t`t`t%32%`n`n`n------------`n%25% %i37%
Gui Tab,3
Gui Add,Text,,h1`t`t`t%35%`nh2`t`t`t%36%`nh3`t`t`t%37%`nh4`t`t`t%38%`nh5`t`t`t%39%`nh6`t`t`t%40%`n`naddress`t`t`t%41%`nblockquote`t`t%42%`np`t`t`t%48%`n`nbr			%44%`nhr			%49%`n`nol`t`t`t%47%`nul`t`t`t%51%`nli`t`t`t%45%`ndl`t`t`t%46%`ndt`t`t`t%50%`ndd`t`t`t%43%`n`ndiv`t`t`t%52%
Gui Tab,4
Gui Add,Text,W230,del`t`t`t%53%`nins`t`t`t%55%`n`na`t`t`t%56%`n`nsub`t`t`t%57%`nsup`t`t`t%63%`n`nem`t`t`t%59%`nstrong`t`t`t%65%`nb`t`t`t%60%`ni`t`t`t%61%`n`ncite`t`t`t%58%`nq`t`t`t%64%`n`nspan`t`t`t%62%`n`n`n------------`n%i38%
Gui Tab,5
Gui Add,Text,W230,table`t`t`t%75%`ncaption`t`t`t%67%`n`nthead`t`t`t%69%`ntfoot`t`t`t%70%`ntbody`t`t`t%76%`n`ntr`t`t`t%74%`ntd`t`t`t%68%`nth`t`t`t%71%`n`ncol`t`t`t%72%`ncolgroup`t`t%73%`n`n`n`n`n`n------------`n%66% %i39%
Gui Tab,6
Gui Add,Text,,map`t`t`t%86%`narea`t`t`t%77%`n`nimg`t`t`t%82%`n`niframe`t`t`t%79%`nobject`t`t`t%84%`nparam`t`t`t%89%`n`nform`t`t`t%81%`nfieldset`t`t`t%80%`nlegend`t`t`t%87%`n`nlabel`t`t`t%85%`n`nbutton`t`t`t%78%`ninput`t`t`t%83%`noption`t`t`t%88%`n`noptgroup`t`t%91%`nselect`t`t`t%90%`ntextarea`t`t%92%
Gui Tab,7
Gui Add,Text,W230,abbr`t`t`t%93%`nacronym`t`t%103%`n`ndfn`t`t`t%96%`nvar`t`t`t%102%`n`nbig`t`t`t%94%`nsmall`t`t`t%100%`n`ncode`t`t`t%95%`nkbd`t`t`t%97%`nsamp`t`t`t%98%`npre`t`t`t%99%`ntt`t`t`t%101%`n`n%i40%`t%104%`n%i41%`t%105%`n`n`n------------`n%i42% %4%.
Gui Tab,8
Gui Add,Text,,&&`;`t`t&&`t%107%`n&<`;`t`t<`t%108%`n&&hellip`;`t`t…`t%110%`n`n&æ`;`t`tæ`t%111%`n&Æ`;`t`tÆ`t%112%`n&©`;`t`t©`t%113%`n&&euro`;`t`t€`t%114%`n`n&£`;`t£`t%115%`n&&mdash`;`t—`t%116%`n&&ndash`;`t–`t%117%`n`n&&oelig`;`t`tœ`t%118%`n&&OElig`;`t`tŒ`t%119%`n&Ç`;`t`tÇ`t%120%`n&®`;`t`t®`t%121%`n`n&½`;`t½`t%122%`n&¼`;`t¼`t%123%`n&¾`;`t¾`t%124%`n&¥`;`t`t¥`t%125%
Gui Tab,9
Gui Font,s10 W600,Verdana
Gui Add,Text,,k-html %i2%
Gui Font,s8 W400,Tahoma
Gui Add,Text,,© Normand Lamoureux, 2007
Gui Font,Underline
Gui Add,Text,yp+14 cBlue gLink1 vURL_Link1 tabstop,http://normandlamoureux.com/k-html/
Gui Font,Norm
Gui Add,Text,Norm,%i43%
Gui Font,Underline
Gui Add,Text,yp+14 cBlue gLink2 vURL_Link2 tabstop,http://www.gnu.org/licenses/gpl.txt
Gui Font,Norm
Gui Add,Text,,%i44%
Gui Font,Underline
Gui Add,Text,yp+14 cBlue gLink3 vURL_Link3 tabstop,http://www.autohotkey.com/
Gui Font,Norm
Gui Add,Text,yp+30,%i45%`n%i46%`n%i47%`n%i48%`n%i49%`n%i50%`n%i51%`n%i52%`n%i53%`n%i54%
Gui Tab
Gui Add,Checkbox,xp-12 yp+154 gAD vu1 Checked%u1%,%i15%
Gui Add,Button,vfer xp+184 W70 Default,Fermer
 GuiControl,,fer,%i60%
Gui Show,,%i14% - k-html
Return
}
Gui Destroy
Return

; ############################################
; ## Aide-mémoire - Contrôles ################
; ############################################

AD:                                    ; option Ne plus afficher au démarrage
GuiControlGet,u1,,u1
IniWrite,%u1%,k-html.ini,usr,u1
Return

GuiClose:
 GoTo 9
GuiEscape:
ButtonFermer:
ButtonAnnuler:
 Gui Destroy
Return

Link1:
Run http://normandlamoureux.com/k-html/
Return

Link2:
Run http://www.gnu.org/licenses/gpl.txt
Return

Link3:
Run http://www.autohotkey.com/
Return

; ############################################
; ## Ligne indentée ##########################
; ############################################

2:                                     ; commande pour créer une nouvelle ligne indentée
k:=ClipboardAll
Clipboard=
Send {enter}{up}+{end}^c{end}{down}{home}
p:=RegExMatch(Clipboard,"\S")
If p=0
 Send ^v
If p>1
{
Send % "{up}{home 2}+{right " p-1 "}"
Send ^c{end}{down}{home}^v
}
Clipboard:=k
Return

; ############################################
; ## Remplacements automatiques - Interface ##
; ############################################

3:
IfWinExist %i14%
 Gui Destroy
IfWinExist %i80%
 Gui Destroy
IfWinExist %i94%
 Gui Destroy
IfWinExist %i97%
 winActivate
IfWinNotExist %i97%
{
Gui,Add,Text,y+12 w101,%i68%
Gui,Add,Text,xp+104,%i65%
Gui,Add,Edit,xp-104 yp+14 w101 vR
Gui,Add,Edit,xp+104 w446 vC
Gui,Add,ListView,gListe2 xp-104 y+12 r15 w550 grid sort,%i98%
Loop,Read,remplacement.txt
 {
 StringTrimLeft,L,A_LoopReadLine,3
 StringReplace,L,L,::,%A_Tab%
 StringReplace,L,L,:*:,%A_Tab%
 Stringsplit,C,L,%A_Tab%
 LV_Add("",C1,C2)
 }
Gui,Add,Button,vAjt y+22 w70 Default,Ajouter
 GuiControl,,Ajt,%i56%
Gui,Add,Button,vMdf w70 xp+80,Modifier
 GuiControl,,Mdf,%i62%
Gui,Add,Button,vSup w70 xp+80,Supprimer
 GuiControl,,Sup,%i71%
Gui,Add,Button,vOK2 w70 xp+241,OK2
 GuiControl,,OK2,%i64%
Gui,Add,Button,vAnn w70 xp+80,Annuler
 GuiControl,,Ann,%i57%
Gui,Show,,%i97% - k-html
}
Return

; ############################################
; ## Remplacements automatiques - Contrôle ###
; ############################################

ButtonAjouter:
Gui Submit
If (R="" || C="")
{
 MsgBox 48,%i72%,%i78%`n%i76%
 Gui,Destroy
 GoTo 3
}
Else
{
 FileAppend,`r`n`:*`:%R%`::%C%,remplacement.txt
 FileRead,F,remplacement.txt
}
Gui Destroy
GoTo 3
Return

Liste2:
If A_GuiEvent=DoubleClick
 GoTo ButtonModifier
Return

ButtonModifier:
ls:=LV_GetNext(0,"F")
If ls=0
{
 MsgBox 48,%i72%,%i73%
 Return
}
ControlGet,l,List,focused,SysListView321,%i97%
p:=RegExMatch(l,"`t")
q:=p-1
StringLeft,cg,l,%q%
GuiControl,,R,%cg%
StringTrimLeft,cd,l,%p%
GuiControl,,C,%cd%
GoTo Appliquer
Return

ButtonSupprimer:
ls:=LV_GetNext(0,"F")
If ls=0
{
 MsgBox 48,%i72%,%i73%
 Return
}
MsgBox,36,%i1%,%i79%`n%i59%
IfMsgBox No
 Return
IfMsgBox Yes
{
 GuiControl,,C,
 GuiControl,,R,
 GoTo Appliquer
}
Return

Appliquer:
LV_Modify(ls,"-focus")
Loop
{
 L:=LV_GetNext(L-1)
 If not L
  Break
 LV_Delete(L)
}
FileDelete,remplacement.txt
ControlGet,L,List,,sysListView321,%i97%
Loop,Parse,L,`r`n
{
 StringReplace,L,L,%A_Tab%,::
}
FileAppend,%L%,remplacement.txt
Loop,Read,remplacement.txt
{
 Loop,Parse,A_LoopReadLine,`r`n
 {
 StringReplace,L,L,%A_LoopReadLine%,:*:%A_LoopReadLine%
 }
}
FileDelete,remplacement.txt
FileAppend,%L%,remplacement.txt
Return

ButtonOK2:
Reload
Return

; ############################################
; ## Raccourcis clavier - Interface ##########
; ############################################

4:
IfWinExist %i14%
 Gui Destroy
IfWinExist %i80%
 Gui Destroy
IfWinExist %i94%
 WinActivate
IfWinExist %i97%
 Gui Destroy
IfWinNotExist %i94%
{
Loop 131 {
 IniRead,%A_Index%,k-html.ini,Raccourcis clavier,%A_Index%
 }
Gui Add,text,y+12,%i68%
Gui Add,Edit,ReadOnly yp+16 W100 vAncien
Gui Add,text,yp-16 xp+120,%i65%
Gui Add,Edit,yp+16 W100 vChn
Gui Add,text,xp+120 yp-16 w210,%i96%
Gui Add,ListView,gLst yp+64 xp-240 R15 W450 Grid,%i95%
Loop 131 {
 k:=%A_Index%
 StringReplace,k,k,+,%i10% + 
 StringReplace,k,k,!,%i3% + 
 StringReplace,k,k,RAlt,%i4%
 StringReplace,k,k,^,%i5% + 
 StringReplace,k,k,RCtrl,%i6%
 StringReplace,k,k,~Esc,%i7%
 StringReplace,k,k,Enter,%i8%
 StringReplace,k,k,Space,%i9%
 StringReplace,k,k,Appskey,%i11%
 StringReplace,k,k,CapsLock,%i12%
 StringReplace,k,k,#,%i13% + 
 LV_Add("",k)
 }
Gui Add,Button,vi103 y+16 W70 Default,Modifi
 GuiControl,,i103,%i58%
Gui Add,Button,vi104 xp+77 W90,Restaurer
 GuiControl,,i104,%i70%
Gui Add,Button,vi105 W70 xp+226,OKj
 GuiControl,,i105,%i64%
Gui Add,Button,vi106 W70 xp+77,%i57%
 GuiControl,,i106,%i57%
Gui Show,,%i94% - k-html
}
Return

; ############################################
; ## Raccourcis clavier - Contrôles ##########
; ############################################

ButtonModifi:
ligne:=LV_GetNext(0,"F")
If ligne=0
{
MsgBox,48,%i72%,%i73%
Return
}
ControlGet,l,List,Focused,SysListView321,%i94%
p:=RegExMatch(l,"`t")
StringTrimLeft,cd,l,%p%
GuiControl,,Ancien,%cd%
GuiControl,Focus,Chn
Return

ButtonOKj:
ligne:=LV_GetNext(0,"F")
If ligne=0
 Gui Destroy
Gui Submit
StringReplace,Chn,Chn,%i3%%A_Space%+%A_Space%,!
StringReplace,Chn,Chn,%i4%,RAlt
StringReplace,Chn,Chn,%i5%%A_Space%+%A_Space%,^
StringReplace,Chn,Chn,%i6%,RCtrl
StringReplace,Chn,Chn,%i7%,~Esc
StringReplace,Chn,Chn,%i8%,Enter
StringReplace,Chn,Chn,%i9%,Space
StringReplace,Chn,Chn,%i11%,Appskey
StringReplace,Chn,Chn,%i12%,CapsLock
StringReplace,Chn,Chn,%i13%%A_Space%+%A_Space%,#
StringReplace,Chn,Chn,%i10%%A_Space%+%A_Space%,+
If Chn Contains  & 
{
 P:=RegExMatch(Chn,"i)^(Appskey|Backspace|Break|BS|CapsLock|Delete|Del|Down|End|Enter|~Escape|~Esc|~F1|~F2|~F3|~F4|~F5|~F6|~F7|~F8|~F9|~F10|~F11|~F12|~F13|~F14|~F15|~F16|~F17|~F18|~F19|~F20|~F21|~F22|~F23|~F24|Home|Insert|Ins|Left|NumLock|Numpad0|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9|NumpadAdd|NumpadClear|NumpadDel|NumpadDiv|NumpadDot|NumpadDown|NumpadEnd|NumpadEnter|NumpadHome|NumpadIns|NumpadLeft|NumpadMult|NumpadPgDn|NumpadPgUp|NumpadRight|NumpadSub|NumpadUp|Pause|PgDn|PgUp|PrintScreen|RAlt|RControl|RCtrl|Right|ScrollLock|Space|Tab|Up) & (Appskey|Backspace|Break|BS|CapsLock|Delete|Del|Down|End|Enter|Escape|Esc|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|Home|Insert|Ins|Left|NumLock|Numpad0|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9|NumpadAdd|NumpadClear|NumpadDel|NumpadDiv|NumpadDot|NumpadDown|NumpadEnd|NumpadEnter|NumpadHome|NumpadIns|NumpadLeft|NumpadMult|NumpadPgDn|NumpadPgUp|NumpadRight|NumpadSub|NumpadUp|Pause|PgDn|PgUp|PrintScreen|RAlt|RControl|RCtrl|Right|ScrollLock|Space|Tab|Up|(\w){1})$")
 If P=0
 {
 MsgBox,48,%i72%,%i75%`n%i76%
 Gui Destroy
 GoTo 4
 }
 Loop 131 {
  IniRead,k,k-html.ini,Raccourcis clavier,%A_Index%
  If k = %Chn%
  {
  MsgBox,48,%i72%,%i77%`n%i76%
  Gui Destroy
  GoTo 4
  Return
  }
 }
}
If Chn Not Contains  & 
{
 Q:=RegExMatch(Chn,"i)^(!|\+|\^|#){0,3}(Appskey|Backspace|Break|BS|CapsLock|Delete|Del|Down|End|Enter|Escape|Esc|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|Home|Insert|Ins|Left|NumLock|Numpad0|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9|NumpadAdd|NumpadClear|NumpadDel|NumpadDiv|NumpadDot|NumpadDown|NumpadEnd|NumpadEnter|NumpadHome|NumpadIns|NumpadLeft|NumpadMult|NumpadPgDn|NumpadPgUp|NumpadRight|NumpadSub|NumpadUp|Pause|PgDn|PgUp|PrintScreen|RAlt|RControl|RCtrl|Right|ScrollLock|Space|Tab|Up|(\w){1})$")
 If Q=0
 {
 MsgBox,48,%i72%,%i75%`n%i76%
 Gui Destroy
 GoTo 4
 }
 Chn:=RegExReplace(Chn,"(!|\+|\^|#)","$1`r`n")
 Sort,Chn
 Chn:=RegExReplace(Chn,"`r`n","")
 Loop 131 {
  IniRead,k,k-html.ini,Raccourcis clavier,%A_Index%
  If k = %Chn%
  {
  MsgBox,48,%i72%,%i77%`n%i76%
  Gui Destroy
  GoTo 4
  Return
  }
 }
}
IniWrite,%Chn%,k-html.ini,Raccourcis clavier,%ligne%
Reload
Return

Lst:
If A_GuiEvent=DoubleClick
 GoTo ButtonModifi
Return

ButtonRestaurer:
MsgBox,36,%i1%,%i74%`n%i59%
IfMsgBox No
 Return
IfMsgBox Yes
Loop 131 {
 IniRead,v,k-html.ini,Raccourcis d'origine,%A_Index%
 IniWrite,%v%,k-html.ini,Raccourcis clavier,%A_Index%
 }
Gui Destroy
Reload
Return

; ############################################
; ## Navigateur ##############################
; ############################################

5:
Run "%u8%"
Return

; ############################################
; ## Options... - Interface ##################
; ############################################

6:
IfWinExist %i14%
 Gui Destroy
IfWinExist %i80%
 WinActivate
IfWinExist %i94%
 Gui Destroy
IfWinExist %i97%
 Gui Destroy
IfWinNotExist %i80%
{
If u3=utf-8
 f:=1
If u3=iso-8859-1
 f:=2
If u3=windows-1252 
 f:=3
IniRead,u7,k-html.ini,usr,u7,C:\WINDOWS\NOTEPAD.EXE
IniRead,u8,k-html.ini,usr,u8,C:\Program Files\Internet Explorer\iexplore.exe
IniRead,u9,k-html.ini,usr,u9,k-html.txt
u7c:=RegExMatch(u7,"i)[^\\]*\.exe")-1
 StringTrimLeft u7c,u7,%u7c%
u8c:=RegExMatch(u8,"i)[^\\]*\.exe")-1
 StringTrimLeft u8c,u8,%u8c%
pc:=RegExMatch(u9,"[^\\]*\..{2,5}")-1
 StringTrimLeft pc,u9,%pc%
Gui Add,Tab,w254 h170,%i81%
Gui Add,Text,,%i82%
Gui Add,Edit,vu2 W30 +Lowercase Limit3,%u2%
Gui Font,Underline
Gui Add,Text,xp+40 yp+7 cBlue gLink4 vURL_Link4 tabstop,code iso-639-1
Gui Font,Norm
Gui Add,Text,xp-40 yp+16,`n%i83%
Gui Add,DDL,vu3 Choose%f%,utf-8|iso-8859-1|windows-1252
Gui Tab,2
Gui Add,Checkbox,W200 gID vu4 Checked%u4%,%i84%
Gui Add,Text,,`n%i85%
If u4=1
 Gui Add,Edit,vu5 W30 +Number Limit2,%u5%
If u4=0
 Gui Add,Edit,vu5 W30 +Number Limit2 ReadOnly,2
Gui Tab,3
Gui Add,Checkbox,W230 vu6 Checked%u6%,%i86%`n
Gui Add,Text,W230,`n%i87%
Gui Tab,4
Gui Add,Text,W230,%i88% %8% :`n
Gui Add,Button,vu7 W90 Default,P1
 GuiControl,,u7,%i66%
Gui Add,Text,vtu7 W238,`n%i55% %u7c%
Gui Tab,5
Gui Add,Text,W230,%i89% %5% :`n
Gui Add,Button,vu8 W90 Default,P2
 GuiControl,,u8,%i66%
Gui Add,Text,vtu8 W238,`n%i55% %u8c%
Gui Tab,6
Gui Add,Text,W230,%i90% %7% :`n
Gui Add,Button,vu9 W90 Default,P3
 GuiControl,,u9,%i66%
Gui Add,Text,vtu9 W238,`n%i55% %pc%
Gui Tab,7
Gui Add,Checkbox,vu10 Checked%u10%,%i91%`n
Gui Tab,8
Gui Add,Checkbox,W230 vu11 Checked%u11%,%i92%`n
Gui Add,Text,W230,`n`n%i93%
Gui Tab
Gui Add,Button,vOk W70 x117 Default,OK
 GuiControl,,Ok,%i64%
Gui Add,Button,xp+77 W70,%i57%
Gui Show,,%i80% - k-html
}
Return

; ############################################
; ## Options... - Contrôles ##################
; ############################################

ButtonOK:
Gui Submit
IniWrite %u2%,k-html.ini,usr,u2
IniWrite %u3%,k-html.ini,usr,u3
IniWrite %u4%,k-html.ini,usr,u4
IniWrite %u5%,k-html.ini,usr,u5
IniWrite %u6%,k-html.ini,usr,u6
IniWrite %u10%,k-html.ini,usr,u10
IniWrite %u11%,k-html.ini,usr,u11
IniWrite %u12%,k-html.ini,usr,u12
If u4=1
 #=space
If u4=0
{
#=tab
u5=1
}
Gui Destroy
Return

ButtonP1:
FileSelectFile u7,s,,,*.exe
If u7=
 Return
Else
{
IniWrite %u7%,k-html.ini,usr,u7
k:=RegExMatch(u7,"i)[^\\]*\.exe")-1
StringTrimLeft u7c,u7,%k%
GuiControl,Text,tu7,`n%i55% %u7c%
}
Return

ButtonP2:
FileSelectFile u8,s,,,*.exe
If u8=
 Return
Else
{
IniWrite %u8%,k-html.ini,usr,u8
k:=RegExMatch(u8,"i)[^\\]*\.exe")-1
StringTrimLeft u8c,u8,%k%
GuiControl,Text,tu8,`n%i55% %u8c%
}
Return

ButtonP3:
FileSelectFile u9
If u9=
 Return
Else
{
IniWrite %u9%,k-html.ini,usr,u9
k:=RegExMatch(u9,"[^\\]*\..{2,5}")-1
StringTrimLeft pc,u9,%k%
GuiControl,Text,tu9,`n%i55% %pc%
}
Return

ID:
GuiControlGet,u4,,u4
If u4=1
 GuiControl,-ReadOnly,u5
If u4=0
 GuiControl,+ReadOnly,u5
Return

Link4:
Run http://fr.wikipedia.org/wiki/ISO_639
Return

7:
FileRead,Clipboard,%u9%
Send ^v
Return

8:
Run "%u7%"
Return

; ############################################
; ## Quitter #################################
; ############################################

9:
MsgBox 36,%i67%,%i69%
IfMsgBox No
 Return
IfMsgBox Yes
 Exitapp
Return

; ############################################
; ## Général #################################
; ############################################

!*::                                   ; sous-routine pour créer une nouvelle ligne indentée
Clipboard=
Send {enter}{up}+{end}^c{end}{down}{home}
p:=RegExMatch(Clipboard,"\S")
If p=0                                 ; si la ligne de départ est vide
 Send ^v
If p>1                                 ; si la ligne de départ débute par au moins un espacement
{
Send % "{up}{home 2}+{right " p-1 "}"
Send ^c{end}{down}{home}^v
}
Return

10:
KeyWait AppsKey
Send ^f=""{enter}{esc 3}{right}{left}
Return

Appskey::Send {appskey}                ; conserve le fonctionnement normal de la touche Menu utilisée seule

11:
k:=ClipboardAll
Clipboard=
Send +^{left}^x
If Clipboard In area,base,br,hr,img,input,link,meta
{
Send <^v />
Return
}
Send <^v></^v>
Send % "{left " StrLen(Clipboard)+3 "}"
Clipboard:=k
Return

12:
Send ^f></{enter}{esc 3}{right}{left 2}
Return

13:
Send {space}class=""{left}
Return

14:
FormatTime date,YYYYMMDDHH24MISS,yyyy-MM-dd
Send %date%
Return

15:
If WinExist(": ahk_class AutoHotkeyGUI")
 Gui 2:Destroy
Else
 GoTo AH
Return

16:
Send {space}id=""{left}
Return

17:
Send {space}xml:lang="" lang=""{left 9}
Return

18:
MsgBox 36,%i63%,%i61%`n%i59%
IfMsgBox No
 Return
IfMsgBox Yes
{
k:=ClipboardAll
Clipboard=
Send ^x
Clipboard:=RegExReplace(Clipboard,"sU)<!--(.*)-->","")             ; ôte les commentaires html sur une ou plusieurs lignes
Clipboard:=RegExReplace(Clipboard,"<[^>]+?(src=""|alt="")([^""]*)[^>]+?(alt=""|src="")([^""]*).+?>","`r`n$1$2""`r`n$3$4""`r`n") ; préserve le alt des images
Clipboard:=RegExReplace(Clipboard,"<[^>]+?(href=""|summary=""|alt="")([^""]*).+?>","`r`n$1$2""`r`n") ; préserve liens, images, summary et autres alt
Clipboard:=RegExReplace(Clipboard,"</t(h|d)><t(h|d).*?>","`t")     ; met des séparateurs de cellules
Clipboard:=RegExReplace(Clipboard,"<li.*?>",".`t")                 ; marque les items de liste
Clipboard:=RegExReplace(Clipboard,"<dd.*?>","—`t")                 ; détache les termes des définitions
Clipboard:=RegExReplace(Clipboard,"<cite.*?>","— ")                ; marque les sources citées
Clipboard:=RegExReplace(Clipboard,"sU)<script(.*)</script>","")    ; ôte les scripts sur une ou plusieurs lignes
Clipboard:=RegExReplace(Clipboard,"sU)<(.*)>","")                  ; ôte le html qui reste
Clipboard:=RegExReplace(Clipboard,"(\s)*`r`n(\s)*","`r`n")         ; nettoie les débuts et fins de ligne
Clipboard:=RegExReplace(Clipboard,"( )+"," ")                      ; réduit les espaces multiples à un seul
Clipboard:=RegExReplace(Clipboard,"(?<!\.)\.{3}(?!\.)","…")        ; met de vrais points de suspension
StringReplace,Clipboard,Clipboard,«,« ,all                         ; met une espace insécable après «
Clipboard:=RegExReplace(Clipboard,"(`;|:|»|%|\$|¢|£|¤|¥)"," $1")   ; met une espace insécable avant ;:»%$¢£¤¥
Clipboard:=RegExReplace(Clipboard,"( | )*( )+( | )*"," ")          ; réduit les espaces composites à une espace insécable
Clipboard:=RegExReplace(Clipboard,"(http|mailto|xml) ","$1")       ; ôte l'espace insécable après http, mailto et xml
Send ^v
Clipboard:=k
}
Return

19:
SetTimer,Voir,100
Hotkey,Enter,Noter,On
Hotkey,Esc,Noter,On
Return

Voir:
MouseGetPos X,Y
PixelGetColor RVB,%X%,%Y%,RGB
RVB:=RegExReplace(RVB,"0x","#")
StringLower,RVB,RVB
ToolTip,%RVB%
Return

Noter:
ClipBoard:=RVB
SetTimer,Voir,Off
Hotkey,Enter,Off
Hotkey,Esc,Off
ToolTip
Return

20:
Send {space}style=""{left}
Return

; ############################################
; ## Meta ####################################
; ############################################

21:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<{!}--  -->{left 4}^v
If StrLen(Clipboard)<>0
 Send {end}
Clipboard:=k
Return

22:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send % "^x<{!}DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">{enter}<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""" u2 """ lang=""" u2 """>{enter}<head>{enter}"
Send {%#% %u5%}
Send % "<meta http-equiv=""content-type"" content=""text/html; charset=" u3 """ />{enter}"
Send {%#% %u5%}<title></title>{enter}{%#% %u5%}<meta http-equiv="content-style-type" content="text/css" />{enter}</head>{enter}<body>{enter}{%#% %u5%}^v{enter}</body>{enter}</html>^{home}{down 4}{right %u5%}{right 7}
Clipboard:=k
Return

23:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<base href="^v" />
If StrLen(Clipboard)=0
 Send {left 4}
Clipboard:=k
Return

24:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<body>{enter 2}</body>{up}^v
Clipboard:=k
Return

25:
KeyWait CapsLock
k:=ClopboardAll
Clipboard=
Send ^x<{!}--[if lte IE 6]>^v<{!}[endif]-->{left 12}
If StrLen(Clipboard)<>0
 Send {end}
Clipboard:=k
Return

26:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<bdo dir="">^v</bdo>
Send % "{left " StrLen(Clipboard)+8 "}"
Clipboard:=k
Return

27:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<head>{enter 2}</head>{up}{%#% %u5%}^v
Clipboard:=k
Return

28:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<html>{enter 2}</html>{up}^v
Clipboard:=k
Return

29:
KeyWait CapsLock
Send <link rel="" type="" href="" />{left 20}
Return

30:
KeyWait CapsLock
Send <meta http-equiv="" content="" />{left 15}
Return

31:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<noscript>
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </noscript>{up}^v
If StrLen(Clipboard)<>0
 Send {down}{end}
Clipboard:=k
Return

32:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<script type="">
y:=Clipboard
GoSub !*
Send {%#% %u5%}<{!}[CDATA[
GoSub !*
GoSub !*
Send ]]>
GoSub !*
Clipboard:=y
Send {bs %u5%}</script>{up 2}{end}^v
Send % "{left " StrLen(y)+u5 "}{up 2}{right 14}"
Clipboard:=k
Return

33:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<title>^v</title>
If StrLen(Clipboard)=0
 Send {left 8}
Clipboard:=k
Return

34:
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<style type="text/css" media="screen">
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </style>{up}^v
If StrLen(Clipboard)<>0
 Send {down}{end}
Clipboard:=k
Return

; ############################################
; ## Structure ###############################
; ############################################

35:
k:=ClipboardAll
Clipboard=
Send ^x<h1>^v</h1>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

36:
k:=ClipboardAll
Clipboard=
Send ^x<h2>^v</h2>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

37:
k:=ClipboardAll
Clipboard=
Send ^x<h3>^v</h3>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

38:
k:=ClipboardAll
Clipboard=
Send ^x<h4>^v</h4>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

39:
k:=ClipboardAll
Clipboard=
Send ^x<h5>^v</h5>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

40:
k:=ClipboardAll
Clipboard=
Send ^x<h6>^v</h6>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

41:
k:=ClipboardAll
Clipboard=
Send ^x<address>
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </address>{up}^v
If StrLen(Clipboard)<>0
 Send {down}{end}
Clipboard:=k
Return

42:
k:=ClipboardAll
Clipboard=
Send ^x<blockquote cite="">
y:=Clipboard
GoSub !*
Send {%#% %u5%}<p>«{asc 0160}{asc 0160}»</p>
GoSub !*
Send <p><cite></cite></p>
GoSub !*
Clipboard:=y
Send {bs %u5%}</blockquote>{left 13}{up 2}{right 5}{right %u5%}^v
Send % "{left " StrLen(y)+5 "}"
Send {left %u5%}{up}{right 18}
Clipboard:=k
Return

43:
k:=ClipboardAll
Clipboard=
Send ^x<dd>^v</dd>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

44:
Send 
Return

45:
k:=ClipboardAll
Clipboard=
Send ^x<li>^v</li>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

46:
k:=ClipboardAll
Clipboard=
Send ^x<dl>
y:=Clipboard
GoSub !*
Send {%#% %u5%}<dt></dt>
GoSub !*
Send <dd></dd>
GoSub !*
Clipboard:=y
Send {bs %u5%}</dl>{left 5}{up 2}{right %u5%}{right 4}^v
If StrLen(Clipboard)<>0
 Send {end}{down}{left 5}
Clipboard:=k
Return

47:
k:=ClipboardAll
Clipboard=
Send ^x
lst:=Clipboard
IfInString,Clipboard,`r`n
{
db:=RegExMatch(Clipboard,"\S")
StringLeft,sp,Clipboard,db-1
sp:=RegExReplace(sp,".*`r`n","")
Send %sp%{%#% %u5%}+{home 2}^x
spt:=Clipboard
Clipboard:=lst
Clipboard:=RegExReplace(Clipboard,"^[\s]*","")
Clipboard:=RegExReplace(Clipboard,"([\s]*)$","")
Clipboard:=RegExReplace(Clipboard,".*`t","")               ; nettoie les puces et numéros déjà là
Clipboard:=RegExReplace(Clipboard,"[\s]*`r`n[\s]*","</li>`r`n<li>")
StringReplace,Clipboard,Clipboard,<li>,%spt%<li>,all
Send %sp%<ol>{enter}%spt%<li>^v</li>{enter}%sp%</ol>
}
Else
{
Send <ol>
GoSub !*
Send {%#% %u5%}<li></li>
GoSub !*
Clipboard:=lst
Send {bs %u5%}</ol>{left 5}{up}{right %u5%}{right 4}^v
}
Clipboard:=k
Return

48:
k:=ClipboardAll
Clipboard=
Send ^x
IfInString,Clipboard,`r`n
{
db:=RegExMatch(Clipboard,"\S")
StringLeft,sp,Clipboard,db-1
sp:=RegExReplace(sp,".*`r`n","")                           ; ôte les blancs inutiles et stocke le résultat dans sp
Clipboard:=RegExReplace(Clipboard,"^[\s]*","")
Clipboard:=RegExReplace(Clipboard,"([\s]*)$","")
Clipboard:=RegExReplace(Clipboard,"[\s]*`r`n[\s]*","</p>`r`n<p>")
StringReplace,Clipboard,Clipboard,<p>,%sp%<p>,all
Send %sp%<p>^v</p>
}
Else
 Send <p>^v</p>
If StrLen(Clipboard)=0
 Send {left 4}
Clipboard:=k
Return

49:
Send <hr />
Return

50:
k:=ClipboardAll
Clipboard=
Send ^x<dt>^v</dt>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

51:
k:=ClipboardAll
Clipboard=
Send ^x
lst:=Clipboard
IfInString,Clipboard,`r`n
{
db:=RegExMatch(Clipboard,"\S")
StringLeft,sp,Clipboard,db-1
sp:=RegExReplace(sp,".*`r`n","")                           ; ôte les blancs inutiles et stocke le résultat dans sp
Send %sp%{%#% %u5%}+{home 2}^x
spt:=Clipboard
Clipboard:=lst
Clipboard:=RegExReplace(Clipboard,"^[\s]*","")
Clipboard:=RegExReplace(Clipboard,"([\s]*)$","")
Clipboard:=RegExReplace(Clipboard,".*`t","")               ; nettoie les puces et numéros déjà là
Clipboard:=RegExReplace(Clipboard,"[\s]*`r`n[\s]*","</li>`r`n<li>")
StringReplace,Clipboard,Clipboard,<li>,%spt%<li>,all
Send %sp%<ul>{enter}%spt%<li>^v</li>{enter}%sp%</ul>
}
Else
{
Send <ul>
GoSub !*
Send {%#% %u5%}<li></li>
GoSub !*
Clipboard:=lst
Send {bs %u5%}</ul>{left 5}{up}{right %u5%}{right 4}^v
}
Clipboard:=k
Return

52:
k:=ClipboardAll
Clipboard=
Send ^x<div>
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </div>{up}^v
If StrLen(Clipboard)<>0
 Send {down}{end}
Clipboard:=k
Return

; ############################################
; ## Édition #################################
; ############################################

53:
k:=ClipboardAll
Clipboard=
Send ^x<del>^v</del>
If StrLen(Clipboard)=0
 Send {left 6}
Clipboard:=k
Return

54:
k:=ClipboardAll
Clipboard=
Send ^x<del>^v</del>
If StrLen(Clipboard)=0
 Send {left 6}
Clipboard:=k
Return

55:
k:=ClipboardAll
Clipboard=
Send ^x<ins>^v</ins>
If StrLen(Clipboard)=0
 Send {left 6}
Clipboard:=k
Return

56:
k:=ClipboardAll
Clipboard=
Send ^x<a href="">^v
Send % "</a>{left " StrLen(Clipboard)+6 "}"
Clipboard:=k
Return

57:
k:=ClipboardAll
Clipboard=
Send ^x<sub>^v</sub>
If StrLen(Clipboard)=0
 Send {left 6}
Clipboard:=k
Return

58:
k:=ClipboardAll
Clipboard=
Send ^x<cite>^v</cite>
If StrLen(Clipboard)=0
 Send {left 7}
Clipboard:=k
Return

59:
k:=ClipboardAll
Clipboard=
Send ^x<em>^v</em>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

60:
k:=ClipboardAll
Clipboard=
Send ^x<b>^v</b>
If StrLen(Clipboard)=0
 Send {left 4}
Clipboard:=k
Return

61:
k:=ClipboardAll
Clipboard=
Send ^x<i>^v</i>
If StrLen(Clipboard)=0
 Send {left 4}
Clipboard:=k
Return

62:
k:=ClipboardAll
Clipboard=
Send ^x<span>^v</span>
If StrLen(Clipboard)=0
 Send {left 7}
Clipboard:=k
Return

63:
k:=ClipboardAll
Clipboard=
Send ^x<sup>^v</sup>
If StrLen(Clipboard)=0
 Send {left 6}
Clipboard:=k
Return

64:
k:=ClipboardAll
Clipboard=
Send ^x<q cite="">«{asc 0160}^v{asc 0160}»</q>
Send % "{left " StrLen(Clipboard)+10 "}"
Clipboard:=k
Return

65:
k:=ClipboardAll
Clipboard=
Send ^x<strong>^v</strong>
If StrLen(Clipboard)=0
 Send {left 9}
Clipboard:=k
Return

; ############################################
; ## Tableau #################################
; ############################################

66:
k:=ClipboardAll
Clipboard=
Send ^x
tb:=Clipboard
IfInString,Clipboard,`r`n                                  ; s'il y a au moins un caractère de fin de ligne
{
d:=RegExMatch(Clipboard,"\S")                              ; trouve la position du premier caractère non-blanc
StringLeft,sp,Clipboard,d-1                                ; forme la chaîne des caractères blancs
sp:=RegExReplace(sp,".*`r`n","")                           ; ôte les blancs inutiles et stocke la résultat dans sp
Send %sp%{%#% %u5%}+{home 2}^x
spt:=Clipboard                                             ; forme la chaîne sp + options d'indentation
Send {%#% %u5%}+{home 2}^x
s:=Clipboard
Clipboard:=tb
Clipboard:=RegExReplace(Clipboard,"^[\s]*","")             ; ôte les espaces inutiles en début de ligne
Clipboard:=RegExReplace(Clipboard,"([\s]*)$","")           ; ôte les espaces inutiles en fin de ligne
Clipboard:=RegExReplace(Clipboard,"[\s]*`t","`t")          ; ôte les espaces inutiles devant une tabulation
Clipboard:=RegExReplace(Clipboard,"`t[\s]*","`t")          ; ôte les espaces inutiles après une tabulation
Clipboard:=RegExReplace(Clipboard,"[\s]*`r`n[\s]*","</td>`r`n</tr>`r`n<tr>`r`n<td>",N)
StringReplace,Clipboard,Clipboard,%A_Tab%,</td><td>,all
StringReplace,Clipboard,Clipboard,<tr>`r`n<td>,%spt%%s%<tr>`r`n%spt%%s%%s%<td>,all
StringReplace,Clipboard,Clipboard,</tr>,%spt%%s%</tr>,all
StringReplace,Clipboard,Clipboard,</tr>,</tr>`r`n%spt%</thead>`r`n%spt%<tbody>,
PL:=RegExMatch(Clipboard,"\R")
StringLeft,LU,Clipboard,PL
StringTrimLeft,RE,Clipboard,PL
StringReplace,LU,LU,td>,th>,all
Clipboard:=LU . RE
Send %sp%<table cellspacing="0" summary="">{enter}%spt%<caption></caption>{enter}%spt%<thead>{enter}%spt%%s%<tr>{enter}%spt%%s%%s%<th>^v</td>{enter}%spt%%s%</tr>{enter}%spt%</tbody>{enter}%sp%</table>
Send % "{left 8}{up " 3*N+9 "}{right 32}"
}
Else
{
Send <table cellspacing="0" summary="">
GoSub !*
Send {%#% %u5%}<caption></caption>
GoSub !*
Send <thead>
GoSub !*
Send {%#% %u5%}<tr>
GoSub !*
Send {%#% %u5%}<th></th><th></th>
GoSub !*
Send {bs %u5%}</tr>
GoSub !*
Send {bs %u5%}</thead>
GoSub !*
Send <tbody>
GoSub !*
Send {%#% %u5%}<tr>
GoSub !*
Send {%#% %u5%}<td></td><td></td>
GoSub !*
Send {bs %u5%}</tr>
GoSub !*
Send {bs %u5%}</tbody>
GoSub !*
Send {bs %u5%}</table>{left 8}{up 12}{right 32}
}
Clipboard:=k
Return

67:
k:=ClipboardAll
Clipboard=
Send ^x<caption>^v</caption>
If StrLen(Clipboard)=0
 Send {left 10}
Clipboard:=k
Return

68:
k:=ClipboardAll
Clipboard=
Send ^x<td>^v</td>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

69:
k:=ClipboardAll
Clipboard=
Send ^x<thead>
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </thead>{up}{%#% %u5%}^v
Clipboard:=k
Return

70:
k:=ClipboardAll
Clipboard=
Send ^x<tfoot>
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </tfoot>{up}{%#% %u5%}^v
Clipboard:=k
Return

71:
k:=ClipboardAll
Clipboard=
Send ^x<th>^v</th>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

72:
k:=ClipboardAll
Clipboard=
Send ^x<col>^v</col>
If StrLen(Clipboard)=0
 Send {left 6}
Clipboard:=k
Return

73:
k:=ClipboardAll
Clipboard=
Send ^x<colgroup>^v</colgroup>
If StrLen(Clipboard)=0
 Send {left 11}
Clipboard:=k
Return

74:
k:=ClipboardAll
Clipboard=
Send ^x<tr>
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </tr>{up}{%#% %u5%}^v
Clipboard:=k
Return

75:
k:=ClipboardAll
Clipboard=
Send ^x<table cellspacing="0" summary="">
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </table>{left 8}{up}{%#% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 32}"
Clipboard:=k
Return

76:
k:=ClipboardAll
Clipboard=
Send ^x<tbody>
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </tbody>{up}{%#% %u5%}^v
Clipboard:=k
Return

; ############################################
; ## Objet ###################################
; ############################################

77:
Send <area shape="" coords="" href="" alt="" />{left 29}
Return

78:
k:=ClipboardAll
Clipboard=
Send ^x<button id="" name="" type="" value="">^v
Send % "</button>{left " StrLen(Clipboard)+36 "}"
Clipboard:=k
Return

79:
k:=ClipboardAll
Clipboard=
Send ^x<iframe src="" width="" height="" scrolling="" frameborder="">
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </iframe>{up}{%#% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 13}"
Clipboard:=k
Return

80:
k:=ClipboardAll
Clipboard=
Send ^x<fieldset>
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </fieldset>{up}^v
If StrLen(Clipboard)<>0
 Send {down}{end}
Clipboard:=k
Return

81:
k:=ClipboardAll
Clipboard=
Send ^x<form action="" method="">
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </form>{up}{%#% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 14}"
Clipboard:=k
Return

82:
Send <img src="" width="" height="" alt="" />{left 30}
Return

83:
Send <input id="" name="" type="" value="" />{left 29}
Return

84:
k:=ClipboardAll
Clipboard=
Send ^x<object id="" classid="" data="" type="">
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </object>{up}{%#% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 12}"
Clipboard:=k
Return

85:
k:=ClipboardAll
Clipboard=
Send ^x<label for="">^v</label>
Send % "{left " StrLen(Clipboard)+10 "}"
Clipboard:=k
Return

86:
k:=ClipboardAll
Clipboard=
Send ^x<map id="" name="">
y:=Clipboard
GoSub !*
GoSub !*
Send </map>
GoSub !*
Send <img src="" width="" height="" alt="" usemap="" />
Clipboard:=y
Send {home}{up 2}{%#% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 9}"
Clipboard:=k
Return

87:
k:=ClipboardAll
Clipboard=
Send ^x<legend>^v</legend>
If StrLen(Clipboard)=0
 Send {left 9}
Clipboard:=k
Return

88:
k:=ClipboardAll
Clipboard=
Send % "^x<option value="""">^v</option>{left " StrLen(Clipboard)+11 "}"
Clipboard:=k
Return

89:
k:=ClipboardAll
Clipboard=
Send ^x<param id="" name="" value="">
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </param>{up}{%#% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 11}"
Clipboard:=k
Return

90:
k:=ClipboardAll
Clipboard=
Send ^x<select id="" name="" size="">
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </select>{up}{%#% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 12}"
Clipboard:=k
Return

91:
k:=ClipboardAll
Clipboard=
Send ^x<optgroup label="">
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </optgroup>{up}{%#% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 17}"
Clipboard:=k
Return

92:
k:=ClipboardAll
Clipboard=
Send ^x<textarea rows="" cols="">^v
Send % "</textarea>{left " StrLen(Clipboard)+21 "}"
Clipboard:=k
Return

; ############################################
; ## Code ####################################
; ############################################

93:
k:=ClipboardAll
Clipboard=
Send ^x<abbr title="">^v</abbr>
If StrLen(Clipboard)!=0
 Send % "{left " StrLen(Clipboard)+9 "}"
If StrLen(Clipboard)=0
 Send {left 9}
Clipboard:=k
Return

94:
k:=ClipboardAll
Clipboard=
Send ^x<big>^v</big>
If StrLen(Clipboard)=0
 Send {left 6}
Clipboard:=k
Return

95:
k:=ClipboardAll
Clipboard=
Send ^x<code>^v</code>
If StrLen(Clipboard)=0
 Send {left 7}
Clipboard:=k
Return

96:
k:=ClipboardAll
Clipboard=
Send ^x<dfn>^v</dfn>
If StrLen(Clipboard)=0
 Send {left 6}
Clipboard:=k
Return

97:
k:=ClipboardAll
Clipboard=
Send ^x<kbd>^v</kbd>
If StrLen(Clipboard)=0
 Send {left 6}
Clipboard:=k
Return

98:
k:=ClipboardAll
Clipboard=
Send ^x<samp>^v</samp>
If StrLen(Clipboard)=0
 Send {left 7}
Clipboard:=k
Return

99:
k:=ClipboardAll
Clipboard=
Send ^x<pre>
y:=Clipboard
GoSub !*
GoSub !*
Clipboard:=y
Send </pre>{up}{%#% %u5%}^v
Clipboard:=k
Return

100:
k:=ClipboardAll
Clipboard=
Send ^x<small>^v</small>
If StrLen(Clipboard)=0
 Send {left 8}
Clipboard:=k
Return

101:
k:=ClipboardAll
Clipboard=
Send ^x<tt>^v</tt>
If StrLen(Clipboard)=0
 Send {left 5}
Clipboard:=k
Return

102:
k:=ClipboardAll
Clipboard=
Send ^x<var>^v</var>
If StrLen(Clipboard)=0
 Send {left 6}
Clipboard:=k
Return

103:
k:=ClipboardAll
Clipboard=
Send ^x<acronym title="">^v</acronym>
Send % "{left " StrLen(Clipboard)+12 "}"
Clipboard:=k
Return

; ############################################
; ## Modifications du clavier ################
; ############################################

104:
Send {asc 0160}         ; espace insécable
Return

105:                    ; guillemets français
k:=ClipboardAll
Clipboard=
Send ^x«{asc 0160}^v{asc 0160}»
If StrLen(Clipboard)=0
 Send {left 2}
Clipboard:=k
Return

; ############################################
; ## Signes spéciaux #########################
; ############################################

106:
Send &`;               ; & sur clavier AZERTY
Return

107:
Send &`;
Return

108:
Send <`;
Return

109:
Send &hellip`;            ; - sur clavier AZERTY
Return

110:
Send &hellip`;
Return

111:
Send æ`;
Return

112:
Send Æ`;
Return

113:
Send ©`;
Return

114:
Send &euro`;
Return

115:
Send £`;
Return

116:
Send &mdash`;
Return

117:
Send &ndash`;
Return

118:
Send &oelig`;
Return

119:
Send &OElig`;
Return

120:
Send Ç`;
Return

121:
Send ®`;
Return

122:
Send ½`;
Return

123:
Send ¼`;
Return

124:
Send ¾`;
Return

125:
Send ¥`;
Return

; ############################################
; ## Afficher l'heure et la date #############
; ############################################

AH:
FormatTime,h,,HH:mm - ddd dd MMM
Gui 2:+ToolWindow +AlwaysOnTop -SysMenu -Caption
Gui 2:Font,cFFFFFF s8,verdana
Gui 2:Color,CCCCCC
Gui 2:Add,Text,vHC y2,%h%
Gui 2:Show,AutoSize NoActivate xcenter y0 h18 W240,%h%
WinSet,TransColor,CCCCCC 255,: ahk_class AutoHotkeyGUI
SetTimer,T,30000
Return

T:
FormatTime,h,,HH:mm - ddd dd MMM
GuiControl,2:,HC,%h%
Return

; ############################################
; ## Signes doubles ##########################
; ############################################

126:                                   ; accolades sur clavier AZERTY
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x{asc 0123}^v{asc 0125}
If StrLen(Clipboard)=0
 Send {left}
Clipboard:=k
}
Else
 Send {asc 0123}
Return

127:                                   ; accolades
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x{asc 0123}^v{asc 0125}
If StrLen(Clipboard)=0
 Send {left}
Clipboard:=k
}
Else
 Send {asc 0123}
Return

128:                                   ; crochets sur clavier AZERTY
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x[^v]
If StrLen(Clipboard)=0
 Send {left}
Clipboard:=k
}
Else
 Send [
Return

129:                                   ; crochets
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x[^v]
If StrLen(Clipboard)=0
 Send {left}
Clipboard:=k
}
Else
 Send [
Return

130:                                   ; guillemets droits
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x"^v"
If StrLen(Clipboard)=0
 Send {left}
Clipboard:=k
}
Else
 Send "
Return

131:                                   ; parenthèses
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x(^v)
If StrLen(Clipboard)=0
 Send {left}
Clipboard:=k
}
Else
 Send (
Return

; ############################################

#Include remplacement.txt
English INI file (10 kb)

Enjoy!
Normand Lamoureux

ankhinc
  • Guests
  • Last active:
  • Joined: --
Hi, I'm eager to try the script, but I get the following errors when I try to run it on my US machine.

Posted Image
Shot at 2007-07-05

Posted Image
Shot at 2007-07-04

ankhinc
  • Guests
  • Last active:
  • Joined: --
Sorry, that was for the EXE from your website. But I also get similar errors when I run the AHK you posted.

Normand
  • Members
  • 90 posts
  • Last active: Aug 31 2015 10:53 AM
  • Joined: 21 May 2007
Thanks for your feedback, ankhinc.

I replaced ¶ by @. May be OK with this caracter.
Tell me if you encounter another problem.
Here is the new AHK file version code.

; © Normand Lamoureux, 2007
; K-html is a lightweight application to handcode HTML quickly in the text editor you want.
; This program is a free software under GNU GPLv.3 license.
; Last update: july, 5th 2007
; Website: http://normandlamoureux.com/k-html/
; Email: [email protected]

#NoEnv
Process Priority,,L
SetBatchLines -1
SetTitleMatchMode,2

Loop,37 {                              ; charge user options in memory
 IniRead,u%A_Index%,k-html.ini,usr,u%A_Index%
}
If u11=1                               ; set speed script running
 SetKeyDelay,,0
If u11=0
 SetKeyDelay,0,0
If u10=1                               ; show date and time
 GoSub AH
Loop,92 {                              ; charge GUI's texts to show
 IniRead,i%A_Index%,k-html.ini,i18n,i%A_Index%
}

; ###############
; ## Démarrage ##
; ###############

Menu,Tray,Tip,k-html %i92%             ; tray menu
Menu,Tray,NoStandard
Menu,Tray,Icon
Menu,Tray,Add,%i12%,Aide
Menu,Tray,Add,%i13%,Options
Menu,Tray,Add,%i14%,Quitter

If u4=1
 §=Space                               ; § stay for indentation spacing method
If u4=0
{
 §=Tab
 u5=1
}
If u1=0
 GoTo #a

^LWin::Return                          ; to prevent up moving caret in Notepad2

; ##############################
; ## Aide-mémoire - Interface ##
; ##############################

#a::
IfWinExist %i13%
 Gui Destroy
IfWinExist %i58%
 Gui Destroy
IfWinNotExist %i12%
{
Gui Font,,Tahoma
Gui Add,Tab,W254 H350,%i17%
Gui Add,Text,,%i18%`n%i19%`n%i20%`n%i21%`n`n%i22%`n`n%i23%`n%i24%`n%i25%`n`n%i26%`n%i27%`n%i28%`n%i29%`n`n%i30%`n%i31%`n`n%i32%`n%i33%`n%i34%
Gui Font,Norm
Gui Tab,2
Gui Add,Text,,DTD XHTML 1.0 Strict   %i10% + %i6%`n<!--  -->`t`t%i10% + <`n`nhtml`t`t`t%i10% + H`nhead`t`t`t%i10% + E`ntitle`t`t`t%i10% + T`nbody`t`t`t%i10% + B`n`nbase`t`t`t%i10% + A`nbdo`t`t`t%i10% + D`n`nlink`t`t`t%i10% + L`nmeta`t`t`t%i10% + M`nstyle`t`t`t%i10% + Y`n`nnoscript`t`t`t%i10% + N`nscript`t`t`t%i10% + S`n`n`n------------`n%i35%`n%i36%
Gui Tab,3
Gui Add,Text,,h1`t`t`t%i11% + %i8% + 1`nh2`t`t`t%i11% + %i8% + 2`nh3`t`t`t%i11% + %i8% + 3`nh4`t`t`t%i11% + %i8% + 4`nh5`t`t`t%i11% + %i8% + 5`nh6`t`t`t%i11% + %i8% + 6`n`naddress`t`t`t%i11% + %i8% + A`nblockquote`t`t%i11% + %i8% + B`np`t`t`t%i11% + %i8% + P`n`nbr         %i11% + %i8% + %i5%`nhr         %i11% + %i8% + %i6%`n`nol`t`t`t%i11% + %i8% + O`nul`t`t`t%i11% + %i8% + U`nli`t`t`t%i11% + %i8% + I`ndl`t`t`t%i11% + %i8% + L`ndt`t`t`t%i11% + %i8% + T`ndd`t`t`t%i11% + %i8% + D`n`ndiv`t`t`t%i11% + %i8% + V
Gui Tab,4
Gui Add,Text,,del`t`t`t%i11% + %i3% + -`nins`t`t`t%i11% + %i3% + =`n`na`t`t`t%i11% + %i3% + A`n`nsub`t`t`t%i11% + %i3% + B`nsup`t`t`t%i11% + %i3% + P`n`nem`t`t`t%i11% + %i3% + E`nstrong`t`t`t%i11% + %i3% + S`nb`t`t`t%i11% + %i3% + G`ni`t`t`t%i11% + %i3% + I`n`ncite`t`t`t%i11% + %i3% + C`nq`t`t`t%i11% + %i3% + Q`n`nspan`t`t`t%i11% + %i3% + N`n`n`n------------`n%i37%`n%i38%
Gui Tab,5
Gui Add,Text,,table`t`t`t%i2% + T`ncaption`t`t`t%i2% + C`n`nthead`t`t`t%i2% + E`ntfoot`t`t`t%i2% + F`ntbody`t`t`t%i2% + Y`n`ntr`t`t`t%i2% + R`ntd`t`t`t%i2% + D`nth`t`t`t%i2% + H`n`ncol`t`t`t%i2% + L`ncolgroup`t`t%i2% + P`n`n`n`n`n`n------------`n%i39%`n%i40%`n%i41%
Gui Tab,6
Gui Add,Text,,map`t`t`t%i9% + M`narea`t`t`t%i9% + A`n`nimg`t`t`t%i9% + G`n`niframe`t`t`t%i9% + C`nobject`t`t`t%i9% + J`nparam`t`t`t%i9% + P`n`nform`t`t`t%i9% + F`nfieldset`t`t`t%i9% + D`nlegend`t`t`t%i9% + N`n`nlabel`t`t`t%i9% + L`n`nbutton`t`t`t%i9% + B`ninput`t`t`t%i9% + I`noption`t`t`t%i9% + O`n`noptgroup`t`t%i9% + T`nselect`t`t`t%i9% + S`ntextarea`t`t%i9% + X
Gui Tab,7
Gui Add,Text,,abbr`t`t`t%i11% + %i1% + A`nacronym`t`t%i11% + %i1% + Y`n`ndfn`t`t`t%i11% + %i1% + D`nvar`t`t`t%i11% + %i1% + V`n`nbig`t`t`t%i11% + %i1% + B`nsmall`t`t`t%i11% + %i1% + S`n`ncode`t`t`t%i11% + %i1% + C`nkbd`t`t`t%i11% + %i1% + K`nsamp`t`t`t%i11% + %i1% + M`npre`t`t`t%i11% + %i1% + P`ntt`t`t`t%i11% + %i1% + T`n`n%i42%`n%i43%`n`n`n------------`n%i44%`n%i45%
Gui Tab,8
Gui Add,Text,,&&`;`t`t&&`t%i4% + &&`n&<`;`t`t<`t%i4% + <`n&&hellip`;`t`t…`t%i4% + -`n`n&æ`;`t`tæ`t%i4% + A`n&Æ`;`t`tÆ`t%i4% + B`n&©`;`t`t©`t%i4% + C`n&&euro`;`t`t€`t%i4% + E`n`n&£`;`t£`t%i4% + L`n&&mdash`;`t—`t%i4% + M`n&&ndash`;`t–`t%i4% + N`n`n&&oelig`;`t`tœ`t%i4% + O`n&&OElig`;`t`tŒ`t%i4% + P`n&Ç`;`t`tÇ`t%i4% + Q`n&®`;`t`t®`t%i4% + R`n`n&½`;`t½`t%i4% + V`n&¼`;`t¼`t%i4% + W`n&¾`;`t¾`t%i4% + X`n&¥`;`t`t¥`t%i4% + Y
Gui Tab,9
Gui Font,s10 W600,Verdana
Gui Add,Text,,k-html %i92%
Gui Font,s8 W400,Tahoma
Gui Add,Text,,© Normand Lamoureux, 2007
Gui Font,Underline
Gui Add,Text,yp+14 cBlue gLink1 vURL_Link1 tabstop,http://normandlamoureux.com/k-html/
Gui Font,Norm
Gui Add,Text,Norm,%i46%
Gui Font,Underline
Gui Add,Text,yp+14 cBlue gLink2 vURL_Link2 tabstop,http://www.gnu.org/licenses/gpl.txt
Gui Font,Norm
Gui Add,Text,,%i47%
Gui Font,Underline
Gui Add,Text,yp+14 cBlue gLink3 vURL_Link3 tabstop,http://www.autohotkey.com/
Gui Font,Norm
Gui Add,Text,yp+30,%i48%`n%i49%`n%i50%`n%i51%`n%i52%`n%i53%`n%i54%`n%i55%`n%i56%`n%i57%
Gui Tab
Gui Add,Checkbox,xp-12 yp+154 gAD vu1 Checked%u1%,%i15%
Gui Add,Button,vfer xp+184 W70 Default,Fermer
 GuiControl,,fer,%i16%
Gui Show,,%i12% - khtml
Return
}
Gui Destroy
Return

; ##############################
; ## Aide-mémoire - Contrôles ##
; ##############################

AD:                                    ; do not show at starting
GuiControlGet,u1,,u1
IniWrite,%u1%,k-html.ini,usr,u1
Return

Aide:
IfWinExist %i13%
 Gui Destroy
IfWinExist %i12%
 WinActivate
IfWinNotExist %i12%
 Send #a
Return

GuiClose:
GuiEscape:
ButtonFermer:
ButtonAnnuler:
 Gui Destroy
Return

Link1:
Run http://normandlamoureux.com/k-html/
Return

Link2:
Run http://www.gnu.org/licenses/gpl.txt
Return

Link3:
Run http://www.autohotkey.com/
Return

; #########################################
; ## Insertions automatiques - Interface ##
; #########################################

#i::
IfWinExist %i12%
 Gui Destroy
IfWinExist %i13%
 Gui Destroy
IfWinExist %i58%
 WinActivate
IfWinNotExist %i58%
{
Loop,37
 {
 If A_Index < 12
  Continue
 If A_Index >= 12
  IniRead,u%A_Index%,k-html.ini,usr,u%A_Index%
 }
Gui Add,text,y+12,%i59%
Gui Add,Edit,yp+16 W550 vChaine
Gui Add,ListView,gListe y+12 R15 W550 Grid Sort,%i60%
val:=i7 . " + A"
LV_Add("",val,u12)
val:=i7 . " + B"
LV_Add("",val,u13)
val:=i7 . " + C"
LV_Add("",val,u14)
val:=i7 . " + D"
LV_Add("",val,u15)
val:=i7 . " + E"
LV_Add("",val,u16)
val:=i7 . " + F"
LV_Add("",val,u17)
val:=i7 . " + G"
LV_Add("",val,u18)
val:=i7 . " + H"
LV_Add("",val,u19)
val:=i7 . " + I"
LV_Add("",val,u20)
val:=i7 . " + J"
LV_Add("",val,u21)
val:=i7 . " + K"
LV_Add("",val,u22)
val:=i7 . " + L"
LV_Add("",val,u23)
val:=i7 . " + M"
LV_Add("",val,u24)
val:=i7 . " + N"
LV_Add("",val,u25)
val:=i7 . " + O"
LV_Add("",val,u26)
val:=i7 . " + P"
LV_Add("",val,u27)
val:=i7 . " + Q"
LV_Add("",val,u28)
val:=i7 . " + R"
LV_Add("",val,u29)
val:=i7 . " + S"
LV_Add("",val,u30)
val:=i7 . " + T"
LV_Add("",val,u31)
val:=i7 . " + U"
LV_Add("",val,u32)
val:=i7 . " + V"
LV_Add("",val,u33)
val:=i7 . " + W"
LV_Add("",val,u34)
val:=i7 . " + X"
LV_Add("",val,u35)
val:=i7 . " + Y"
LV_Add("",val,u36)
val:=i7 . " + Z"
LV_Add("",val,u37)
Gui Add,Button,vi61 y+22 W80,Enr
 GuiControl,,i61,%i61%
Gui Add,Button,vi62 xp+87 W80 Default,Modif
 GuiControl,,i62,%i62%
Gui Add,Button,vOKi W80 xp+296,OKi
 GuiControl,,OKi,%i63%
Gui Add,Button,vNul W80 xp+87,Annuler
 GuiControl,,Nul,%i64%
Gui Show,,%i58%
}
Return

; #########################################
; ## Insertions automatiques - Contrôles ##
; #########################################

ButtonEnr:
ligne:=LV_GetNext(0,"F")
If ligne=0
{
 MsgBox,48,%i65%,%i66%
 Return
}
Gui Submit
ligne:=ligne+11
If ligne < 38
{
 IniWrite,%Chaine%,k-html.ini,usr,u%ligne%
 Gui Destroy
 Send #i
}
Return

ButtonModif:
ligne:=LV_GetNext(0,"F")
If ligne=0
{
 MsgBox,48,%i65%,%i66%
 Return
}
ControlGet,l,List,Focused,SysListView321,%i58%
p:=RegExMatch(l,"`t")
StringTrimLeft,cd,l,%p%
GuiControl,,Chaine,%cd%
Return

ButtonOKi:
ligne:=LV_GetNext(0,"F")
If ligne=0
 Gui Destroy
If ligne!=0
{
Gui Submit
ligne:=ligne+11
IniWrite,%Chaine%,k-html.ini,usr,u%ligne%
}
Return

Liste:
If A_GuiEvent=DoubleClick
 GoTo ButtonModif
Return

; ############################
; ## Options... - Interface ##
; ############################

#o::
Options:
IfWinExist %i12%
 Gui Destroy
IfWinExist %i13%
 WinActivate
IfWinExist %i58%
 Gui Destroy
IfWinNotExist %i13%
{
If u3=utf-8
 f:=1
If u3=iso-8859-1
 f:=2
If u3=windows-1252
 f:=3
IniRead,u7,k-html.ini,usr,u7,C:\WINDOWS\NOTEPAD.EXE
IniRead,u8,k-html.ini,usr,u8,C:\Program Files\Internet Explorer\iexplore.exe
IniRead,u9,k-html.ini,usr,u9,k-html.txt
u7c:=RegExMatch(u7,"i)[^\\]*\.exe")-1
 StringTrimLeft u7c,u7,%u7c%
u8c:=RegExMatch(u8,"i)[^\\]*\.exe")-1
 StringTrimLeft u8c,u8,%u8c%
pc:=RegExMatch(u9,"[^\\]*\..{2,5}")-1
 StringTrimLeft pc,u9,%pc%
Gui Add,Tab,w254 h170,%i67%
Gui Add,Text,,%i68%
Gui Add,Edit,vu2 W30 +Lowercase Limit3,%u2%
Gui Font,Underline
Gui Add,Text,xp+40 yp+7 cBlue gLink4 vURL_Link4 tabstop,code iso-639-1
Gui Font,Norm
Gui Add,Text,xp-40 yp+16,`n%i69%
Gui Add,DDL,vu3 Choose%f%,utf-8|iso-8859-1|windows-1252
Gui Tab,2
Gui Add,Checkbox,gID vu4 Checked%u4%,%i70%`n%i71%`n
Gui Add,Text,,`n%i72%
If u4=1
 Gui Add,Edit,vu5 W30 +Number Limit2,%u5%
If u4=0
 Gui Add,Edit,vu5 W30 +Number Limit2 ReadOnly,2
Gui Tab,3
Gui Add,Checkbox,vu6 Checked%u6%,%i73%`n%i74%`n
Gui Add,Text,,`n%i75%`n%i76%`n%i77%
Gui Tab,4
Gui Add,Text,,%i78%`n%i79%`n
Gui Add,Button,vu7 W90 Default,P1
 GuiControl,,u7,%i80%
Gui Add,Text,vtu7 W238,`n%i81% %u7c%
Gui Tab,5
Gui Add,Text,,%i82%`n%i83%`n
Gui Add,Button,vu8 W90 Default,P2
 GuiControl,,u8,%i80%
Gui Add,Text,vtu8 W238,`n%i81% %u8c%
Gui Tab,6
Gui Add,Text,,%i84%`n%i85%`n
Gui Add,Button,vu9 W90 Default,P3
 GuiControl,,u9,%i80%
Gui Add,Text,vtu9 W238,`n%i81% %pc%
Gui Tab,7
Gui Add,Checkbox,vu10 Checked%u10%,`n%i86%`n`n
Gui Tab,8
Gui Add,Checkbox,vu11 Checked%u11%,%i87%`n%i88%`n
Gui Add,Text,,`n`n%i89%`n%i90%
Gui Tab
Gui Add,Button,vOk W70 x117 Default,OK
 GuiControl,,Ok,%i63%
Gui Add,Button,xp+77 W70,%i64%
Gui Show,,%i13%
}
Return

; ############################
; ## Options... - Contrôles ##
; ############################

ButtonOK:
Gui Submit
IniWrite %u2%,k-html.ini,usr,u2
IniWrite %u3%,k-html.ini,usr,u3
IniWrite %u6%,k-html.ini,usr,u6
IniWrite %u4%,k-html.ini,usr,u4
IniWrite %u5%,k-html.ini,usr,u5
IniWrite %u10%,k-html.ini,usr,u10
IniWrite %u11%,k-html.ini,usr,u11
If u4=1
 §=space
If u4=0
{
 §=tab
 u5=1
}
Gui Destroy
Return

ButtonP1:
FileSelectFile u7,s,,,*.exe
If u7=
 Return
Else
{
 IniWrite %u7%,k-html.ini,usr,u7
 k:=RegExMatch(u7,"i)[^\\]*\.exe")-1
 StringTrimLeft u7c,u7,%k%
 GuiControl,Text,tu7,`n%i81% %u7c%
}
Return

ButtonP2:
FileSelectFile u8,s,,,*.exe
If u8=
 Return
Else
{
 IniWrite %u8%,k-html.ini,usr,u8
 k:=RegExMatch(u8,"i)[^\\]*\.exe")-1
 StringTrimLeft u8c,u8,%k%
 GuiControl,Text,tu8,`n%i81% %u8c%
}
Return

ButtonP3:
FileSelectFile u9
If u9=
 Return
Else
{
 IniWrite %u9%,k-html.ini,usr,u9
 k:=RegExMatch(u9,"[^\\]*\..{2,5}")-1
 StringTrimLeft pc,u9,%k%
 GuiControl,Text,tu9,`n%i81% %pc%
}
Return

ID:
GuiControlGet,u4,,u4
If u4=1
 GuiControl,-ReadOnly,u5
If u4=0
 GuiControl,+ReadOnly,u5
Return

Link4:
Run http://fr.wikipedia.org/wiki/ISO_639
Return

Quitter:
#q::
MsgBox 4,,%i91%
IfMsgBox No
 Return
IfMsgBox Yes
 exitapp
Return

; #############
; ## Général ##
; #############

[email protected]::                                   ; subroutine to call to create new indented line
Clipboard=
Send {enter}{up}+{end}^c{end}{down}{home}
p:=RegExMatch(Clipboard,"\S")
If p=0                                 ; if the starting line is empty
 Send ^v
If p>1                                 ; if the starting line begin with 1 or more space
{
 Send % "{up}{home 2}+{right " p-1 "}"
 Send ^c{end}{down}{home}^v
}
Return

#enter::                               ; user command to create a new indented line
k:=ClipboardAll
Clipboard=
Send {enter}{up}+{end}^c{end}{down}{home}
p:=RegExMatch(Clipboard,"\S")
If p=0
 Send ^v
If p>1
{
 Send % "{up}{home 2}+{right " p-1 "}"
 Send ^c{end}{down}{home}^v
}
Clipboard:=k
Return

#n::Run "%u8%"

#p::
FileRead,Clipboard,%u9%
Send ^v
Return

#t::Run "%u7%"

AppsKey & Tab::
KeyWait AppsKey
Send ^f=""{enter}{esc 3}{right}{left}
Return

Appskey::Send {appskey}                ; to preserve normal AppsKey use

RAlt & Tab::
KeyWait RAlt
k:=ClipboardAll
Clipboard=
Send +^{left}^x<^v></^v>
Send % "{left " StrLen(Clipboard)+3 "}"
Clipboard:=k
Return

RCtrl & Tab::
KeyWait RCtrl
Send ^f></{enter}{esc 3}{right}{left 2}
Return

RCtrl & c::
KeyWait RCtrl
Send {space}class=""{left}
Return

RCtrl & i::
KeyWait RCtrl
Send {space}id=""{left}
Return

RCtrl & l::
KeyWait RCtrl
Send {space}xml:lang="" lang=""{left 9}
Return

RCtrl & s::
KeyWait RCtrl
Send {space}style=""{left}
Return

RCtrl & d::
KeyWait RCtrl
FormatTime date,YYYYMMDDHH24MISS,yyyy-MM-dd
Send %date%
Return

; ###############
; ## Meta #######
; ###############

CapsLock & <::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<{!}--  -->{left 4}^v
Clipboard:=k
Return

CapsLock & Space::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send % "^x<{!}DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">{enter}<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""" u2 """ lang=""" u2 """>{enter}<head>{enter}"
Send {%§% %u5%}
Send % "<meta http-equiv=""content-type"" content=""text/html; charset=" u3 """ />{enter}"
Send {%§% %u5%}<title></title>{enter}{%§% %u5%}<meta http-equiv="content-style-type" content="text/css" />{enter}</head>{enter}<body>{enter}{%§% %u5%}^v{enter}</body>{enter}</html>^{home}{down 4}{right %u5%}{right 7}
Clipboard:=k
Return

CapsLock & a::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<base href="^v" />{left 4}
Clipboard:=k
Return

CapsLock & b::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<body>{enter 2}</body>{up}{%§% %u5%}^v
Clipboard:=k
Return

CapsLock & c::
KeyWait CapsLock
k:=ClopboardAll
Clipboard=
Send ^x<{!}--[if lte IE 6]>^v<{!}[endif]-->{left 12}
Clipboard:=k
Return

CapsLock & d::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<bdo dir="">^v</bdo>
Send % "{left " StrLen(Clipboard)+8 "}"
Clipboard:=k
Return

CapsLock & e::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<head>{enter 2}</head>{up}{%§% %u5%}^v
Clipboard:=k
Return

CapsLock & h::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<html>{enter 2}</html>{up}^v
Clipboard:=k
Return

CapsLock & l::
KeyWait CapsLock
Send <link rel="" type="" href="" />{left 20}
Return

CapsLock & m::
KeyWait CapsLock
Send <meta http-equiv="" content="" />{left 15}
Return

CapsLock & n::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<noscript>
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </noscript>{up}{%§% %u5%}^v
Clipboard:=k
Return

CapsLock & s::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<script type="">
y:=Clipboard
GoSub [email protected]
Send {%§% %u5%}<{!}[CDATA[
GoSub [email protected]
GoSub [email protected]
Send ]]>
GoSub [email protected]
Clipboard:=y
Send {bs %u5%}</script>{up 2}{end}^v
Send % "{left " StrLen(y)+u5 "}{up 2}{right 14}"
Clipboard:=k
Return

CapsLock & t::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<title>^v</title>{left 8}
Clipboard:=k
Return

CapsLock & y::
KeyWait CapsLock
k:=ClipboardAll
Clipboard=
Send ^x<style type="text/css" media="screen">
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </style>{up}{%§% %u5%}^v
Clipboard:=k
Return

; ###############
; ## Structure ##
; ###############

+#1::
k:=ClipboardAll
Clipboard=
Send ^x<h1>^v</h1>{left 5}
Clipboard:=k
Return

+#2::
k:=ClipboardAll
Clipboard=
Send ^x<h2>^v</h2>{left 5}
Clipboard:=k
Return

+#3::
k:=ClipboardAll
Clipboard=
Send ^x<h3>^v</h3>{left 5}
Clipboard:=k
Return

+#4::
k:=ClipboardAll
Clipboard=
Send ^x<h4>^v</h4>{left 5}
Clipboard:=k
Return

+#5::
k:=ClipboardAll
Clipboard=
Send ^x<h5>^v</h5>{left 5}
Clipboard:=k
Return

+#6::
k:=ClipboardAll
Clipboard=
Send ^x<h6>^v</h6>{left 5}
Clipboard:=k
Return

+#a::
k:=ClipboardAll
Clipboard=
Send ^x<address>
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </address>{up}{%§% %u5%}^v
Clipboard:=k
Return

+#b::
k:=ClipboardAll
Clipboard=
Send ^x<blockquote cite="">
y:=Clipboard
GoSub [email protected]
Send {%§% %u5%}<p>«{asc 0160}{asc 0160}»</p>
GoSub [email protected]
Send <p><cite></cite></p>
GoSub [email protected]
Clipboard:=y
Send {bs %u5%}</blockquote>{left 13}{up 2}{right 5}{right %u5%}^v
Send % "{left " StrLen(y)+5 "}"
Send {left %u5%}{up}{right 18}
Clipboard:=k
Return

+#d::
k:=ClipboardAll
Clipboard=
Send ^x<dd>^v</dd>{left 5}
Clipboard:=k
Return

+#enter::Send 

+#i::
k:=ClipboardAll
Clipboard=
Send ^x<li>^v</li>{left 5}
Clipboard:=k
Return

+#l::
k:=ClipboardAll
Clipboard=
Send ^x<dl>
y:=Clipboard
GoSub [email protected]
Send {%§% %u5%}<dt></dt>
GoSub [email protected]
Send <dd></dd>
GoSub [email protected]
Clipboard:=y
Send {bs %u5%}</dl>{left 5}{up 2}{right %u5%}{right 4}^v
Clipboard:=k
Return

+#o::
k:=ClipboardAll
Clipboard=
Send ^x
lst:=Clipboard
IfInString,Clipboard,`r`n
{
db:=RegExMatch(Clipboard,"\S")
StringLeft,sp,Clipboard,db-1
Send %sp%{%§% %u5%}+{home 2}^x
spt:=Clipboard
Clipboard:=lst
Clipboard:=RegExReplace(Clipboard,"^[\s]*","")
Clipboard:=RegExReplace(Clipboard,"([\s]*)$","")
Clipboard:=RegExReplace(Clipboard,"[\s]*`r`n[\s]*","</li>`r`n<li>")
StringReplace,Clipboard,Clipboard,<li>,%spt%<li>,all
Send %sp%<ol>{enter}%spt%<li>^v</li>{enter}%sp%</ol>
}
Else
{
Send <ol>
GoSub [email protected]
Send {%§% %u5%}<li></li>
GoSub [email protected]
Clipboard:=lst
Send {bs %u5%}</ol>{left 5}{up}{right %u5%}{right 4}^v
}
Clipboard:=k
Return

+#p::
k:=ClipboardAll
Clipboard=
Send ^x<p>^v</p>{left 4}
Clipboard:=k
Return

+#space::
Send <hr />
Return

+#t::
k:=ClipboardAll
Clipboard=
Send ^x<dt>^v</dt>{left 5}
Clipboard:=k
Return

+#u::
k:=ClipboardAll
Clipboard=
Send ^x
lst:=Clipboard
IfInString,Clipboard,`r`n
{
db:=RegExMatch(Clipboard,"\S")
StringLeft,sp,Clipboard,db-1
Send %sp%{%§% %u5%}+{home 2}^x
spt:=Clipboard
Clipboard:=lst
Clipboard:=RegExReplace(Clipboard,"^[\s]*","")
Clipboard:=RegExReplace(Clipboard,"([\s]*)$","")
Clipboard:=RegExReplace(Clipboard,"[\s]*`r`n[\s]*","</li>`r`n<li>")
StringReplace,Clipboard,Clipboard,<li>,%spt%<li>,all
Send %sp%<ul>{enter}%spt%<li>^v</li>{enter}%sp%</ul>
}
Else
{
Send <ul>
GoSub [email protected]
Send {%§% %u5%}<li></li>
GoSub [email protected]
Clipboard:=lst
Send {bs %u5%}</ul>{left 5}{up}{right %u5%}{right 4}^v
}
Clipboard:=k
Return

+#v::
k:=ClipboardAll
Clipboard=
Send ^x<div>
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </div>{up}{%§% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 5}"
Clipboard:=k
Return

; ###############
; ## Édition ####
; ###############

^#-::
k:=ClipboardAll
Clipboard=
Send ^x<del>^v</del>{left 6}
Clipboard:=k
Return

^#6::
k:=ClipboardAll
Clipboard=
Send ^x<del>^v</del>{left 6}
Clipboard:=k
Return

^#=::
k:=ClipboardAll
Clipboard=
Send ^x<ins>^v</ins>{left 6}
Clipboard:=k
Return

^#a::
k:=ClipboardAll
Clipboard=
Send ^x<a href="">^v
Send % "</a>{left " StrLen(Clipboard)+6 "}"
Clipboard:=k
Return

^#b::
k:=ClipboardAll
Clipboard=
Send ^x<sub>^v</sub>{left 6}
Clipboard:=k
Return

^#c::
k:=ClipboardAll
Clipboard=
Send ^x<cite>^v</cite>{left 7}
Clipboard:=k
Return

^#e::
k:=ClipboardAll
Clipboard=
Send ^x<em>^v</em>{left 5}
Clipboard:=k
Return

^#g::
k:=ClipboardAll
Clipboard=
Send ^x<b>^v</b>{left 4}
Clipboard:=k
Return

^#i::
k:=ClipboardAll
Clipboard=
Send ^x<i>^v</i>{left 4}
Clipboard:=k
Return

^#n::
k:=ClipboardAll
Clipboard=
Send ^x<span>^v</span>
Send % "{left " StrLen(Clipboard)+7 "}"
Clipboard:=k
Return

^#p::
k:=ClipboardAll
Clipboard=
Send ^x<sup>^v</sup>{left 6}
Clipboard:=k
Return

^#q::
k:=ClipboardAll
Clipboard=
Send ^x<q cite="">«{asc 0160}^v{asc 0160}»</q>
Send % "{left " StrLen(Clipboard)+10 "}"
Clipboard:=k
Return

^#s::
k:=ClipboardAll
Clipboard=
Send ^x<strong>^v</strong>{left 9}
Clipboard:=k
Return

; ###############
; ## Tableau ####
; ###############

RAlt & a::
KeyWait RAlt
k:=ClipboardAll
Clipboard=
Send ^x
tb:=Clipboard
IfInString,Clipboard,`r`n
{
d:=RegExMatch(Clipboard,"\S")
StringLeft,sp,Clipboard,d-1
Send %sp%{%§% %u5%}+{home 2}^x
spt:=Clipboard
Send {%§% %u5%}+{home 2}^x
s:=Clipboard
Clipboard:=tb
Clipboard:=RegExReplace(Clipboard,"^[\s]*","")
Clipboard:=RegExReplace(Clipboard,"([\s]*)$","")
Clipboard:=RegExReplace(Clipboard,"[\s]*`t","`t")
Clipboard:=RegExReplace(Clipboard,"`t[\s]*","`t")
Clipboard:=RegExReplace(Clipboard,"[\s]*`r`n[\s]*","</td>`r`n</tr>`r`n<tr>`r`n<td>",N)
StringReplace,Clipboard,Clipboard,%A_Tab%,</td><td>,all
StringReplace,Clipboard,Clipboard,<tr>`r`n<td>,%spt%%s%<tr>`r`n%spt%%s%%s%<td>,all
StringReplace,Clipboard,Clipboard,</tr>,%spt%%s%</tr>,all
StringReplace,Clipboard,Clipboard,</tr>,</tr>`r`n%spt%</thead>`r`n%spt%<tbody>,
PL:=RegExMatch(Clipboard,"\R")
StringLeft,LU,Clipboard,PL
StringTrimLeft,RE,Clipboard,PL
StringReplace,LU,LU,td>,th>,all
Clipboard:=LU . RE
Send %sp%<table cellspacing="0" summary="">{enter}%spt%<caption></caption>{enter}%spt%<thead>{enter}%spt%%s%<tr>{enter}%spt%%s%%s%<th>^v</td>{enter}%spt%%s%</tr>{enter}%spt%</tbody>{enter}%sp%</table>
Send % "{left 8}{up " 3*N+9 "}{right 32}"
}
Else
{
Send <table cellspacing="0" summary="">
GoSub [email protected]
Send {%§% %u5%}<caption></caption>
GoSub [email protected]
Send <thead>
GoSub [email protected]
Send {%§% %u5%}<tr>
GoSub [email protected]
Send {%§% %u5%}<th></th><th></th>
GoSub [email protected]
Send {bs %u5%}</tr>
GoSub [email protected]
Send {bs %u5%}</thead>
GoSub [email protected]
Send <tbody>
GoSub [email protected]
Send {%§% %u5%}<tr>
GoSub [email protected]
Send {%§% %u5%}<td></td><td></td>
GoSub [email protected]
Send {bs %u5%}</tr>
GoSub [email protected]
Send {bs %u5%}</tbody>
GoSub [email protected]
Send {bs %u5%}</table>{left 8}{up 12}{right 32}
}
Clipboard:=k
Return

RAlt & c::
k:=ClipboardAll
Clipboard=
Send ^x<caption>^v</caption>{left 10}
Clipboard:=k
Return

RAlt & d::
k:=ClipboardAll
Clipboard=
Send ^x<td>^v</td>{left 5}
Clipboard:=k
Return

RAlt & e::
k:=ClipboardAll
Clipboard=
Send ^x<thead>
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </thead>{up}{%§% %u5%}^v
Clipboard:=k
Return

RAlt & f::
k:=ClipboardAll
Clipboard=
Send ^x<tfoot>
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </tfoot>{up}{%§% %u5%}^v
Clipboard:=k
Return

RAlt & h::
k:=ClipboardAll
Clipboard=
Send ^x<th>^v</th>{left 5}
Clipboard:=k
Return

RAlt & l::
k:=ClipboardAll
Clipboard=
Send ^x<col>^v</col>{left 6}
Clipboard:=k
Return

RAlt & p::
k:=ClipboardAll
Clipboard=
Send ^x<colgroup>^v</colgroup>{left 11}
Clipboard:=k
Return

RAlt & r::
k:=ClipboardAll
Clipboard=
Send ^x<tr>
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </tr>{up}{%§% %u5%}^v
Clipboard:=k
Return

RAlt & t::
k:=ClipboardAll
Clipboard=
Send ^x<table cellspacing="0" summary="">
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </table>{left 8}{up}{%§% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 32}"
Clipboard:=k
Return

RAlt & y::
k:=ClipboardAll
Clipboard=
Send ^x<tbody>
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </tbody>{up}{%§% %u5%}^v
Clipboard:=k
Return

; ###############
; ## Objet ######
; ###############

Appskey & a::Send <area shape="" coords="" href="" alt="" />{left 29}

Appskey & b::
k:=ClipboardAll
Clipboard=
Send ^x<Button id="" name="" type="" value="">^v
Send % "</Button>{left " StrLen(Clipboard)+36 "}"
Clipboard:=k
Return

Appskey & c::
k:=ClipboardAll
Clipboard=
Send ^x<iframe src="" width="" height="" scrolling="" frameborder="">
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </iframe>{up}{%§% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 13}"
Clipboard:=k
Return

Appskey & d::
k:=ClipboardAll
Clipboard=
Send ^x<fieldset>
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </fieldset>{up}{%§% %u5%}^v
Clipboard:=k
Return

Appskey & f::
k:=ClipboardAll
Clipboard=
Send ^x<form action="" method="">
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </form>{up}{%§% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 14}"
Clipboard:=k
Return

Appskey & g::Send <img src="" width="" height="" alt="" />{left 30}
Appskey & i::Send <input id="" name="" type="" value="" />{left 29}

Appskey & j::
k:=ClipboardAll
Clipboard=
Send ^x<object id="" classid="" data="" type="">
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </object>{up}{%§% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 12}"
Clipboard:=k
Return

Appskey & l::
k:=ClipboardAll
Clipboard=
Send ^x<label for="">^v</label>
Send % "{left " StrLen(Clipboard)+10 "}"
Clipboard:=k
Return

Appskey & m::
k:=ClipboardAll
Clipboard=
Send ^x<map id="" name="">
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Send </map>
GoSub [email protected]
Send <img src="" width="" height="" alt="" usemap="" />
Clipboard:=y
Send {home}{up 2}{%§% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 9}"
Clipboard:=k
Return

Appskey & n::
k:=ClipboardAll
Clipboard=
Send ^x<legend>^v</legend>{left 9}
Clipboard:=k
Return

Appskey & o::
k:=ClipboardAll
Clipboard=
Send % "^x<option value="""">^v</option>{left " StrLen(Clipboard)+11 "}"
Clipboard:=k
Return

Appskey & p::
k:=ClipboardAll
Clipboard=
Send ^x<param id="" name="" value="">
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </param>{up}{%§% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 11}"
Clipboard:=k
Return

Appskey & t::
k:=ClipboardAll
Clipboard=
Send ^x<optgroup label="">
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </optgroup>{up}{%§% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 17}"
Clipboard:=k
Return

Appskey & s::
k:=ClipboardAll
Clipboard=
Send ^x<select id="" name="" size="">
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </select>{up}{%§% %u5%}^v
Send % "{left " StrLen(y)+u5 "}{up}{right 12}"
Clipboard:=k
Return

Appskey & x::
k:=ClipboardAll
Clipboard=
Send ^x<textarea rows="" cols="">^v
Send % "</textarea>{left " StrLen(Clipboard)+21 "}"
Clipboard:=k
Return

; ###############
; ## Code #######
; ###############

!#a::
k:=ClipboardAll
Clipboard=
Send ^x<abbr title="">^v
Send % "</abbr>{left " StrLen(Clipboard)+26 "}"
Clipboard:=k
Return

!#b::
k:=ClipboardAll
Clipboard=
Send ^x<big>^v</big>{left 6}
Clipboard:=k
Return

!#c::
k:=ClipboardAll
Clipboard=
Send ^x<code>^v</code>{left 7}
Clipboard:=k
Return

!#d::
k:=ClipboardAll
Clipboard=
Send ^x<dfn>^v</dfn>{left 6}
Clipboard:=k
Return

!#k::
k:=ClipboardAll
Clipboard=
Send ^x<kbd>^v</kbd>{left 6}
Clipboard:=k
Return

!#m::
k:=ClipboardAll
Clipboard=
Send ^x<samp>^v</samp>{left 7}
Clipboard:=k
Return

!#p::
k:=ClipboardAll
Clipboard=
Send ^x<pre>
y:=Clipboard
GoSub [email protected]
GoSub [email protected]
Clipboard:=y
Send </pre>{up}{%§% %u5%}^v
Clipboard:=k
Return

!#s::
k:=ClipboardAll
Clipboard=
Send ^x<small>^v</small>{left 8}
Clipboard:=k
Return

!#t::
k:=ClipboardAll
Clipboard=
Send ^x<tt>^v</tt>{left 5}
Clipboard:=k
Return

!#v::
k:=ClipboardAll
Clipboard=
Send ^x<var>^v</var>{left 6}
Clipboard:=k
Return

!#y::
k:=ClipboardAll
Clipboard=
Send ^x<acronym title="">^v
Send % "</acronym>{left " StrLen(Clipboard)+29 "}"
Clipboard:=k
Return

; ################################
; ## Modifications du clavier ####
; ################################

RAlt & space:: Send {asc 0160}         ; espace insécable

RAlt & <::                             ; guillemets français
k:=ClipboardAll
Clipboard=
Send ^x«{asc 0160}^v{asc 0160}»{left 2}
Clipboard:=k
Return

; #####################
; ## Signes spéciaux ##
; #####################

~escape & 1::Send &`;               ; & on AZERTY keyboard
~escape & &::Send &`;
~escape & <::Send <`;
~escape & 6::Send &hellip`;            ; - on AZERTY keyboard
~escape & -::Send &hellip`;
~escape & a::Send æ`;
~escape & b::Send Æ`;
~escape & c::Send ©`;
~escape & e::Send &euro`;
~escape & l::Send £`;
~escape & m::Send &mdash`;
~escape & n::Send &ndash`;
~escape & o::Send &oelig`;
~escape & p::Send &OElig`;
~escape & q::Send Ç`;
~escape & r::Send ®`;
~escape & v::Send ½`;
~escape & w::Send ¼`;
~escape & x::Send ¾`;
~escape & y::Send ¥`;

; ####################
; ## Signes doubles ##
; ####################

$"::                                   ; traight double quotes
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x"^v"{left}
Clipboard:=k
}
Else
 Send "
Return

$(::                                   ; parenthesis
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x(^v){left}
Clipboard:=k
}
Else
 Send (
Return

RAlt & 4::                             ; curved brackets on AZERTY keyboard
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x{asc 0123}^v{asc 0125}{left}
Clipboard:=k
}
Else
 Send {asc 0123}
Return

RAlt & {::                             ; curved brackets
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x{asc 0123}^v{asc 0125}{left}
Clipboard:=k
}
Else
 Send {asc 0123}
Return

RAlt & 5::                             ; brackets on AZERTY keyboard
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x[^v]{left}
Clipboard:=k
}
Else
 Send [
Return

RAlt & [::                             ; brackets
If u6=1
{
k:=ClipboardAll
Clipboard=
Send ^x[^v]{left}
Clipboard:=k
}
Else
 Send [
Return

; #####################################################
; ## Commandes réservées aux insertions automatiques ##
; #####################################################

~F2 & a::Send %u12%
~F2 & b::Send %u13%
~F2 & c::Send %u14%
~F2 & d::Send %u15%
~F2 & e::Send %u16%
~F2 & f::Send %u17%
~F2 & g::Send %u18%
~F2 & h::Send %u19%
~F2 & i::Send %u20%
~F2 & j::Send %u21%
~F2 & k::Send %u22%
~F2 & l::Send %u23%
~F2 & m::Send %u24%
~F2 & n::Send %u25%
~F2 & o::Send %u26%
~F2 & p::Send %u27%
~F2 & q::Send %u28%
~F2 & r::Send %u29%
~F2 & s::Send %u30%
~F2 & t::Send %u31%
~F2 & u::Send %u32%
~F2 & v::Send %u33%
~F2 & w::Send %u34%
~F2 & x::Send %u35%
~F2 & y::Send %u36%
~F2 & z::Send %u37%

; #################################
; ## Afficher l'heure et la date ##
; #################################

AH:
FormatTime,h,,HH:mm - ddd dd MMM
Gui 2:+ToolWindow +AlwaysOnTop -SysMenu -Caption
Gui 2:Font,cFFFFFF s8,verdana
Gui 2:Color,CCCCCC
Gui 2:Add,Text,vHC y2,%h%
Gui 2:Show,AutoSize NoActivate xcenter y0 h18 W240,%h%
WinSet,TransColor,CCCCCC 255,: ahk_class AutoHotkeyGUI
SetTimer,T,30000
Return

T:
FormatTime,h,,HH:mm - ddd dd MMM
GuiControl,2:,HC,%h%
Return

RCtrl & H::
 If WinExist(": ahk_class AutoHotkeyGUI")
 Gui 2:Destroy
Else
 GoTo AH
Return


mkny
  • Members
  • 58 posts
  • Last active: Mar 13 2012 07:09 PM
  • Joined: 28 Sep 2006
Looks very useful. Unfortunately, I get the following error:
Posted Image

I copied and pasted the code in a file named html.ahk. Running Win XP Pro SP2.

engunneer
  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005
what version of AHK are you using? RegExMatch requires v1.0.45+

Normand
  • Members
  • 90 posts
  • Last active: Aug 31 2015 10:53 AM
  • Joined: 21 May 2007
@mkny,

In the original AHK file, line code 258 have:
p:=RegExMatch(l,"`t")
instead of:
p:=RegExMatch(l,"	")

May be a copy and paste problem on your own.

Try to rename the original file.
Normand Lamoureux

mkny
  • Members
  • 58 posts
  • Last active: Mar 13 2012 07:09 PM
  • Joined: 28 Sep 2006

what version of AHK are you using? RegExMatch requires v1.0.45+


Thanks, I was still running .44. Looking forward to trying it out.

Normand
  • Members
  • 90 posts
  • Last active: Aug 31 2015 10:53 AM
  • Joined: 21 May 2007
What's new?
- Possibility to replace shortcuts
- Available in English

View this post to get AHK and INI files.
Normand Lamoureux

Chapin
  • Members
  • 8 posts
  • Last active: Sep 28 2007 10:17 PM
  • Joined: 01 Aug 2007
Hi Normand:

I'm trying to run the english version of your script but I'm getting a tab with ERROR lines all over. The tray icon also shows only one option: ERROR.
The French version displays all the tabs.

Normand
  • Members
  • 90 posts
  • Last active: Aug 31 2015 10:53 AM
  • Joined: 21 May 2007
Hi Chapin,

Make sure you take the current version's AHK and INI files. Namely, the 2.0.8.16 version.
Normand Lamoureux

Chapin
  • Members
  • 8 posts
  • Last active: Sep 28 2007 10:17 PM
  • Joined: 01 Aug 2007
I got the files (K-html.ahk, K-html.ini) from this page and also from your web page with the same results. The french version works fine but when I replace the ini file is when I get the errors.
I'm using the latest version of AutoHotKeys, Windows XP SP2.

Chapin
  • Members
  • 8 posts
  • Last active: Sep 28 2007 10:17 PM
  • Joined: 01 Aug 2007
Line 23 of the script:
IniRead,i%A_Index%,k-html.ini,i18n,i%A_Index%
refers to section i18n which doesn't exist in the English ini file. Changing that section to i19n supress the error messages but shows only one Tab: 'close' with several keyboard shortcuts.

Chapin
  • Members
  • 8 posts
  • Last active: Sep 28 2007 10:17 PM
  • Joined: 01 Aug 2007
Line 61:
Gui Add,Tab,W254 H350,%i17%
should be changed to:
Gui Add,Tab,W254 H350,%i18%
line 62:
Gui Add,Text,,%i18%`n%i19%`n%i20%`n%i21%`n`n%i22%`n`n%i23%`n%i24%`n%i25%`n`n%i26%`n%i27%`n%i28%`n%i29%`n`n%i30%`n%i31%`n`n%i32%`n%i33%`n%i34%
needs to start with %i19% to reflect the change in line 61
The above changes will show all the Tabs although some other areas may need to be fix.

Normand
  • Members
  • 90 posts
  • Last active: Aug 31 2015 10:53 AM
  • Joined: 21 May 2007
Hi, Chapin,

Line 23 of the script [...] refers to section i18n which doesn't exist in the English ini file.

Obviously an old version of the AHK file, since line 23 of the current one refers to section i19n, not to section i18n.

Of course, i19n is a mistake of my own. (Since there are 18 letters between the first and the last letters of the word Internationalization —which i18n stand for—, not 19). But I did the same mistake in all files of the current version.
Normand Lamoureux