Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
give 'named constants' functionality of 'autotext'
#1
I have a function "_QM_CUSTOM_CONSTANTS_" which contains all my named constants.
I have put the content of "_QM_CUSTOM_CONSTANTS_" into to 2 arrays.
- source_arr[]
- target_arr[]

Example:
Function _QM_CUSTOM_CONSTANTS_
Code:
Copy      Help
def PORTABLE_APPS_F "f:\portableapps"

source_arr[0]="f:\portableapps"
target_arr[0]="PORTABLE_APPS_F"

Is the following possible whithin QM?

Everytime I type OR paste (control+v OR right click >> paste) "f:\portableapps" get's automatically replaced with "PORTABLE_APPS_F".
In other words, if the typed/pasted content is source_arr[0] then it is replaced by it's corresponding array target_arr[0].
I have the 2 arrays, but now I must attach it to:
- right click > paste
- control + v
- typed through keyboard

And off course make it so it actually replaces the typed/pasted text.

The only place where it should not replace is within the green commented code which represents the compiler directives at the bottom of each qm item (when a qm item is compiled to exe it generates green commented code below in the qm item)

Is it possible?
It's almost like the 'autotext' functionality, but I could not get this to work within 'autotext'.
#2
Too difficult.
#3
I thought it would be.
No problem!


Forum Jump:


Users browsing this thread: 1 Guest(s)