Noted again !!


I mentioned some time ago my favourite sticky notes app here. I have used it extensively for projects and general note management for several years and wanted to share another feature which relates to generating sticky notes from the command line – for example as part of an application or shortcut. You should really try this application out.

This relates to the Sticky tool that can be used in addition to Stickies from Zhorn software and the tool called Sticky can be found here. I recommend loading the latest version of stickies first before testing. Once installed save a copy of sticky to a folder – open a dos session and change to the directory. If you put it in the windows/system32 folder and that will make it available global via the path statement.

The syntax is simple

sticky ipaddressofmachinerunningstickies messagetext

or sticky 127.0.0.1 Hi

as an example

For the web site there are more options

Sticky

 

In order so that Stickies can be integrated with third party programs, I wrote sticky.exe. Examples of execution are as follows:

C:>sticky 127.0.0.1 This is the text.nThis is another line.

 

This will send a sticky to the IP address 127.0.0.1 (which is always the machine on which the command is executed, as is the string “localhost”) with the text following it. The “n” is replaced with a newline character, so that the two sentences will be on separate lines.

C:>sticky 127.0.0.1:45678 -file filename.ext

 

This time, rather than specifying literal text, instead the file “filename.ext” will be opened, and the contents will be sent. The alternate port of 45678 is also used.

C:>sticky 127.0.0.1 -file sticky.sti

 

This final mode comes into play when the filename you pass to sticky.exe has an extension of .sti. When this is a .sti file saved from Stickies, the note colour, title and formatted text content is read from the file.

C:>sticky “Tom Revell” Hi there Tom

 

Just as the destination may be an IP address or host name, if you enclose a friend name in quotes as above, sticky.exe will open a file stickies.ini in the current directory, and find the friend in there, and use the address associated with it. That way you could send a sticky to a friend without having to know their IP address. As long as Stickies knows it, sticky.exe will pick it out from the ini file.

Other command line options are:

-user1

(sets user variable 1 to true)

-user2

(sets user variable 2 to true)

-user3

(sets user variable 3 to true)

-secret

(sends the sticky in secret mode)

-width

(auto-sizes the sticky on receipt)

-source

(sets the sender – only honoured by Stickies when they arrive from the local machine; the source IP address must be 127.0.0.1)

The format for using the command is then:

sticky.exe destination[:port] | “Friend Name” [-user1] [-user2] [-user3] [-secret] [-width] [-source source_name] [-file file.ext | text]

 

The utility returns an ERRORLEVEL of 0 if the sticky was successfully sent, and 1 if there was a problem.

Although not all options have to be specified, they must be used in the order above.