how to use launchApplication from edit toolbar

4 views
Skip to first unread message

Dave Parker

unread,
Dec 5, 2008, 11:56:38 AM12/5/08
to TiddlyWiki
I searched for "launchApplication toolbar" here and on the
tiddlywiki.org site and "macros" but couldn't figure it out.

Here's what I'm looking to do:
I'd like to have a button labeled "paint" on the edit menu, that when
pressed launches an autohotkey script that plunks in the date and time
into the title, a certain word into tags, and another
launchApplication statement with the name of the new fileName.bmp I
will have just created (for future editing), and a <<tiddler
fileName.bmp>> so I can see the drawing when I come back to the
tiddler in the future.

I'm guessing I'm going to have to declare something like
.config.paint = bla bla bla

somewhere, so I can plunk the word "paint" into the editTemplate
toolbar line.


Can anyone help me please? (I'm going to a seminar in a week that will
involve a lot of drawing and I'd love to be able to keep a good flow
going taking notes - If I draw on paper, I inevitably lose it before I
get a chance to scan it in)

Thanks,

Dave Parker

Dave Parker

unread,
Dec 5, 2008, 6:06:25 PM12/5/08
to TiddlyWiki
okay, I think I may have found something close to what I need:


<<newJournal
"bitmap YYYY-0MM-0DD"
label:"new paint"
prompt:"create a new bitmap tiddler"
text:{{"<<tiddler [["bitmap YYYY-0MM-0DD"]]
+ '"' + + '"'
+ ">\>" + "<<LaunchApplication "edit this bitmap" "bitmap
YYYY-0MM-0DD.bmp"+ ">\>"
}}
tag:"paint"
>>

but I get an "error in macro <<newJournal>>" which I assume is from
improper quotes use, but not too sure. Also I'm not sure if
launching something that doesn't exist will give me the option to
create it.

any ideas?

Dave Parker

unread,
Dec 5, 2008, 6:09:27 PM12/5/08
to TiddlyWiki
woops, I timed out, here it is again

okido

unread,
Dec 6, 2008, 10:23:57 AM12/6/08
to TiddlyWiki
Hi Dave,

You could maybe rework the autonumber plugin that can be found here:
http://members.home.nl/zonborgele/autoNumber.html
It shows how to create a tiddler with specific text.

Have a nice day, Okido

Dave Parker

unread,
Dec 7, 2008, 10:50:27 AM12/7/08
to TiddlyWiki
thanks Okido,

I'm actually making headway with the newJournal macro - I like the
idea of naming by the dates and time because besides being a distinc
name each time it also carries the time of creation meaning as well.
I'd never seen that plugin before - looks like it could come in handy.

Dave

BramChen

unread,
Dec 7, 2008, 1:54:02 PM12/7/08
to TiddlyWiki

<<tiddler __dummy with:{{
window._today=new Date().formatString("bitmap YYYY-0MM-0DD");
window._bitmap=new Date().formatString("bitmapYYYY-0MM-0DD.bmp");
}}>><<newTiddler
title: {{_today}}
label:"new paint"
prompt:"create a new bitmap tiddler"
text:{{
'<<tiddler [['+_bitmap+']]>\>\n' +
'<<LaunchApplication "edit this bitmap" "' + _bitmap + '">\>';
}}
tag: "paint">>



enjoy,

--
Bram Chen
http://ptw.sf.net/

Dave Parker

unread,
Dec 8, 2008, 7:49:01 PM12/8/08
to TiddlyWiki
Thanks BramChen,

that was exactly what I needed!!

here's the modified version I'm using now (I forgot to use "img"
instead of tiddler)

<<tiddler __dummy with:{{
window._today=new Date().formatString("drawing.YYYY.0MM.
0DD..hh.mm.ss");
window._bitmap=new Date().formatString("drawing.YYYY.0MM.
0DD..hh.mm.ss.jpg");
}}>><<newTiddler
title: {{_today}}
label:"new paint"
prompt:"create a new bitmap tiddler"
text:{{
'[img['+_bitmap+']]\n' +
'<<LaunchApplication "edit this bitmap" "click" "' + _bitmap + '">
\>';
}}
tag: "paint">>

On Dec 7, 11:54 am, BramChen <Bram.C...@gmail.com> wrote:
> <<tiddler __dummy with:{{
> window._today=new Date().formatString("bitmap YYYY-0MM-0DD");
> window._bitmap=new Date().formatString("bitmapYYYY-0MM-0DD.bmp");
> }}>><<newTiddler
> title: {{_today}}
> label:"new paint"
> prompt:"create a new bitmap tiddler"
> text:{{
> '<<tiddler [['+_bitmap+']]>\>\n' +
> '<<LaunchApplication "edit this bitmap" "' + _bitmap + '">\>';
> }}
> tag: "paint">>
>
> enjoy,
>
> --
> Bram Chenhttp://ptw.sf.net/

Dave Parker

unread,
Dec 8, 2008, 7:52:31 PM12/8/08
to TiddlyWiki
by the way, here's the autohotkey script I use once the new tiddler is
open and the title is highlighted (it opens the paint program and
plucks in the tiddler name as the drawing name so you can save right
away and start drawing):



!p:: ;this is the launch key (alt+"p")

send ^c
sleep 500
title = %clipboard%
;msgbox %title%
send^{enter} ;-- to close the tiddler
Run emptyJpg.jpg
sleep 900
send !fa
sleep 500
send %title% ;--to go back to title
return
Reply all
Reply to author
Forward
0 new messages