Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM Dialogs
#6
Thank you ken. This function implements your idea.
Function QmReplaceSystemFunction
Code:
Copy      Help
;/
function $funcSystem $funcReplaceTo

;Use this function to automate modifications of System functions, macros, toolbars and menus.
;Replaces text of funcSystem (a function or macro etc in System folder)
;with text of funcReplaceTo (a function or macro etc somewhere else).
;Replaces only text, but not trigger or other properties.
;Saves the changes in System.qml file. Please ignore the 'QM does not save changes...' warning.


str sysfile="$qm$\system.qml"
SetAttr sysfile FILE_ATTRIBUTE_READONLY 2
int idsys=qmitem("System"); if(!idsys) ret
if(val(_s.getmacro(idsys 8))) end "System folder is read-only. Right click it, select Folder Properties and uncheck read-only."

str s.getmacro(funcReplaceTo)
s.setmacro(funcSystem)

out "%s successfully replaced." funcSystem
if(!SilentExport(+idsys sysfile 3)) out "Warning: failed to save. To save manually, export System folder." sysfile

err+ end _error


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)