Tutorial Kiến thức iMacros căn bản cho người mới

à bác @0822 e hỏi chút, e muốn set true/false thì dùng lệnh gì để set ? e tìm hết mấy đoạn bác share mà chỉ biết đc mỗi Int vs Char thôi.
Code:
   pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
        pro = pref.getBranch("browser.cache.disk.");
        pro.setIntPref("capacity", 5120);
        pro.setIntPref("smart_size.enabled", false);
thím phải xác định xem, nó là kiểu dữ liệu gì nhé, không phải cứ điền bừa là nó chạy đâu :confused:
PHP:
pref = imns.Cc["@mozilla.org/preferences-service;1"].getService(imns.Ci.nsIPrefBranch);
pref.setIntPref("browser.cache.disk.capacity", 5120);
pref.setBoolPref("browser.cache.disk.smart_size.enabled", 0);
 
thím phải xác định xem, nó là kiểu dữ liệu gì nhé, không phải cứ điền bừa là nó chạy đâu :confused:
PHP:
pref = imns.Cc["@mozilla.org/preferences-service;1"].getService(imns.Ci.nsIPrefBranch);
pref.setIntPref("browser.cache.disk.capacity", 5120);
pref.setBoolPref("browser.cache.disk.smart_size.enabled", 0);
e hiểu rùi, 1=true, 0= false. thảo nào tìm mãi k thấy cái kiểu true false. có thấy pref.setBoo mà k thấy true/ false nên e k thử.
 
Các bác cho mình hỏi, mình làm cái auto điền vào appleid, https://appleid.apple.com/account#!&page=create
bị lỗi ở chỗ ngày tháng năm sinh
code
Code:
VERSION BUILD=1001 RECORDER=CR
URL GOTO=https://appleid.apple.com/account#!&page=create
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:"name*" CONTENT=Minh
TAG POS=2 TYPE=INPUT:TEXT ATTR=ID:"name*" CONTENT=Hai
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:"input*" CONTENT=10/10/199y2
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=ID:password CONTENT=Kkkkkkkk
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=ID:confirm-password-input CONTENT=Kkkkkkkk
TAG POS=1 TYPE=SELECT ATTR=TXT:Security<SP>Question<SP>1<SP>What<SP>is<SP>the<SP>first<SP>n* CONTENT=%130
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:"idms-input-*" CONTENT=123
TAG POS=1 TYPE=SELECT ATTR=TXT:Security<SP>Question<SP>2<SP>What<SP>is<SP>your<SP>dream* CONTENT=%136
TAG POS=2 TYPE=INPUT:TEXT ATTR=ID:"idms-input-*" CONTENT=1234
TAG POS=1 TYPE=SELECT ATTR=TXT:Security<SP>Question<SP>3<SP>In<SP>what<SP>city<SP>did<SP>yo* CONTENT=%142
TAG POS=3 TYPE=INPUT:TEXT ATTR=ID:"idms-input-*" CONTENT=12345

bác nào biết fix như nào không ạ?
CONTENT=10/10/199y2
sai chổ này . 1992 chứ ko phải 199y2
 
EVENTS TYPE=KEYPRESS nhé :))
Code:
VERSION BUILD=8970419 RECORDER=FX
TAB OPEN
TAB T=1
TAB CLOSE
TAB T=1
SET !DATASOURCE E:\Outlook.csv
SET !DATASOURCE_LINE {{!LOOP}}
SET !DATASOURCE_COLUMNS 5
URL GOTO=https://appleid.apple.com/account#!&page=create
TAG POS=1 TYPE=KEYPRESS:TEXT ATTR=ID:"name*" CONTENT={{!COL1}}
TAG POS=2 TYPE=KEYPRESS:TEXT ATTR=ID:"name*" CONTENT={{!COL2}}
TAG POS=1 TYPE=KEYPRESS:TEXT ATTR=ID:"input*" CONTENT={{!COL3}}
TAG POS=1 TYPE=KEYPRESS:EMAIL ATTR=ID:"input*" CONTENT={{!COL4}}
SET !ENCRYPTION NO
TAG POS=1 TYPE=KEYPRESS:PASSWORD ATTR=ID:password CONTENT=Khong912!@#
TAG POS=1 TYPE=KEYPRESS:PASSWORD ATTR=ID:confirm-password-input CONTENT=Khong912!@#
TAG POS=1 TYPE=SELECT ATTR=TXT:Security<SP>Question<SP>1<SP>What<SP>is<SP>the<SP>first<SP>n* CONTENT=%130
TAG POS=1 TYPE=KEYPRESS:TEXT ATTR=ID:"idms-input*" CONTENT=123
TAG POS=1 TYPE=SELECT ATTR=TXT:Security<SP>Question<SP>2<SP>What<SP>is<SP>your<SP>dream* CONTENT=%136
TAG POS=2 TYPE=KEYPRESS:TEXT ATTR=ID:"idms-input*" CONTENT=1234
TAG POS=1 TYPE=SELECT ATTR=TXT:Security<SP>Question<SP>3<SP>In<SP>what<SP>city<SP>did<SP>yo* CONTENT=%142
TAG POS=3 TYPE=KEYPRESS:TEXT ATTR=ID:"idms-input*" CONTENT=12345
như này hả cậu?
 
