Open Powershell script with pure c code - c

I want to make automatically screenshots of our visualiziation.
I managed to switch through the pictures.
But getting the screenshots is quite difficult.
I found an quite easy Powershell script that works fine.
But I have to call it with c Code due our visualiziation.
It offers only "Winexec" and "ProgramExecute".
I didn't manage to find the right code...
WinExec("Powershell -/Skript -Param1 -Param2", SW_SHOWNORMAL);
or
unsigned int ProgramExecute(char* Program_Name)
Has anybody an idea where I can find the right order?
Thanks :)

I use the fine software "greenshot" with automatic save.
No coding and almost anybody can create screenshots of the visualization ;)
..and sometimes powershell is not installed, or the security setting of the policy prohibits this kind of scripts from running correct...
//PerD

Related

Microsoft Visual Studio 2017 VERY basic help needed: "The system cannot find the file specified"

I'm doing an Introduction to C Programming course at the moment, only just started, and I am running into an issue I just can't get around. The course instructor is no help, and I know the issue is extremely basic, but every solution I find online assumes good working knowledge of the software. I don't have that, not yet anyway.
I'm simply trying to run the following code:
#include <stdio.h>
int main(void)
{
printf("Hello");
getch();
return 0;
}
This is, I believe, supposed to display "Hello" on the screen when I run it. But when I press F5 to debug I get the following message:
"Unable to start program. '[file path].Project1.exe' The system cannot find the file specified."
So there needs to be a .exe file there, but how do I make one? I've searched through many other answers to similar issues across the web, but all of them make reference to things I simply don't understand yet, so I'm asking here for a layman's explanation of how to resolve this.
Thanks so much to anyone who can help.
In your output window you are currently seeing that message in the Debug, right? You need to change that to Build or (I prefer) Build Order (which keeps the multi-threaded items in a sensible order for output). This will show you why your program didn't build - hence you have no "exe" to run.

Error when trying to run default C# HSPI A template

I downloaded Visual Studio 2017 Community and installed it on my Windows 10 PC. I downloaded the HomeSeer templates from the VS "marketplace" and installed them. I created a new project from the C# HSPI "A" template and pressed F5 to start the debug; I get 1 error message:
Error The command "powershell -file c:\users\paul\documents\visual studio 2017\Projects\HSPIPluginA1\HSPIPluginA1\fix-output.ps1 -configuration Debug -executionpolicy Unrestricted -NonInteractive" exited with code -196608.
Project: HSPIPluginA1 File: c:\users\paul\documents\visual studio 2017\Projects\HSPIPluginA1\HSPIPluginA1\HSPIPluginA1.csproj Line: 77
Do you have any idea what I did wrong? I'm pretty bad if I can't even get the default, pre-packaged, code to work.
Also, how do I provide an alternate IP Address for the plugin to connect to? My HS3 runs on a remote Linux (Lubuntu 16.04 LTS) machine. Thanks in advance.
I did not mean to imply that I was frustrated with you - it was me I was frustrated with; there just seems to be so much to learn. I know how much time and effort it takes to create/package/edit/document things so other folks can use them, so I certainly don't want to be a "whiner" right at the start. I also really appreciate you made the modifications to the template so quickly.
Thanks for reporting.
I just published an update to the extension that corrects the problem you were having. The corresponding tracking issue is https://github.com/alexdresko/HSPI/issues/62
I haven't finished the documentation yet, but you can see how to change the IP and port by going to https://github.com/alexdresko/HSPI/issues/7#issuecomment-283101463
Please do not expect perfection from this project. It's something I'm working on in my spare time and I am in no way affiliated with HomeSeer.
Now that I think about it, I do not know if this project will work with Linux, as that is something I haven't tested yet. I am very interested to know if it works, so please keep me updated.
Thanks again!

fatal error: call to undefined function mssql_connect() on mac osx lion 10.7.4

