Results 1 to 2 of 2
 0 Attachment(s)    

Thread: Screenshoot script help

  1. #1
    Junior Member
    Join Date
    Sep 2010
    Location
    sweden
    Posts
    2

    Default Screenshoot script help

    Hi

    I have this script to create screenshoot for every new open candle, but i need somebody can help me to modifie this to get by my self the time 2 ,5 ,10 seconds to get screensoot.

    Code:
    #property copyright "Nopik"
    #property link      "http://www.nopik.net"
    #property show_inputs
    
    #include <stdlib.mqh>
    
    extern bool Continuous = TRUE;
    extern string Sound = "";
    extern int Width = 1024;
    extern int Height = 768;
    extern string FTP = "/httpdocs/screenshots";
    
    int start() {
       datetime l_time_0;
       if (Continuous == FALSE) Snap();
       else {
          l_time_0 = 0;
          while (IsStopped() == FALSE) {
             RefreshRates();
             if (Time[0] > l_time_0) {
                Snap();
                l_time_0 = Time[0];
             }
             Sleep(1000);
          }
       }
       return (0);
    }
    
    void Snap() {
       int l_error_16;
       int l_datetime_0 = TimeLocal();
       Comment("Snapshooter v1.2\n", TimeToStr(l_datetime_0, TIME_DATE|TIME_SECONDS));
       string ls_4 = "Screenshot_" + pad(TimeYear(l_datetime_0)) + "_" + pad(TimeMonth(l_datetime_0)) + "_" + pad(TimeDay(l_datetime_0)) + " " + pad(TimeHour(l_datetime_0)) + "_" + pad(TimeMinute(l_datetime_0)) + "_" + pad(TimeSeconds(l_datetime_0)) + ".gif";
       bool l_bool_12 = WindowScreenShot(ls_4, Width, Height);
       if (!l_bool_12) {
          l_error_16 = GetLastError();
          Print("Error: ", l_bool_12, " ", ErrorDescription(l_error_16));
       } else Print("OK");
       if (Sound != "") PlaySound(Sound);
       if (FTP != "") SendFTP(ls_4, FTP);
    }
    
    string pad(int ai_0) {
       string ls_ret_4 = ai_0;
       if (StringLen(ls_ret_4) < 2) return ("0" + ls_ret_4);
       return (ls_ret_4);
    }

  2. #2
    Member
    Join Date
    Jan 2009
    Location
    Austria
    Posts
    325

    Default

    try this:

    extern bool WriteScreenshots = true;

    void Screenshot(string name)
    {
    if ( WriteScreenshots )
    WindowScreenShot(WindowExpertName()+"_"+Symbol()+" _M"+Period()+"_"+
    Year()+"-"+two_digits(Month())+"-"+two_digits(Day())+"_"+
    two_digits(Hour())+"-"+two_digits(Minute())+"-"+two_digits(Seconds())+"_"+
    name+".gif", 1024, 768);
    }
    IXBONE
    Business Internet Services | IX Trader Forex Software
    Registered Internet Service Provider (Ripe: AS 16195)

Similar Threads

  1. Script open buy and sell together
    By naughtybrain in forum Scripts and other tools
    Replies: 3
    Last Post: 01-19-2015, 10:20
  2. Looking for script that will close orders
    By traffik in forum Scripts and other tools
    Replies: 3
    Last Post: 06-28-2012, 01:00
  3. Martingale EA timer script?
    By starlogic in forum Scripts and other tools
    Replies: 1
    Last Post: 12-03-2011, 18:42
  4. Disable EA form EA or script
    By netmastro in forum MQL programming
    Replies: 3
    Last Post: 11-04-2010, 15:31
  5. JMBuyer Script.
    By mike2star in forum MQL programming
    Replies: 7
    Last Post: 12-18-2009, 08:44

Tags for this Thread

100, candle, date, time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •