|
Process.Start()
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Process.Start("pause"); gives an error :S.
|
|
|
|
|
What do you expect it to do?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
He expects to run the special commands available in cmd.exe that are not exe files of their own. But he doesn't want to launch cmd.exe itself.
|
|
|
|
|
Like in unmanaged code when you type that it says "Press any key to continue..."
Thats not what I want it to do but its an example.
The school has cmd.exe blocked but I need it to run java commands in my program.
Thanks.
|
|
|
|
|
Then run the java vm with the appropriate command line arguments. Using Process.Start is exactly like typing whatever command your want to run in the Start/Run box, not the CMD window.
|
|
|
|
|
Hi all,
I need to turn offpower-off) the remote computer(Machine) monitor.Can any help me on this scenario.Is it is possible to do by c#.net.
Let me clearly explain me
there are Server and clients...
From server machine I need to turn off(power-off) the client system monitor
kindly help me....
|
|
|
|
|
You can't power down a monitor via code. But you may be able to put the system into sleep mode or maybe turn on the screen saver. Don't ask me how to do this, I'm just providing an idea.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: You can't power down a monitor via code.
Are you sure?[^]
It can be done locally but perhaps not remotely.
|
|
|
|
|
The code sample that is here on CP will work, but only for monitors that support it and only on the local machine. You'll have to write two applications to do this remotely. One app that runs, probably as a service, on each machine you want to control and one that sends the command to the service running on each machine.
|
|
|
|
|
How to send a key stroke from WordPad back to c# app then return control back to wordpad. I try to write a c# app that will catch each key stroke that type in wordpad, then send back some data back to wordpad. Two prgrams working concurrently ?
Example: in wordpad I type a letter "A", c# working in background catch it then send a number "1" back to workpad at focus cursor.
Please help.
|
|
|
|
|
You have to install a keyboard hook from your C# app.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
And what possible legitimate use would this be for. The only uses I can think of are nefarious and no one here will help you. If there is a legitimate case you would be better off creating a C# text editor.
only two letters away from being an asset
|
|
|
|
|
Hi,
On webpage when i click on pdf it's gives "too many arguments".I tried to to paste the pdf then it's working for first time.But again same problem.So what to do this.I am using C# and Oracle.
Thanks
|
|
|
|
|
Apparently, your code, whatever it is, sends too many arguments to Acrobat Reader. Since we know nothing of the code that generates the web page or what the link to your PDF looks like, it's impossible to tell you what you did wrong.
|
|
|
|
|
Hi,
After i paste time it works but after that it won't work.It gives "too many arguments"
A helpful guide that answers important questions, including how COUMADIN® (Warfarin Sodium Tablets, USP) works, diet and drug interactions, and the importance of therapy. Also available in Spanish.
Click here for a printer-friendly version
|
|
|
|
|
Uhhh... you might want to try reposting that, and before you click "Post Message", find and enable the little checkbox that says "Ignore HTML tags in this message..."
|
|
|
|
|
<td width="30%" class="resources termText">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top">
<a href="pdf/293US08WA03001_v7_UnderstandTherapyBro_WEB.pdf" target="_blank"><img src="img/resources/Understanding-your-COUMADIN-therapy-2008.jpg" alt="Coumadin: Patient Guide" width="52" height="85" border="0" /></a> </td>
<td align="left" valign="top" class="termTextHeader">Understanding Your COUMADIN (Warfarin Sodium Tablets, USP) Therapy Brochure</td>
</tr>
</table>
<p>A helpful guide that answers important questions, including how COUMADIN<sup>®</sup> (Warfarin Sodium Tablets, USP) works, diet and drug interactions, and the importance of therapy. Also available in Spanish.</p>
<p><a href="pdf/293US08WA03001_v7_UnderstandTherapyBro_WEB.pdf" target="_blank">Click here for a printer-friendly version</a></p>
</td>
|
|
|
|
|
Received: from [76.13.13.25] by t3.bullet.mud.yahoo.com with NNFMP; 16 Dec 2008 09:55:16 -0000
Received: from [76.13.10.167] by t4.bullet.mail.ac4.yahoo.com with NNFMP; 16 Dec 2008 09:55:16 -0000
Received: from [127.0.0.1] by omp108.mail.ac4.yahoo.com with NNFMP; 16 Dec 2008 09:55:16 -0000
How can you get say the second ip address or the third from the block above when it's always the only
thing enclosed [within square brackets] and the whole block consist of one long wrapped line..
Please help guys!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
If you don't care for the correctness of the IP then you can simply use this pattern:
\[\d+\.\d+\.\d+\.\d+\]
Otherwise you find a lot of IP validation patterns at www.regexlib.com[^]
You can use Regex.Matches to loop over all IPs found.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks looks like a good answer and I've already rated it so, but can you please tell me more and guide me how can I use this bloody Regex and read what it caught?? Please advise.
Many thanks Greeeeeeeeeeeeg
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Well, it's christmas, so here it goes
string str = "Received: from [76.13.13.25] (... rest of the string)"
string pattern = @"\[\d+\.\d+\.\d+\.\d+\]";
foreach (Match m in Regex.Matches(str, pattern))
{
Console.WriteLine(m.Value);
}
will output:
[76.13.13.25]
[76.13.10.167]
[127.0.0.1]
If you only need the IP then use this pattern: \[(\d+\.\d+\.\d+\.\d+)\] and use m.Groups[1].Value in the inner loop. Results in:
76.13.13.25
76.13.10.167
127.0.0.1
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
It works! Thanks mate
And Merry Christmas!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
You can use the NextMatch member of the Match class.
Regex re = new Regex();
Match m = re.Match();
while (m.Success())
{
m = m.NextMatch();
}
|
|
|
|