Any Method to export the cookie ??

wongtakming

Client
Регистрация
29.07.2012
Сообщения
7
Благодарностей
0
Баллы
1
I want to save the cookie while I run proj.
is there any method to export the cookie ???
I just see setting have a place set the path to cookie and cache ,
I set the path... but I cannot see the cookie file ....
anyone can help ><???
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
831
Баллы
113
You can save the profile and load them later
 

wongtakming

Client
Регистрация
29.07.2012
Сообщения
7
Благодарностей
0
Баллы
1
but can I export the only the cookie part from the profile ?????
 

wongtakming

Client
Регистрация
29.07.2012
Сообщения
7
Благодарностей
0
Баллы
1
or any method to decode .zpprofile file ???
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
831
Баллы
113
there is instance.SaveCookie(string path); method
 

wongtakming

Client
Регистрация
29.07.2012
Сообщения
7
Благодарностей
0
Баллы
1
can you please a little bit explain how to use C# code ?

the following is my code, but seems not working ><""

================================================
using System;
using Zennolab.CommandCenter;

Instance instance = new Instance("127.0.0.1", 40500, "server"); //<----- is that connect to current running instance ???if not.. how to put current current instance into object ??

instance.SaveCookie("C:\Users\Kazuki\Desktop\zennolab_template\cookie.txt"); // <----------- this path is the file I want to save the cookie??

====================================================
please help me ><|||||
 

shade

Client
Регистрация
19.11.2010
Сообщения
580
Благодарностей
346
Баллы
63
can you please a little bit explain how to use C# code ?

the following is my code, but seems not working ><""

================================================
using System;
using Zennolab.CommandCenter;

Instance instance = new Instance("127.0.0.1", 40500, "server"); //<----- is that connect to current running instance ???if not.. how to put current current instance into object ??

instance.SaveCookie("C:\Users\Kazuki\Desktop\zennolab_template\cookie.txt"); // <----------- this path is the file I want to save the cookie??

====================================================
please help me ><|||||
You something mixed up.
First: the current Instance object represented by instance variable (in PM own code and in CodeCreator). There is no need to create it.
Second: For saving cookie need use the Instance.SaveCookie method, but in your code there is one mistake. In string value in C# you must escape some characters, such as \, ", '.... It should look like this:" \ \ "," \ "", "\'". Or before the start of string to put the @.
JavaScript:
instance.SaveCookie(@"C:\Users\Kazuki\Desktop\zennolab_template\cookie.txt");
or
JavaScript:
instance.SaveCookie("C:\\Users\\Kazuki\\Desktop\\zennolab_template\\cookie.txt");
 
  • Спасибо
Реакции: noname007

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