Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Key sequence for ArcMap 10.6 to save copy of current map as 10.4
#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
;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

This comment has been minimized.

Copy link
Owner Author

@maphew maphew commented Sep 4, 2018

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