Jump to content
Sign in to follow this  
Karthi keyan

Shortcut Ctrl + S will work in HM ??

Recommended Posts

Hi ,


I just want to keep the shortcut for saving the Hm file.


For this i prepared this code


set hmDatabase [hm_info hmfilename]

if {[llength $hmDatabase] == "0"} {
    set expFileName [tk_getSaveFile -defaultextension ".hm"\
      -filetypes {{"HM Database" ".hm"}} -initialfile "ORIGINAL_DATA.hm"\
      -title "Save as .hm file"]
      hm_answernext "yes"
      catch {*writefile "$expFileName" 1 }
    set hmDatabase [hm_info hmfilename]

if {[llength $hmDatabase] == "1" } {
hm_answernext "yes"
*writefile "$hmDatabase" 1


Then i pasted this code on keyboard shortcuts window on Ctrl + S


For the first time it worked in both cases


1. Fresh file ( which will ask the file name & location to Save)

2. Working file ( Which will save on the same file name  & location)


After some time it is working only on fresh file case.


Any suggestions?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...