Last active
September 4, 2018 17:24
-
-
Save maphew/657d52397861f4d7d53cf13ce8420fa3 to your computer and use it in GitHub Desktop.
Key sequence for ArcMap 10.6 to save copy of current map as 10.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance,Force | |
#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. | |
; key sequence for ArcMap 10.6 to save copy of current map as 10.4 | |
^j:: ; Activate with Ctrl-J | |
;clipsaved:= ClipboardAll | |
;Clipboard = | |
sleep 100 | |
send, !f | |
Sleep, 100 | |
send, c | |
Sleep 200 | |
/* ;;Enable this block to append '_v104.mxd' to the filename | |
send, !n ; focus filename text input | |
send, ^c ; copy selected | |
ClipWait | |
;MsgBox Control-C copied the following contents to the clipboard:`n`n%clipboard% | |
StringReplace, clipboard, clipboard, .mxd, _v104.mxd | |
;MsgBox New contents of clipboard:`n`n%clipboard% | |
;WinGetActiveTitle, CurrentWinTitle ; Gets the title of the active window | |
;MsgBox, %CurrentWinTitle% | |
;WinActivate, %CurrentWinTitle% ; Makes sure you are still in the original window. | |
;Clipboard = | |
Send, ^v ; Pastes the (now modified) contents of the clipboard | |
;Clipboard := clipsaved ; Sets the clipboard back to whatever was on it before you ran this script. | |
*/ | |
sleep, 200 | |
send, !t | |
send, {down 7} | |
send, {tab} | |
; uncomment next line to save without review | |
;send, !s | |
; Sources | |
; https://autohotkey.com/boards/viewtopic.php?p=72882#p72882 | |
; https://autohotkey.com/docs/misc/Clipboard.htm | |
return |
An earlier version of this saved as 10.3, which wasn't necessary because 10.3 is available from ArcPy. It's only versions 10.4 and 10.5 which are unavailable. Doh!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related: