Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get text with a specific color (user functions) from the QM code editor
#12
Thanks for your help.
Is it possible to call different sub-functions within a single function using two parameters, as shown in the image below:
https://i.ibb.co/35V5p6p1/exe.jpg

The sub-function addManifest is executed before generating the exe, using the parameter /a.
The sub-function saveFun is executed after generating the exe, using the parameter /s.

This approach would make the operation much more convenient. Is it possible?

Macro Getout
Code:
Copy      Help
mac "sub.saveFun"
ret 1

#sub saveFun
0.3
int h=id(2201 _hwndqm)
int lens=SendMessage(h SCI.SCI_GETTEXTLENGTH 0 0)
str s.fix(SendMessage(h SCI.SCI_GETTEXT lens+1 s.all(lens)))

ARRAY(str) a; findrx(s "^<[^>]+>(.+)$" 0 4|8 a)
for _i 0 a.len
,str n=a[1 _i].trim
,_s.getmacro(n)
,_s.setfile(F"$desktop$\{n}.txt")

del-  "$Temp$\_Temp.exe"

#sub addManifest
_s=
;BEGIN PROJECT
;main_function  Macro1
;exe_file  $Temp$\_Temp.exe
;icon  <default>
;manifest  $qm$\default.exe.manifest
;on_after  Getout
;flags  7
;guid  {25416EFA-F9D9-4043-AC7C-50020F98DDB3}
;END PROJECT


Messages In This Thread
RE: Get text with a specific color (user functions) from the QM code editor - by Davider - 04-05-2025, 03:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)