User:Celuici/Haz PE.ahk


 * RELOAD SCRIPT
 * '::Reload

`:: autotrim, off clipboard:= sendinput, ^c clipwait, 0 selected:=clipboard if (substr(selected, 0)=A_space) {   selected:=trim(selected) clipboard=%selected%%A_space% } Else {   selected:=trim(selected) clipboard=%selected% }   sendinput, ^v return
 * ITALIC TAGS AROUND SELECTION

!s:: autotrim, off clipboard:= sendinput, ^c clipwait, 0 selected:=clipboard if (substr(selected, 0)=A_space) {   selected:=trim(selected) clipboard=%A_space% } else {   selected:=trim(selected) clipboard= }   sendinput, ^v return
 * alt-s    small case

autotrim, off clipboard:= sendinput, ^c clipwait, 0 selected:=trim(clipboard) if (substr(selected, 0)=A_space) {   selected:=trim(selected) clipboard={{right|%selected%%A_space% } else {   selected:=trim(selected) clipboard={{right|%selected% }   sendinput, ^v return
 * win-r   {{right|selected text  right and italicize selected text. Useful for article dates
 * r::

autotrim, off clipboard:= sendinput, ^c clipwait, 0 selected:=trim(clipboard) if (substr(selected, 0)=A_space) {   selected:=trim(selected) clipboard=## %selected% ## {{c|{{larger|%selected%}}}} } else {   selected:=trim(selected) clipboard=## %selected% ## {{c|{{larger|%selected%}}}} }   sendinput, ^v return
 * win-c     NEW CHAPTER TITLE
 * c::

autotrim, off clipboard:= sendinput, ^c clipwait, 0 selected:=trim(clipboard) if (substr(selected, 0)=A_space) {   selected:=trim(selected) clipboard={{blockquote|text= %selected% }}%A_space% } else {   selected:=trim(selected) clipboard={{blockquote|text= %selected% }} }   sendinput, ^v return
 * win-b         BLOCKQUOTE POEM tags around selection
 * b::

autotrim, off clipboard:= sendinput, ^c clipwait, 0 selected:=trim(clipboard) if (substr(selected, 0)=A_space) {   selected:=trim(selected) clipboard={{block center|%selected%}}%A_space% } else {   selected:=trim(selected) clipboard={{block center|%selected%}} }   sendinput, ^v return
 * win-n         BLOCK CENTRE around selection
 * n::

Sleep 30 Send ^a 			    ; copy current selection to clipboard Sleep 30 Send ^c 			    ; copy current selection to clipboard Sleep 30 StringReplace, clipboard, clipboard, %A_space%"%A_space%, %A_space%", All Sleep 30 StringReplace = %clipboard% Sleep 30 Send ^v sleep 30 Send ^f"{Enter} return
 * win-q  REPLACE _"_, search for " in Chrome for visual inspection
 * q::