Code:
VERSION BUILD=8970419 RECORDER=FX
TAB OPEN
TAB T=1
TAB CLOSE
TAB T=1
SET !DATASOURCE E:\Outlook.csv
SET !DATASOURCE_LINE {{!LOOP}}
SET !DATASOURCE_COLUMNS 5
URL GOTO=https://appleid.apple.com/account#!&page=create
TAG POS=1 TYPE=KEYPRESS:TEXT ATTR=ID:"name*" CONTENT={{!COL1}}
TAG POS=2 TYPE=KEYPRESS:TEXT ATTR=ID:"name*" CONTENT={{!COL2}}
TAG POS=1 TYPE=KEYPRESS:TEXT ATTR=ID:"input*" CONTENT={{!COL3}}
TAG POS=1 TYPE=KEYPRESS:EMAIL ATTR=ID:"input*" CONTENT={{!COL4}}
SET !ENCRYPTION NO
TAG POS=1 TYPE=KEYPRESS:PASSWORD ATTR=ID:password CONTENT=Khong912!@#
TAG POS=1 TYPE=KEYPRESS:PASSWORD ATTR=ID:confirm-password-input CONTENT=Khong912!@#
TAG POS=1 TYPE=SELECT ATTR=TXT:Security<SP>Question<SP>1<SP>What<SP>is<SP>the<SP>first<SP>n* CONTENT=%130
TAG POS=1 TYPE=KEYPRESS:TEXT ATTR=ID:"idms-input*" CONTENT=123
TAG POS=1 TYPE=SELECT ATTR=TXT:Security<SP>Question<SP>2<SP>What<SP>is<SP>your<SP>dream* CONTENT=%136
TAG POS=2 TYPE=KEYPRESS:TEXT ATTR=ID:"idms-input*" CONTENT=1234
TAG POS=1 TYPE=SELECT ATTR=TXT:Security<SP>Question<SP>3<SP>In<SP>what<SP>city<SP>did<SP>yo* CONTENT=%142
TAG POS=3 TYPE=KEYPRESS:TEXT ATTR=ID:"idms-input*" CONTENT=12345
như này hả cậu?
chọn kiểu record là Event ấy
 
đại ka @0822 e hỏi chút. dùng java thì cách nào để lấy url hiện tại của page và gán cho 1 biến đc ? e có xem qua cái window.location.host nhưng vẫn chưa nắm đc.
 
đại ka @0822 e hỏi chút. dùng java thì cách nào để lấy url hiện tại của page và gán cho 1 biến đc ? e có xem qua cái window.location.host nhưng vẫn chưa nắm đc.
var siteurl = window.location.href;
 
trước m có share ae code change mac, h rảnh share ae code change timezone theo ip (múi giờ của pc) bằng imacro tầm 2-3s chậm thì 5s. change timezone thì để tăng ẩn danh (10% whoer), kiểm tra múi giờ: run >> cmd > timedate.cpl

lúc đầu m tính nhét chung 1 files mà nó lên gần 2 nghìn dòng code, sợ chạy nó chậm lên cuối cùng m tách ra cho nó nhẹ.
code thì đơn giản cũng gồm js, php, vbs, cmd...link tải: https://goo.gl/1uLrhC tương tự fake ngôn ngữ theo ip cũng vậy.
cách xài thì copy mục vbs vào trong ổ D, còn timezone.js copy vào trong ổ imacro rồi chạy là xong.

