Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Systray annoyance.
#1
Hello, it's me again :roll:

I have a macro i can compile.

I contains a systray icon.

Tray f.AddIcon("c:\mypathtoicon\1.ico[]c:\mypathtoicon\2.ico" "Initialisation")

I'd like :

1) to see the icon when exe is running. It works fine from QM, i added it from compilation option, but the systray icon is empty.

2) how to interact with icon (i.e have a dialog on right click)?

Thanks.
#2
Macro Macro1090
Code:
Copy      Help
;/exe
if(!dir("$pf$\quick macros 2\copy.ico")) mes- "could not find $pf$\quick macros 2\copy.ico"
Tray f.AddIcon("$pf$\quick macros 2\copy.ico[]$pf$\quick macros 2\paste.ico" "Initialisation" 0 0 0 0 "Dialog70")
mes 1
#3
Hi,

for the icon it works, but i was thinking about a way to integrate them in the exe and then called them at run time, so it is OS and computer independent.

I've been struggling with Adding files to exe resources and extracting at run time for 2 days now, but it seems far beyond my skills.....

Will the /exe line make it portable, i.e integrated at compilation time in exe?

Thanks.

kind regards,
Laurent.
#4
Remove the / line.
#5
Macro Macro1091
Code:
Copy      Help
;/exe
Tray f.AddIcon(":200 $pf$\quick macros 2\copy.ico" "Initialisation" 0 0 0 0 "Dialog70")
;Tray f.AddIcon(":200 $pf$\quick macros 2\copy.ico[]:201 $pf$\quick macros 2\paste.ico" "Initialisation" 0 0 0 0 "Dialog70") ;;does not work with multiple icons
mes 1

In Make Exe dialog check 'auto add image files'. Add a resource id in file paths, like in the example. Currently QM does not support multiline strings with resource id.
#6
The exe line just tells QM to run the macro in separate process. QM converts the macro to exe.
#7
Hi,

sorry but i don't understand... Sad

What i want is to choose an icon at coding time, and make it available for the exe i compile later, to show it in the tray, even on a computer that does not have it inatalled.

is it clearer now?

Thanks.
#8
In Make Exe dialog check 'auto add files...'. In macro, use icon path like
Macro Macro1091
Code:
Copy      Help
Tray f.AddIcon(":200 $pf$\quick macros 2\copy.ico" "Initialisation" 0 0 0 0 "Dialog70")
Then QM adds the file to the exe. The file does not have to exist on all computers.
#9
Great, seems to work.

in fact, sometimes, i'm lost in help between windows API and QM own implementation of some classes.

Can I use the same technique to store objects in exe and use them at run time to use them (bitmaps, icons, richedit text, files etc)?

kind regards,
Laurent.
#10
Yes, most functions that load images and other files support ":resourceid filepath" syntax. QM functions, not Windows API. Look in QM help, Make Exe topic, Resources.
#11
Great.

I'll try. I must now tweak the application with right click management and windows events stuff.

Stay tuned for another thread Big Grin

Thanks


Forum Jump:


Users browsing this thread: 1 Guest(s)