; Script by Michael Chalk, July 08 (draft) ; Licensed under creative commons .. ; um i'd better find the exact license hadn't i, ; because some of this is taken from other places anyway ; eg the Win+H hotkey function ;---------------------------------------- ; SECTION ONE: some scripts to enable resizing windows etc ;---------------------------------------- ; Minimise Windows - Win + Left ; Maximise Windows - Win + Up ; Restore Windows - Win + Down ;---------------------------------------- #Left::WinMinimize,A #Up::WinMaximize,A #Down::WinRestore,A ; Win+C will bring up control panel ; ---------------------------------------- #C::Run rundll32.exe shell32.dll`,Control_RunDLL ;---------------------------------------- ; SECTION TWO: Win+H hotkey, ; function to enable adding words to script ;----------------------------------------- #h:: ; Get the text currently selected. The clipboard is used instead of ; "ControlGet Selected" because it works in a greater variety of editors ; (namely word processors). Save the current clipboard contents to be ; restored later. Although this handles only plain text, it seems better ; than nothing: AutoTrim Off ; Retain any leading and trailing whitespace on the clipboard. ClipboardOld = %ClipboardAll% Clipboard = ; Must start off blank for detection to work. Send ^c ClipWait 1 if ErrorLevel ; ClipWait timed out. return ; Replace CRLF and/or LF with `n for use in a "send-raw" hotstring: ; The same is done for any other characters that might otherwise ; be a problem in raw mode: StringReplace, Hotstring, Clipboard, ``, ````, All ; Do this replacement first to avoid interfering with the others below. StringReplace, Hotstring, Hotstring, `r`n, ``r, All ; Using `r works better than `n in MS Word, etc. StringReplace, Hotstring, Hotstring, `n, ``r, All StringReplace, Hotstring, Hotstring, %A_Tab%, ``t, All StringReplace, Hotstring, Hotstring, `;, ```;, All Clipboard = %ClipboardOld% ; Restore previous contents of clipboard. ; This will move the InputBox's caret to a more friendly position: SetTimer, MoveCaret, 10 ; Show the InputBox, providing the default hotstring: InputBox, Hotstring, New Hotstring, Type your abreviation at the indicated insertion point. You can also edit the replacement text if you wish.`n`nExample entry: :oc:btw`::by the way,,,,,,,, :oc:`::%Hotstring% if ErrorLevel ; The user pressed Cancel. return IfInString, Hotstring, :oc`::: { MsgBox You didn't provide an abbreviation. The hotstring has not been added. return } ; Otherwise, add the hotstring and reload the script: FileAppend, `n%Hotstring%, %A_ScriptFullPath% ; Put a `n at the beginning in case file lacks a blank line at its end. Reload Sleep 200 ; If successful, the reload will close this instance during the Sleep, so the line below will never be reached. MsgBox, 4,, The hotstring just added appears to be improperly formatted. Would you like to open the script for editing? Note that the bad hotstring is at the bottom of the script. IfMsgBox, Yes, Edit return MoveCaret: IfWinNotActive, New Hotstring return ; Otherwise, move the InputBox's insertion point to where the user will type the abbreviation. Send {Home}{Right 4} SetTimer, MoveCaret, Off return ; ---------------------------------------- ; SECTION THREE: the words and their shortcuts ; ---------------------------------------- ; activate any of the shortcuts with the semi-colon ; or change this line to add your own "end character" ; if there's no character, then many keys will operate: ; eg enter, space, tab, etc ; ---------------------------------- #Hotstring EndChars `; ; ----------------------------------- ; these first two shortcuts don't require the ending semi-colon, just a hyphen ; (yes they can cause trouble if you're not expecting it sometimes :?*:a-::ation :?*:ac-::action ; here are all the keyboard shortcuts i've created (some of them) ; you can add your own either here in the script, ; or outside: highlight word/ phrase, then Win+H ; you can also delete from here: make sure you delete the whole line ): :oc:-::----------------------------------------{enter} :oc:0::() :oc:abe::adult basic education :oc:ace::Adult Community Education (ACE) :oc:acfe::Adult Community and Further Education (ACFE) :oc:ae::adult education :oc:af::Australian Flexible Learning Framework :oc:ah:: {LEFT}{LEFT}{LEFT} :oc:al::adult literacy :oc:ala::Adult Learning Australia (ALA) :oc:albe::adult literacy and basic education (ALBE) :oc:amep::Adult Migrant Education Program (AMEP) :oc:ar::Action Research :oc:at::audio technologies :oc:au::Australia :oc:ay::activity :oc:bc::because :oc:be::basic education :oc:bg::background :oc:bn::between :oc:bs::brainstorm :oc:btw::By the way, :oc:ca::computer-assisted language learning (CALL) :oc:cald::Culturally and Linguistically Diverse (CALD) :oc:cc::co-ordinator :oc:cco::creative commons :oc:cd::curriculum development :oc:ce::certificate :oc:cgea::Certificate of General Education for Adults (CGEA) :oc:chc::Community Health Centre :oc:chn::comprehension :oc:cm::classroom :oc:cmm::communication :oc:cms::Content Managent System :oc:cp::computer :oc:cswe::Certificate of Spoken and Written English (CSWE) :oc:ct::community :oc:cu::curriculum :oc:da::discourse analysis :oc:dc::dictation :oc:devt::development :oc:df::different :oc:dk::the Dvorak keyboard :oc:dl::digital literacies :oc:do::download :oc:ds::Digital Storytelling :oc:dw::Dreamweaver :oc:e::e-learning :oc:ed::education :oc:eg::for example :oc:el::ESL/Literacy :oc:eln::English Language, Literacy and Numeracy :oc:en::English :oc:envt::environment :oc:esl::English as a second language :oc:ev::evaluation :oc:f::flickr :oc:fb::feedback :oc:fg::flexible learning :oc:fl::first language :oc:ft::face-to-face :oc:ftp::file transfer protocol (FTP) :oc:gov::government :oc:h::http:// :oc:hf::http://flexiblelearning.net.au/ :oc:hp::Hot Potatoes :oc:html::hypertext markup language (HTML) :oc:hw::http://www. :oc:hy::Happy Birthday :oc:hyw::hope you're well, `r :oc:ic::including :oc:ie::Internet Explorer :oc:ilc::Independent Learning Centre (ILC) :oc:inf::information :oc:isp::internet service provider :oc:it::information technology :oc:js::javascript :oc:kb::keyboard :oc:kl::knowledge :oc:ks::keyboard shortcuts :oc:l::learn :oc:lg::learning :oc:ll::language and literacy :oc:lms::learning management system :oc:ln::language :oc:lo::learning outcome :oc:lr::learner :oc:lrs::learners :oc:lrv::literature review :oc:ls::learning technologies :oc:lsg::listening :oc:lt::literacy :oc:ltg::learning technologies :oc:lts::literacies :oc:ma::much appreciated :oc:mad::materials development :oc:mat::materials :oc:mb::Melbourne, Australia :oc:mft::microsoft :oc:mgt::management :oc:mm::multimedia :oc:mn::Melbourne :oc:mo::moderation :oc:mr::manager :oc:nes::non English-speaking background (NESB) :oc:nh::Neighbourhood House :oc:nlt::new learning technologies :oc:nt::network :oc:num::numeracy :oc:ol::[online document, accessed: ] URL: :oc:op::operating system :oc:org::organisation :oc:os::Open Source :oc:pd::professional development :oc:pn::punctuation :oc:pp::people :oc:ps::problem-solving :oc:qn::question :oc:rg::reading :oc:rp::research project :oc:rq::research questions :oc:rs::research :oc:rw::reading and writing :oc:sn::someone :oc:st::student :oc:sth::something :oc:str::strategy :oc:strs::strategies :oc:sts::students :oc:tg::teaching :oc:tkr::thanks and kind regards, :oc:tl::technological :oc:tmw::tomorrow :oc:tog::together :oc:tr::teacher :oc:trs::teachers :oc:ts::technologies :oc:tw::toward :oc:tx::text :oc:ty::technology :oc:ug::understanding :oc:uni::University :oc:va::Victorian Adult Literacy and Basic Education Council (VALBEC) :oc:vc::Victorian Certificate of Applied Learning (VCAL) :oc:vic::Victoria :oc:vn::visualisation :oc:vo::vocabulary :oc:w::www. :oc:w3::world wide web :oc:wa::Western Australia :oc:wb::whiteboard :oc:we::weekend :oc:wg::writing :oc:wn::written :oc:wr::writer