Using macro path in C#

  • Автор темы Автор темы krisztos
  • Дата начала Дата начала

krisztos

Client
Регистрация
28.06.2014
Сообщения
174
Реакции
8
Баллы
18
Some general question as I am not sure how tu use macro in c#:

Код:
Развернуть Свернуть Копировать
img.Save(@"{-//-}"+i.ToString()+@".jpeg");

When using direct path in place of {-//-} the code does the job as it's supposed to.
 
OK I see some changes in whole C# code for making a screensot after I upgraded zennoposter. Lately this code worked:

Код:
Развернуть Свернуть Копировать
HtmlElement he = instance.ActiveTab.FindElementByAttribute("body","fulltag","body","text",0);
int heHeight = Convert.ToInt32(he.GetAttribute("height"));
int heWidth = Convert.ToInt32(he.GetAttribute("width"));
int step =1000;
int countOfIterations = heHeight/step;
var bitmaps = new List<System.Drawing.Bitmap>();
int count =0;
for(int i =0;i<countOfIterations;i++)
{
    var text = he.DrawPartToBitmap(0, i*step, heWidth, step, true);
    byte[] imageBytes = Convert.FromBase64String(text);
    var ms = new System.IO.MemoryStream(imageBytes, 0, imageBytes.Length);
    var img = (System.Drawing.Bitmap)System.Drawing.Image.FromStream(ms);
    img.Save(project.Directory + i.ToString() + @".bpm");
    count++;
}

Now I got error:
Faulty operation: screenshot working fullof the action group id:
 
Why dont you use Captcha Recognition with CaptchaSaver.dll module?
 
Use project.Directory in C# code
 
I'm not sure where you want to use this path {-//-}
 
Why you wanna use {-//-}?
It's absolutely insane idea to send downloaded trash to system folder.
 
Use any other custom folder in this case
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)