Interact with Microsoft Windows or others programs

Discussions about CSEntry
Post Reply
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Interact with Microsoft Windows or others programs

Post by htuser »

Dear all,
I would like to know if it's possible to write a code that can interact with others Ms Windows programs such as open a recording program, record automatically a part of an interview and save it with a predetermined name. The same operation may be required to record a photo or read a data from another GPS software.
Thanks in advance
G.VOLNY, a CSProuser from Haiti, since 2004
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Interact with Microsoft Windows or others programs

Post by Gregory Martin »

You can use the execsystem function to launch any external Windows application. If you can find an application that performs your required task, whether it is making a recording or taking a photo, then you can call that program with execsystem.
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Interact with Microsoft Windows or others programs

Post by htuser »

Thank you for your help. I would like to know if it's possible to call cmd.exe and write a Dos command line trough Execsystem? or another Cspro function?

I Think it will be more difficult to use another script and call him with Execsystem.

I hope that in the long run, Cspro will be compatible with other language or you'll add a function allowing to interact more deeply with others Windows programs.
Sincerely yours,
G.VOLNY, a CSProuser from Haiti, since 2004
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Interact with Microsoft Windows or others programs

Post by Gregory Martin »

Look at my answer to your other question to see how I launched a DOS batch file from within CSPro:

http://csprousers.org/forum/viewtopic.php?f=1&t=650

With the DOS batch file you can do many things, including launching your sound recorder.
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Interact with Microsoft Windows or others programs

Post by htuser »

Thanks for this precious help.
G.VOLNY, a CSProuser from Haiti, since 2004
abbymm
Posts: 2
Joined: April 14th, 2013, 10:10 pm

Re: Interact with Microsoft Windows or others programs

Post by abbymm »

Microsoft Windows services, formerly known as NT services, enable you to create long-running executable applications that run in their own Windows sessions. These services can be automatically started when the computer boots, can be paused and restarted, and do not show any user interface. These features make services ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer. You create your service as a Microsoft Visual Studio project, defining code within it that controls what commands can be sent to the service and what actions should be taken when those commands are received. Commands that can be sent to a service include starting, pausing, resuming, and stopping the service; you can also execute custom commands.
Pierre

Re: Interact with Microsoft Windows or others programs

Post by Pierre »

Hello Josh and Greg,
I did not want to start a new thread so I hope you guys get this post.

Anyway, I want to take advantage of cmd line error codes and use the resulting code in in my entry application without having to use any other services or complicating the system by passing parameters through a text file.

Let me know if this is possible.

By the way ... adding this feature to execsystem() will probably valuable for android applications.

Thanks,
Pierre
Post Reply