image.php


nếu muốn lồng vào các đoạn mã khác thì bạn thêm code ở dưới, ở đây m ko xài "URL GOTO=imacros://run/?m=1.js" nó chớp cái nhìn tức mắt lắm, mà nhìu thím trong 4rum vẫn xài được. còn sao .iim phải thêm clear thì do cache cũ chạy nhiều bị treo ý, thì get php sẽ bị nhầm, nên cứ thêm clear cho chắc ăn:)
Code:
function readExt(filename) {
    return imns.FIO.readTextFile(imns.FIO.openNode(filename))
}
function Gam() {
    f = 'C:\\Users\\iMacros\\Macros\\timezone.js' /*đổi timezone*/
    s = readExt(f);
    eval(s);
    iimPlay(`#Current.iim`); /*files iim thì nhớ thêm CLEAR*/
    /*____CODE____*/
    /*____CODE____*/
}
Gam();
nó báo lỗi dòng 30. "ReferenceError: sound is not defined, line 30 (Error code: -991)"
 
với .iim biết cách học thì 1-2h là lên trình pro, còn .js thì m học tầm 3-4h học mấy cái vòng lặp cơ bản thôi :eek:
lý thuyết vậy thôi bác, bắt đầu từ số 0 mà tự mò mẫm google cũng mất thời gian lắm, mà lại cái kiểu không chuyên thì được vài hôm lại quên hết.
học phải đi đôi với hành, gặp khúc mắc có người giải khai ngay mới lên nhanh được.
chứ tay ngang như bọn em thì biết đến bao giờ, code imacro được 1 đoạn đến tuần có khi cả tháng sau mới tìm đoạn mới, :p
 
