Posts: 56
Threads: 16
Joined: Feb 2012
If i understand it correctly if you export a macro as an exe it will pack up all the functions inside macro folder and make it standalone. Make it runable on other computers without having to copy files from myQM folder ect. I tried this but i cant make it run. It gives me error's with object not found message. And when i make an exe i get the message : Warning: 'Auto add files' is checked but files are not specified. Read QM Help. What should i do to make it work?
Thank you for your patience and help..
Posts: 12,086
Threads: 142
Joined: Dec 2002
Yes, it packs the functions. But does not add files by default. To add files that you use in the macro/functions, check "Auto add files..." and add resource id in file path for each file in macro/functions. For example, if you use a file with scan, like scan "$my qm$\b.bmp", replace it to scan ":5 $my qm$\b.bmp", where 5 is some unique number for each file.
Posts: 56
Threads: 16
Joined: Feb 2012
So if i understand it correctly i need to go in my macro function's, find all the places where i used scan and rename the .bmp images to start with 1: 2: 3: and than do the same with bmp images in MyQM folder so they mach. And Than they will export with exe next time?
Posts: 12,086
Threads: 142
Joined: Dec 2002
Correctly, except "and than do the same with bmp images in MyQM folder so they mach".
Posts: 56
Threads: 16
Joined: Feb 2012
i asked that because i tried just ading 1: infront the name and i got an error how it cant find the object.. Also changing the bmp itself wowuldnt let me put : because it was not alowed. I must be missing something.. Maby it's :1 not 1: ill try it now.
Posts: 56
Threads: 16
Joined: Feb 2012
Alright it turns out it's :1 . When i type that insted i dont get the error. hmm Just a question. If a same image.bmp, keeps been used trought the macro do i give him the same number in all aparences or it's a diferent one every time i find it?
Posts: 12,086
Threads: 142
Joined: Dec 2002
Yes, :1. It was my mistake.
give same number for same file.
Posts: 56
Threads: 16
Joined: Feb 2012
Success! It now gave me a list of files that go with it!
No problem i hapens to all of us, id never get this far without your help and probably give up.
Thank you all mighty Gintaras
Posts: 26
Threads: 3
Joined: Apr 2011
One question Gintaras:
Is it possible in a future version, to add the resource id automatically for a generated exe?
if the macro is small, its ok, but if you build a large macro and at the end you realize that you need to convert it to an exe, its hard to track all the resources you need to change, and you loose lots of time change all the code to be able to generate the final exe!
Posts: 12,086
Threads: 142
Joined: Dec 2002
Many functions support file resources like scan. But I think this is most often used with scan. Maybe will add another checkbox - "Add files used with scan".
scan also can use images stored in macros. When creating exe, these macros are always added. QM 2.3.2 does not add macros used with wait S (bug).
Posts: 32
Threads: 10
Joined: Apr 2006
is it possible to add .wav files to exe similar to adding image files to exe?
#exe addfile "$documents$\Sounds\SoundFile.wav" 10
bee ":10 $documents$\Sounds\SoundFile.wav"
Posts: 12,086
Threads: 142
Joined: Dec 2002
Macro
Add wav file to exe resources
;/exe
PlaySound _s.getfile(":10 $windows$\Media\Garden\Windows Feed Discovered.wav") 0 SND_MEMORY|SND_ASYNC
1
;In Make Exe dialog check 'Auto add files'.
;BEGIN PROJECT
;flags 22
;END PROJECT
In next QM bee will support ":resId file" syntax.
Posts: 32
Threads: 10
Joined: Apr 2006