From c2101c04a24c91fbda26fdb941a576dfa0b1fbc6 Mon Sep 17 00:00:00 2001 From: breadcat Date: Sun, 17 Jan 2016 22:12:59 +0000 Subject: General Improvements Workaround some explorer strangeness Add some Word 2003 hotkeys Reduce some command and functions Improve renaming functions --- ahk-assistant.ahk | 10 ++++++++-- functions.ahk | 32 ++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/ahk-assistant.ahk b/ahk-assistant.ahk index 8fe673d..39538b9 100644 --- a/ahk-assistant.ahk +++ b/ahk-assistant.ahk @@ -276,7 +276,6 @@ Insert::appendClipboard() ^0::Send !vd ; view > details ^-::Send ^{WheelDown 2} ; zoom out ^=::Send ^{WheelUp 2} ; zoom in - #+Space::Send !vl!v+h ; fix weird xp explorer bug where you get no labels on thumbnails #IfWinActive #IfWinActive ahk_class ShockwaveFlashFullScreen ; full screen flash @@ -307,6 +306,7 @@ Insert::appendClipboard() #IfWinActive #IfWinActive ahk_class Photo_Lightweight_Viewer ; photoviewer windows 7 + ^w:: ; overflow CapsLock::Send !{F4} ; quit Up:: ; overflow Down::Return ; fixes up/down breaking left/right navigation @@ -339,7 +339,13 @@ Insert::appendClipboard() ^t::Send !go ; C-t goes to today, on calendar view #IfWinActive -#IfWinActive ahk_class XLMAIN ; excel +#IfWinActive ahk_class OpusApp ; word 2003 + ^=::Send ^{WheelUp} ; zoom in + ^-::Send ^{WheelDown} ; zoom out + ^0::Send !vzp{Enter} ; fit to page zoom +#IfWinActive + +#IfWinActive ahk_class XLMAIN ; excel 2003 ^+v::Send ^'{Down} ; C-S-v copies above cell contents into current ^+n::Send !iw ; new sheet ^+w::Send !el ; delete current sheet diff --git a/functions.ahk b/functions.ahk index ada63b7..16c67cf 100644 --- a/functions.ahk +++ b/functions.ahk @@ -2,11 +2,11 @@ dirWorking() { If A_OSVersion in WIN_XP { - Run explorer %A_MyDocuments% + Run %A_MyDocuments% } Else { - Run explorer %A_MyDocuments%\..\Downloads + Run %A_MyDocuments%\..\Downloads } Return } @@ -14,11 +14,21 @@ dirWorking() { dirSync() { If A_OSVersion in WIN_XP { - Run explorer %A_MyDocuments%\Vault + Run %A_MyDocuments%\Vault + WinWaitActive ahk_class CabinetWClass ; wait for window to display + { + PostMessage, 0x111, 28715,,, ahk_class CabinetWClass ; enable list view to work around thumbnail no icons bug + } } Else { - Run explorer %A_MyDocuments%\..\Vault + Run %A_MyDocuments%\..\Vault + WinWaitActive ahk_class CabinetWClass ; wait for window to display + { + PostMessage, 0x111, 28715,,, ahk_class CabinetWClass ; at this point, i just like list view + Send, +{Tab} ; weird glitch fix where focus is on the sort columns meaning you need to press enter twice + } + } Return } @@ -64,10 +74,7 @@ insertGateway() { } insertCRMFooter() { - Send, {Enter} - insertDateTime() - Send, {Space} - insertSignature() + insertFooter() Send, {F6}javascript:document.getElementById("SAVE_FOOTER").focus(){Sleep 25}{Enter}{Sleep 50}{Space} Return } @@ -115,7 +122,8 @@ insertSignature() { } pasteClipboard() { ; manually paste clipboard, minus formatting - StringReplace, clipboard, clipboard, %A_Tab%, `,, All ;remove tabs + StringReplace, clipboard, clipboard, %A_Tab%, `,, All ; remove tabs + clipboard = %clipboard% ; trim whitespace SendRaw %clipboard% Return } @@ -235,7 +243,7 @@ explorerRename() { if (ExtensionPos != -1) { Position := StrLen(Clipboard) - ExtensionPos - Send, {End}{Left %Position%}{CtrlDown}{ShiftDown}{Home}{ShiftUp}{CtrlUp} + Send, {CtrlDown}{Home}{CtrlUp}{CtrlDown}{ShiftDown}{End}{CtrlUp}{Left %Position%}{ShiftUp} } Clipboard = %backupClipboard% backupClipboard = @@ -284,7 +292,7 @@ explorerNewDir() { ;allows xp to create new folder from keypress explorerNewFile() { ;create a new blank text file If A_OSVersion in WIN_XP { - Send !fwt{End}{Left 4}{ShiftDown}{Home}{ShiftUp} ;new text file, and deselect file extension + Send !fwt{CtrlDown}{Home}{ShiftDown}{End}{CtrlUp}{Left 4}{ShiftUp} ;new text file, and deselect file extension } Else { @@ -295,7 +303,7 @@ explorerNewFile() { ;create a new blank text file excelFormulaBar() { ;jumps to formula bar CoordMode, Mouse, Relative - MouseMove, 180, 60 + MouseMove, 170, 75 Send {LButton} Return } -- cgit v1.2.3