lý thuyết vậy thôi bác, bắt đầu từ số 0 mà tự mò mẫm google cũng mất thời gian lắm, mà lại cái kiểu không chuyên thì được vài hôm lại quên hết.
học phải đi đôi với hành, gặp khúc mắc có người giải khai ngay mới lên nhanh được.
chứ tay ngang như bọn em thì biết đến bao giờ, code imacro được 1 đoạn đến tuần có khi cả tháng sau mới tìm đoạn mới, :p
cái này nhà trường đâu có dạy đâu thím, m cũng đi từ số 0 nên mà, m còn dốt tiếng anh nữa cơ :confused:
m chịu khó mò sang mấy site nga học lóm, quẩy nhiệt tình cơ hoặc thím ngại thì thuê người dạy cho nhanh.
nó báo lỗi dòng 30. "ReferenceError: sound is not defined, line 30 (Error code: -991)"
thím clone ai mà đào lên thế? xài imacro 8.9.7 tắt update, nếu vẫn bị lỗi thì thím tải code dưới về chạy.
chức năng change timezone(đổi múi giờ máy tính) + langue (ngôn ngữ trình duyệt) theo ip, vào whoer.net để kiểm tra.
tạo file test.js rồi copy code đó vào....
lưu ý: fake timezone bắt buộc phải rs lại trình duyệt, thì timezone mới đúng.
PHP:
var Comment = {
    _0xd122: function() {
        var _0xd001 = "http://ip-api.com/json/";
        _0xd002 = imns.Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(imns.Ci.nsIXMLHttpRequest);
        _0xd002.onload = function(_0xd003) {
            _0xd004 = _0xd003.target.responseText;
            _0xd005 = _0xd004.slice(_0xd004.indexOf("countryCode") + 14, _0xd004.length);
            _0xd006 = _0xd005.slice('"countryCode":"', _0xd005.indexOf('","isp'));
            _0xd007 = imns.Cc["@mozilla.org/preferences-service;1"].getService(imns.Ci.nsIPrefBranch);
            _0xd007.setCharPref("intl.accept_languages", _0xd006);
            if (_0xd006 == "VN" || _0xd006 == "KH" || _0xd006 == "CX" || _0xd006 == "ID" || _0xd006 == "LA" || _0xd006 == "TH") {
                _0xd008 = "SE Asia Standard Time";
            } else if (_0xd006 == "AF") {
                _0xd008 = "Afghanistan Standard Time";
            } else if (_0xd006 == "AX" || _0xd006 == "BG" || _0xd006 == "EE" || _0xd006 == "FI" || _0xd006 == "LV" || _0xd006 == "LT" || _0xd006 == "UA") {
                _0xd008 = "FLE Standard Time";
            } else if (_0xd006 == "AL" || _0xd006 == "CZ" || _0xd006 == "HU" || _0xd006 == "RS" || _0xd006 == "SK" || _0xd006 == "SI") {
                _0xd008 = "Central Europe Standard Time";
            } else if (_0xd006 == "DZ" || _0xd006 == "AO" || _0xd006 == "BJ" || _0xd006 == "CM" || _0xd006 == "CF" || _0xd006 == "TD" || _0xd006 == "CG" || _0xd006 == "CD" || _0xd006 == "GQ" || _0xd006 == "GA" || _0xd006 == "NE" || _0xd006 == "NG" || _0xd006 == "TN") {
                _0xd008 = "W. Central Africa Standard Time";
            } else if (_0xd006 == "AS" || _0xd006 == "NU" || _0xd006 == "UM") {
                _0xd008 = "UTC-11";
            } else if (_0xd006 == "AD" || _0xd006 == "AT" || _0xd006 == "DE" || _0xd006 == "GI" || _0xd006 == "IT" || _0xd006 == "LI" || _0xd006 == "LU" || _0xd006 == "MT" || _0xd006 == "MC" || _0xd006 == "NL" || _0xd006 == "NO" || _0xd006 == "SM" || _0xd006 == "SJ" || _0xd006 == "SE" || _0xd006 == "CH" || _0xd006 == "VA") {
                _0xd008 = "W. Europe Standard Time";
            } else if (_0xd006 == "AI" || _0xd006 == "AG" || _0xd006 == "AW" || _0xd006 == "BB" || _0xd006 == "BO" || _0xd006 == "BQ" || _0xd006 == "CW" || _0xd006 == "DM" || _0xd006 == "DO" || _0xd006 == "GD" || _0xd006 == "GP" || _0xd006 == "GY" || _0xd006 == "MQ" || _0xd006 == "MS" || _0xd006 == "PR" || _0xd006 == "BL" || _0xd006 == "KN" || _0xd006 == "LC" || _0xd006 == "MF" || _0xd006 == "VC" || _0xd006 == "SX" || _0xd006 == "TT" || _0xd006 == "VI" || _0xd006 == "VG") {
                _0xd008 = "SA Western Standard Time";
            } else if (_0xd006 == "AQ" || _0xd006 == "CL") {
                _0xd008 = "Pacific SA Standard Time";
            } else if (_0xd006 == "AR") {
                _0xd008 = "Argentina Standard Time";
            } else if (_0xd006 == "AM") {
                _0xd008 = "Caucasus Standard Time";
            } else if (_0xd006 == "AU") {
                _0xd008 = "AUS Eastern Standard Time";
            } else if (_0xd006 == "AZ") {
                _0xd008 = "Azerbaijan Standard Time";
            } else if (_0xd006 == "BS" || _0xd006 == "CA" || _0xd006 == "CU" || _0xd006 == "HT" || _0xd006 == "TC") {
                _0xd008 = "Eastern Standard Time";
            } else if (_0xd006 == "FK" || _0xd006 == "GF" || _0xd006 == "SR") {
                _0xd008 = "SA Eastern Standard Time";
            } else if (_0xd006 == "BH" || _0xd006 == "KW" || _0xd006 == "QA" || _0xd006 == "SA" || _0xd006 == "YE") {
                _0xd008 = "Arab Standard Time";
            } else if (_0xd006 == "BD" || _0xd006 == "BT") {
                _0xd008 = "Bangladesh Standard Time";
            } else if (_0xd006 == "BY") {
                _0xd008 = "Belarus Standard Time";
            } else if (_0xd006 == "BE" || _0xd006 == "DK" || _0xd006 == "FR" || _0xd006 == "ES") {
                _0xd008 = "Romance Standard Time";
            } else if (_0xd006 == "BZ" || _0xd006 == "CR" || _0xd006 == "SV" || _0xd006 == "GT" || _0xd006 == "HN" || _0xd006 == "NI") {
                _0xd008 = "Central America Standard Time";
            } else if (_0xd006 == "BM") {
                _0xd008 = "Atlantic Standard Time";
            } else if (_0xd006 == "VE") {
                _0xd008 = "Venezuela Standard Time";
            } else if (_0xd006 == "BA" || _0xd006 == "HR" || _0xd006 == "XK" || _0xd006 == "MK" || _0xd006 == "ME" || _0xd006 == "PL") {
                _0xd008 = "Central European Standard Time";
            } else if (_0xd006 == "BW" || _0xd006 == "BI" || _0xd006 == "LS" || _0xd006 == "MW" || _0xd006 == "MZ" || _0xd006 == "RW" || _0xd006 == "ZA" || _0xd006 == "SZ" || _0xd006 == "ZM" || _0xd006 == "ZW") {
                _0xd008 = "South Africa Standard Time";
            } else if (_0xd006 == "BV") {
                _0xd008 = "UTC";
            } else if (_0xd006 == "KI" || _0xd006 == "MH" || _0xd006 == "NR" || _0xd006 == "TV" || _0xd006 == "WF") {
                _0xd008 = "UTC+12";
            } else if (_0xd006 == "GS") {
                _0xd008 = "UTC-02";
            } else if (_0xd006 == "BR") {
                _0xd008 = "E. South America Standard Time";
            } else if (_0xd006 == "IO" || _0xd006 == "KZ" || _0xd006 == "KG") {
                _0xd008 = "Central Asia Standard Time";
            } else if (_0xd006 == "BN" || _0xd006 == "MY" || _0xd006 == "PH" || _0xd006 == "SG") {
                _0xd008 = "Singapore Standard Time";
            } else if (_0xd006 == "BF" || _0xd006 == "CI" || _0xd006 == "GM" || _0xd006 == "GH" || _0xd006 == "GN" || _0xd006 == "GW" || _0xd006 == "IS" || _0xd006 == "LR" || _0xd006 == "ML" || _0xd006 == "MR" || _0xd006 == "SH" || _0xd006 == "ST" || _0xd006 == "SN" || _0xd006 == "SL" || _0xd006 == "TG") {
                _0xd008 = "Greenwich Standard Time";
            } else if (_0xd006 == "CV") {
                _0xd008 = "Cape Verde Standard Time";
            } else if (_0xd006 == "KY" || _0xd006 == "CO" || _0xd006 == "EC" || _0xd006 == "JM" || _0xd006 == "PA" || _0xd006 == "PE") {
                _0xd008 = "SA Pacific Standard Time";
            } else if (_0xd006 == "CN" || _0xd006 == "HK" || _0xd006 == "MO") {
                _0xd008 = "China Standard Time";
            } else if (_0xd006 == "CC" || _0xd006 == "MM") {
                _0xd008 = "Myanmar Standard Time";
            } else if (_0xd006 == "KM" || _0xd006 == "DJ" || _0xd006 == "ER" || _0xd006 == "ET" || _0xd006 == "KE" || _0xd006 == "MG" || _0xd006 == "YT" || _0xd006 == "SO" || _0xd006 == "SS" || _0xd006 == "SD" || _0xd006 == "TZ" || _0xd006 == "UG") {
                _0xd008 = "E. Africa Standard Time";
            } else if (_0xd006 == "CK" || _0xd006 == "PF") {
                _0xd008 = "Hawaiian Standard Time";
            } else if (_0xd006 == "CY" || _0xd006 == "LY") {
                _0xd008 = "E. Europe Standard Time";
            } else if (_0xd006 == "TL" || _0xd006 == "JP" || _0xd006 == "PW") {
                _0xd008 = "Tokyo Standard Time";
            } else if (_0xd006 == "EG" || _0xd006 == "PS") {
                _0xd008 = "Egypt Standard Time";
            } else if (_0xd006 == "FO" || _0xd006 == "GG" || _0xd006 == "IE" || _0xd006 == "JE" || _0xd006 == "IM" || _0xd006 == "PT" || _0xd006 == "GB") {
                _0xd008 = "GMT Standard Time";
            } else if (_0xd006 == "FJ") {
                _0xd008 = "Fiji Standard Time";
            } else if (_0xd006 == "TF" || _0xd006 == "MV" || _0xd006 == "TJ" || _0xd006 == "TM" || _0xd006 == "UZ") {
                _0xd008 = "West Asia Standard Time";
            } else if (_0xd006 == "GE") {
                _0xd008 = "Georgian Standard Time";
            } else if (_0xd006 == "GR" || _0xd006 == "MD" || _0xd006 == "RO") {
                _0xd008 = "GTB Standard Time";
            } else if (_0xd006 == "GL" || _0xd006 == "PM") {
                _0xd008 = "Greenland Standard Time";
            } else if (_0xd006 == "GU" || _0xd006 == "FM" || _0xd006 == "MP" || _0xd006 == "PG") {
                _0xd008 = "West Pacific Standard Time";
            } else if (_0xd006 == "HM" || _0xd006 == "MU" || _0xd006 == "RE" || _0xd006 == "SC") {
                _0xd008 = "Mauritius Standard Time";
            } else if (_0xd006 == "IN") {
                _0xd008 = "India Standard Time";
            } else if (_0xd006 == "IR") {
                _0xd008 = "Iran Standard Time";
            } else if (_0xd006 == "IQ") {
                _0xd008 = "Arabic Standard Time";
            } else if (_0xd006 == "IL") {
                _0xd008 = "Israel Standard Time";
            } else if (_0xd006 == "JO") {
                _0xd008 = "Jordan Standard Time";
            } else if (_0xd006 == "KR" || _0xd006 == "KP") {
                _0xd008 = "Korea Standard Time";
            } else if (_0xd006 == "LB") {
                _0xd008 = "Middle East Standard Time";
            } else if (_0xd006 == "MX") {
                _0xd008 = "Central Standard Time (Mexico)";
            } else if (_0xd006 == "MN") {
                _0xd008 = "Ulaanbaatar Standard Time";
            } else if (_0xd006 == "MA") {
                _0xd008 = "Morocco Standard Time";
            } else if (_0xd006 == "NA") {
                _0xd008 = "Namibia Standard Time";
            } else if (_0xd006 == "NP") {
                _0xd008 = "Nepal Standard Time";
            } else if (_0xd006 == "NC" || _0xd006 == "NF" || _0xd006 == "SB" || _0xd006 == "VU") {
                _0xd008 = "Central Pacific Standard Time";
            } else if (_0xd006 == "NZ") {
                _0xd008 = "New Zealand Standard Time";
            } else if (_0xd006 == "OM" || _0xd006 == "AE") {
                _0xd008 = "Arabian Standard Time";
            } else if (_0xd006 == "PK") {
                _0xd008 = "Pakistan Standard Time";
            } else if (_0xd006 == "PY") {
                _0xd008 = "Paraguay Standard Time";
            } else if (_0xd006 == "PN" || _0xd006 == "US") {
                _0xd008 = "Pacific Standard Time";
            } else if (_0xd006 == "RU") {
                _0xd008 = "Russian Standard Time";
            } else if (_0xd006 == "WS") {
                _0xd008 = "Samoa Standard Time";
            } else if (_0xd006 == "LK") {
                _0xd008 = "Sri Lanka Standard Time";
            } else if (_0xd006 == "SY") {
                _0xd008 = "Syria Standard Time";
            } else if (_0xd006 == "TW") {
                _0xd008 = "Taipei Standard Time";
            } else if (_0xd006 == "TK" || _0xd006 == "TO") {
                _0xd008 = "Tonga Standard Time";
            } else if (_0xd006 == "TR") {
                _0xd008 = "Turkey Standard Time";
            } else if (_0xd006 == "UY") {
                _0xd008 = "Montevideo Standard Time";
            } else {
                throw new Error("stop _0xd001!!");
            }
            try {
                iimDisplay("♪ timezone = " + _0xd006);
                _0xd009 = 'tzutil /s "' + _0xd008 + '"';
                imns.FIO.writeTextFile(imns.FIO.openNode("C:\\tom\\ngon.bat"), _0xd009);
            } catch (error) {
                throw new Error("stop _0xd002!!");
            }

            _0xd010 = imns.Cc["@mozilla.org/file/local;1"].createInstance(imns.Ci.nsILocalFile);
            try {
                _0xd010.initWithPath("C:\\tom\\convert_.vbs");
                _0xd010.launch();
            } catch (error) {
                throw new Error("stop _0xd003!!");
            }

            try {
                _0xd010.initWithPath("C:\\tom\\ngon.bat");
                _0xd010.launch();
            } catch (error) {
                throw new Error("stop _0xd004!!!");
            }
        };
        _0xd002.open("GET", _0xd001, true);
        _0xd002.send(null);
    }
};
Comment._0xd122();
vào ổ C tạo thư mục C:\tom\convert_.vbs copy đoạn code dưới vào.
lưu ý: engcoding .vbs là ANSI nhé, để UTF8 là lỗi đấy.
PHP:
Set streamUTF8 = CreateObject("ADODB.Stream")
Set streamASCII = CreateObject("ADODB.Stream")

