Hi guys. Does anyone know where I can find a script done by Carl S. (maybe a year ago) showing how to add an icon in the Windows tray icon bar using the system:// port ?
You only get the tray system mode under Link, not View it seems:
get-modes system/ports/system 'system-modes ; show which modes are available
== [window winmsg tray endian] ; result for REBOL/Link 1.0.6.3.1 3-Aug-2002
== [window winmsg endian] ; result for REBOL/View 1.2.10.3.1 30-May-2003 (windows version on WinXP)
I found the following. I think maybe Cyphre did it.
set-modes system/ports/system compose/deep [
tray: [
add main [
help: (rejoin ["REBOL/Link" any [""]])
menu: [desktop: "Start Desktop" bar quit: "Quit"]
]
]
]
From Developer IOS server: users/Cypre/tray-example.r
(dated 20-Dec-2002)
Rebol [
title: "little custom tray exapmle"
author: cyphre@seznam.cz
]
set-tray: does [
set-modes system/ports/system [
tray: [
add main [
help: "Just some help line"
menu: [
desktop: "This is my tray"
bar
test: "test item"
bar
quit: "Quit"
]
]
]
]
]
system-awake: func [port /local r][
if all [r: pick port 1 (r/1 = 'tray)] [
if any [(r/3 = 'activate) all [(r/3 = 'menu) (r/4 = 'desktop)]][
view/new/offset layout [banner "you clicked the tray button 1"] random 200x200
]
if all [(r/3 = 'menu) (r/4 = 'test)] [view/new/offset layout [banner "you clicked the tray button 2"] random 200x200]
if all [(r/3 = 'menu) (r/4 = 'quit)] [quit]
]
return false
]
system/ports/system: open [scheme: 'system]
append system/ports/wait-list system/ports/system
system/ports/system/awake: :system-awake
set-tray
wait []