WA
Topics
04 Jan 2013, 15:31
0
3299
2
11 Dec 2012, 03:45
3892
4
01 Dec 2012, 14:02
3631
3
Replies
Walber
11 Dec 2012, 15:31
Test follows the robot,
Walber said:
Test follows the robot,Olá,
Estou desenvolvendo uma rotina para enviar mensagem para um telefone celular, já tenho a página na INTERNET feito em asp, falta apenas a forma para executar página no ROBOT, alguem pode auxiliar.Hello,
I'm developing a routine to send message to a cell phone, I have a page on the INTERNET done in asp, missing only way to run the page ROBOT, can someone help.
// -------------------------------------------------------------------------------
//
// This is a Template used as a guideline to build your own Robot.
// Please use the “Feedback” tab to provide us with your suggestions about cAlgo’s API.
//
// -------------------------------------------------------------------------------
using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo.Robots
{
[Robot]
public class NewRobot : Robot
{
protected override void OnStart()
{
system("Arquivos de programas/Internet Explorer/iexplore C:\\Testmessage.asp");
}
protected override void OnTick()
{
// Put your core logic here
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
//
// This is a Template used as a guideline to build your own Robot.
// Please use the “Feedback” tab to provide us with your suggestions about cAlgo’s API.
//
// -------------------------------------------------------------------------------
using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo.Robots
{
[Robot]
public class NewRobot : Robot
{
protected override void OnStart()
{
system("Arquivos de programas/Internet Explorer/iexplore C:\\Testmessage.asp");
}
protected override void OnTick()
{
// Put your core logic here
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
compilation error:
Error: The name 'system' does not exist in the current context
@Walber
Walber
11 Dec 2012, 22:30
RE:
The following example for sending a message, the web page should be designed to pass a message to a cell phone number.
//
// This is a Template used as a guideline to build your own Robot.
// Please use the “Feedback” tab to provide us with your suggestions about cAlgo’s API.
//
// -------------------------------------------------------------------------------
using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
using System.IO;
using System.Net;
using System.Text;
namespace cAlgo.Robots
{
[Robot]
public class enviodemensagem : Robot
{
protected override void OnStart()
{
// Create a request for the URL.
WebRequest request = WebRequest.Create ("http://www.site.asp?moeda=AUD/USD");
// If required by the server, set the credentials.
request.Credentials = CredentialCache.DefaultCredentials;
// Get the response.
HttpWebResponse response = (HttpWebResponse)request.GetResponse ();
// Display the status.
Console.WriteLine (response.StatusDescription);
// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream ();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader (dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd ();
// Display the content.
Print("Arquivo = {0} ",responseFromServer);
// Cleanup the streams and the response.
reader.Close ();
dataStream.Close ();
response.Close ();
}
protected override void OnTick()
{
// Put your core logic here
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
@Walber