SEPIA-Framework / sepia-docs

Documentation and Wiki for SEPIA. Please post your questions and bug-reports here in the issues section! Thank you :-)
https://sepia-framework.github.io/
236 stars 16 forks source link

Launch Windows apps/programs #69

Open mick69 opened 3 years ago

mick69 commented 3 years ago

what is the json code to launch Windows apps, example notepad.exe. also sepia teach doesn't like the json example {"command":["start", "", "http://example.com"]}

fquirin commented 3 years ago

Hi Mick,

sorry for the late reply! Did you see this blog article I wrote a while back about Windows interaction?

Basically to trigger Windows commands you need some kind of tool that acts as a proxy and executes them on request. In the article this proxy is the "SEPIA Mesh-Node" that integrates with SEPIA and converts HTTP requests into Windows runtime commands, but you might find other tools that can do the same (maybe Node-RED could do it as well, I've been working on some integrations for that a while ago).

Regards, Florian

mick69 commented 3 years ago

On Mon, 2020-10-05 at 15:10 -0700, Florian Quirin wrote:Yes, installed mesh, just dont know json code to launch win apps

Hi Mick,

sorry for the late reply!

Did you see this blog article I wrote a while back about Windows interaction?

Basically to trigger Windows commands you need some kind of tool that acts as a proxy and executes them on request. In the article this proxy is the "SEPIA Mesh-Node" that integrates with SEPIA and converts HTTP requests into Windows runtime commands, but you might find other tools that can do the same (maybe Node-RED could do it as well, I've been working on some integrations for that a while ago).

Regards,

Florian

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": " https://github.com/SEPIA-Framework/sepia-docs/issues/69#issuecomment-703916059 ", "url": " https://github.com/SEPIA-Framework/sepia-docs/issues/69#issuecomment-703916059 ", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

fquirin commented 3 years ago

Hi Mick,

I just double-checked the {"command":["start", "", "http://example.com"]} example and might have found a bug that was introduced in 2.5.0 :see_no_evil: Could you check your ~/SEPIA/sepia-assist-server/log.out log file to see if there is maybe an error like this: ERROR - org.json.simple.JSONObject cannot be cast to java.lang.String

just dont know json code to launch win apps

What you usually do is create a shortcut for your application or a .bat file that runs some code and place it in a folder relative to your Mesh-Node base folder. Then you can use the code similar to the one shown in the example: {"command":["start", "", "Shortcuts/Notepad.lnk"]} for example.

mick69 commented 3 years ago
Hi Florian Not in the log,  but from memory I got an error when running the json code. Shall try again tonight and try bat file to launch notepad.exe  Sent from Mail for Windows 10 From: Florian QuirinSent: Wednesday, 7 October 2020 9:03 AMTo: SEPIA-Framework/sepia-docsCc: mick69; AuthorSubject: Re: [SEPIA-Framework/sepia-docs] Launch Windows apps/programs (#69) Hi Mick,I just double-checked the {"command":["start", "", "http://example.com"]} example and might have found a bug that was introduced in 2.5.0 🙈Could you check your ~/SEPIA/sepia-assist-server/log.out log file to see if there is maybe an error like this:ERROR - org.json.simple.JSONObject cannot be cast to java.lang.Stringjust dont know json code to launch win appsWhat you usually do is create a shortcut for your application or a .bat file that runs some code and place it in a folder relative to your Mesh-Node base folder. Then you can use the code similar to the one shown in the example: {"command":["start", "", "Shortcuts/Notepad.lnk"]} for example.—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe. 
fquirin commented 3 years ago

Hi Mick, I've updated SEPIA to v2.5.1 which should fix the bug mentioned above. Can you try again with the new version? :-)