Launching a defined app

Questions, tips and tricks and techniques for scripting in Servoy

Launching a defined app

Postby Vaj » Fri May 28, 2010 10:44 am

Hi,
I have a photo module which requires images to be loaded off a blob edited and loaded back to the db.
So to do this I need to launch a specified editor to open the image in. If I used the protocol handler it will only launch the image preview app not the editor,
so I have to specify a default editor app in both macs and windows. I have tried several times without success. So I was wondering if any of you have dealt with launching a specified and open a file in the launched app. So for example launch paint and open c:\photo.jpg without any user intervention.

I have tried to do application.executeProgram('C:\\Windows\\System32\\mspaint.exe',out_file.getAbsolutePath()) without success

Thanks in advance,
V Rathnayaka
Senior Systems Developer.
Space Air plc.
User avatar
Vaj
 
Posts: 64
Joined: Fri Jul 21, 2006 10:14 am
Location: Surrey, UK

Re: Launching a defined app

Postby mboegem » Fri May 28, 2010 11:04 am

Vaj wrote:I have a photo module which requires images to be loaded off a blob edited and loaded back to the db.
So for example launch paint and open c:\photo.jpg without any user intervention.


If I understand you correctly you have images stored in the db.
Then you want to edit them in an external app (external in terms of: outside Servoy)
and load them back in the database.

So: once you have the image stored on a local disk and opened in an editor and saved it again (assuming that this can be done with one push of a button), how do you get the image back into your db?
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1817
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Launching a defined app

Postby Vaj » Fri May 28, 2010 11:45 am

Vaj wrote:So: once you have the image stored on a local disk and opened in an editor and saved it again (assuming that this can be done with one push of a button), how do you get the image back into your db?


Same way I got in there the first place. So user clicks edit, takes the user to a form which says 'this image is being edited' with a button 'Finish Editing' The external app pops up, the user makes changes, and saves the changes via the app. (obviously the changes will be saved in the same location cos the file was originally loaded by the editor from the temp location) Then when the user goes back in to servoy he clicks the button 'Finish Editing' and this ovverides the image that already exists in the blob with the modified one, since it knows the temp location where it was first saved to. Modified image is shown on the same form. A question dialog pops up do you want to accept changes. if Yes commit Transaction if No Roll Back. :D
V Rathnayaka
Senior Systems Developer.
Space Air plc.
User avatar
Vaj
 
Posts: 64
Joined: Fri Jul 21, 2006 10:14 am
Location: Surrey, UK


Return to Methods

Who is online

Users browsing this forum: No registered users and 9 guests