So, I can execute php scripts from the terminal, but when the script tries to connect to the database using mssql_connect(), I run into this problem. I have gone through almost all of the sources available for this problem. But, it seems like I have something different. I'm fairly new to Mac, but I have followed most of the steps like uncommenting
#LoadModule php5_module libexec/apache2/libphp5.so
from the httpd.conf file, turning on the web sharing under system preferences. However, I'm not sure if I need to uncomment php_mysql/(i).dll from the php.ini file as well, since I'm using ms sql and not my sql. Also, I do not seem to have php_mssql70.dll like it was suggested in one of the forums I ran into during my search. But, there are 2 lines in my .ini file that read
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll \\Yes. They both read the same thing.
Can someone point me in the right direction please? I'm not sure if the information I gave is sufficient. But yes, I think I have read and tried to emulate 90% of the forums that claim to solve this problem.
NOTE: This post seemed quite close to what I am trying, given that the user is a noob at this. I haven't really set up PHP, Apache, etc by myself since I have only worked with Php and MySQL in school till now.
How to install/use php on mac v 10.7.2
Since you're not on Windows you need to ignore anyone mentioning anything containing '*.dll'.
Look for extensions.ini which should in the same folder as php.ini, or in a folder very close to it, and you should be able to enable it from there, it should be a .so file. If it is not already there then the extension is not installed at all. I have no idea how to add PHP extensions on OSX, though. :I

gedit plugin development in C

I'm Interested in writing gedit-plugins in C. I've checked Gedit/NewMDIPluginHowTo
...but haven't had any luck with it.
How can I get more information about writing gedit plugins in C?
If you're willing to use Python instead, here is a tutorial for writing gedit plugins in Python.
The only tutorial is the one you already found :
Gedit/NewMDIPluginHowTo
I know it can be hard to understand in a first view, but if you read it a few times and give it a try with a basic example, you should be able to achieve getting results quite fast.
Is there something specific that you don't understand?
You can also download some examples of plugins available in C:
https://gitlab.gnome.org/GNOME/gedit/-/tree/gnome-2-30/plugins
Well, you can always email some of the core Gedit developers about your question, I'm sure they have something to give. Try find them via Gedit: Help>About>Credits.
Good luck.

Is there something similar for emacs like vims's NERDtree

For vim there is a filesystem explorer called NERDtree: https://github.com/scrooloose/nerdtree
Surely an alternative or superior package exists for Emacs?
I prefer dirtree (screenshot below) by Ye Wenbin. It feels pretty close to NERDTree / the TextMate drawer.
It took me a few minutes of trial and error to figure out the dependencies, so take a look at the install instructions (and a few minor edits to the source) I've got in this repo.
You can try NeoTree .
https://github.com/jaypei/emacs-neotree
Screenshot:
Have you looked at Speedbar ?
The Sunrise Commander seems to be a well written package, and it has a tree extension. For a screenshot of the tree extension in action, follow this link.
Who needs any tree, when you have the mighty ido-mode . If you can train your mind to find the files, rather than just your eyes whilst visually finding it, you will win. NO need to tell me how biology works, i don't care :-) you get the point.
Personally, I prefer the ECB's tree mode.
http://ecb.sourceforge.net/
You should also check out the CEDET stuff.
http://cedet.sourceforge.net/
They contain a lot of other useful stuff that you can use for similar development needs.
I use a little of emacs-nav and a little of dired to navigate my projects' file trees. For file management tasks, I mostly use bash (often from within emacs).
(Shameless reanswer from A good project tree browser for Emacs? - Stack Overflow)
I just now did a word search for "explore" in package-list-packages, and discovered project-explorer. Seems to fit exactly what I want today (I don't code hardly, but getting a grip on the structure of my Jekyll site).
Keys include TAB for folding and unfolding directories. Open files with RET or f, but with prefix, it will prompt nicely for which window, and even from there allow you to decide to use window or open up a new one to any side (I didn't find the prompt string in the package code, so it seems to leverage built in Emacs functionality nicely; indeed it looks like dired even).
It's available on Melpa and Marmalade, and packaged description points to sabof_project-explorer ยท GitHub.
I include the site's image for convenience:
I don't use projectile or helm, but it has some integration.
Try out lusty-explorer. It's a well done plugin.
Get it here

Resources