streamUTF8.Open
streamUTF8.Type = 2
streamUTF8.LineSeparator = -1
streamUTF8.Charset = "UTF-8"
streamUTF8.LoadFromFile "ngon.bat"

streamASCII.Open
streamASCII.Type = 2
streamASCII.LineSeparator = -1
streamASCII.CharSet = "us-ascii"

Do Until streamUTF8.EOS
streamASCII.WriteText streamUTF8.ReadText(-2), 1
Loop
streamUTF8.Close
streamASCII.SaveToFile "ngon.bat", 2
streamASCII.Close
 
Share ae function save file bằng java code khá hữu dụng. ưu điểm so vs save bằng iim là nội dung save k nằm trong dấu nháy (") :D:D

PHP:
function getiMacrosFile(){
   return imns.Pref.getFilePref('deflogpath').path;
}

function save_logs(logFileName) { //đặt tên file logs trong () khi gọi hàm.
    var logs ='' //Gán nội dung cần save
    logs =  logs + '\n';
    var logFilePath = getiMacrosFile()+'\\'+logFileName;
    var file_o = imns.FIO.openNode(logFilePath);
    imns.FIO.appendTextFile(file_o, logs);
}
save_logs('logs.txt')

Cách dùng: Khi gọi hàm thì gán biến nội dung cần lưu cho biến logs. File sau khi lưu sẽ nằm ở thư mục Imacros (C:\Users\Administrator\Documents\iMacros)
Lưu ý nữa là khi mở file log nên mở bằng notepad++, còn tại sao thì sử dụng sẽ biết :):)
 
