Programming question

Want to talk about something that isn't covered by another category?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Programming question

Post by bidgeeman » Sun Nov 16, 2008 8:54 am

Hi All.

Just wondering if there were any windows programmers that could offer a little advice I could pass on for a friend of mine who is trying to write a plugin in Lua for a windows app. Specifically e's trying to write a "Recent Documents" menu add on.

Here's his post:
"No matter what I do I can't target the currently open instance to open a previous document. It ALWAYS opens in a new dang instance. Even double clicking a file on the hard drive will open a new instance. Very annoying. I've searched and searched and can't find any way to target a running application instance.

If any of you are Windows "experts" or even programmers that have knowledge of how to workaround this issue I would be happy to hear it. Maybe there could be a simple application created in "basic" or something that can target an instance like the Mac does?

Many thanks for any help.
Cheers
Bidge

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Post by mwieder » Mon Nov 17, 2008 11:01 pm

Lua, eh? Well, I'm assuming your friend doesn't have access to the source code for this application, since that's normally where this sort of thing is done: you get a handle to the running instance of the application (or null if it's not already running), then decide whether you want to launch a new instance or use the existing handle. Since a new instance is always getting launched, it's a fair bet that the application doesn't have code to handle this in its initialization section.

Any chance of using SendKeys to pass something like control-O and then the path to the file?

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Mon Nov 17, 2008 11:40 pm

Thankd for the response mwieder.
I passed your comments on and will let you know how it goes.

Many thanks again.

Cheers
Bidge

Post Reply