Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tray icon help
#2
Read AddTrayIcon help.
Quote:It is automatically deleted when macro ends.
To delete before that, use "<delete>" as iconfile.

Macro
Code:
Copy      Help
AddTrayIcon "mouse.ico" "Dialog1" "DLG1"
wait 3
AddTrayIcon "<delete>"
out "icon deleted"
wait 3
out "macro ended"

Both AddTrayIcon calls must be from the same thread. To delete from other thread, somehow notify the thread that added the icon to delete the icon.

Or use variable of Tray type.
Macro
Code:
Copy      Help
Tray t.AddIcon("mouse.ico" "Dialog1" 0 0 0 "DLG1")
wait 3
t.Delete
out "icon deleted"
wait 3
out "macro ended"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)