Last edited:
Share ae function save file bằng java code khá hữu dụng.
ưu điểm so vs save bằng iim là nội dung save k nằm trong dấu nháy (") :D:D

Cách dùng: Khi gọi hàm thì gán biến nội dung cần lưu cho biến logs. File sau khi lưu sẽ nằm ở thư mục Imacros (C:\Users\Administrator\Documents\iMacros)
Lưu ý nữa là khi mở file log nên mở bằng notepad++, còn tại sao thì sử dụng sẽ biết :):)
chà chà, dạo này thím lên trình dữ ta, mà thím nhầm java với javascript rồi, 2 ngôn ngữ khác nhau, còn viết tắt thì .js :D:D
mấy .js chỉ phù hợp mấy thím code thuần .js thui, mà ae trong 4r thì lại đa số chỉ ở trình .iim nên chả sử dụng được.
mà ở logs = logs + '\n' của thím bị thiếu kìa phải là '\r\n' mới đúng thì nó mới xuống dòng.

tương tự như code thím, nhỏ nhỏ xinh xinh :)
PHP:
_0xd190 = function(a, b) {
    _0xd191 = imns.FIO.openNode(a);
    imns.FIO.appendTextFile(_0xd191, b);
};
_0xd190("D:\\test.txt", "1111111111");
 
Last edited:
chà chà, dạo này thím lên trình dữ ta, mà thím nhầm java với javascript rồi, 2 ngôn ngữ khác nhau, còn viết tắt thì .js :D:D
mấy .js chỉ phù hợp mấy thím code thuần .js thui, mà ae trong 4r thì lại đa số chỉ ở trình .iim nên chả sử dụng được.

tương tự như code thím, nhỏ nhỏ xinh xinh :)
mỗi ngày e học thêm đc 1 ít, ráng 1 ngày đu theo đc le vồ của bác chứ. :D:D mà e để ý thấy bác hay sài mấy cái biến dạng _0xd190. như vậy thì có ưu điểm gì k bác? e thì hay đặt tên theo mục đích để dễ nhận biết thôi.
 
tương tự như code thím, nhỏ nhỏ xinh xinh
code bác share chất quá, bê về chạy ngon và gọn nữa :D. kiểu này code e mới mò ra đành vứt xó rồi :oops:
 

Announcements

Today's birthdays

Forum statistics

Threads
418,318
Messages
7,069,984
Members
170,443
Latest member
789clubpage

Most viewed of week

Most viewed of week

Back
Top Bottom