إعـــــــلان

تقليص
لا يوجد إعلان حتى الآن.

إسترا^^بلاي

تقليص
هذا الموضوع مغلق.
X
X
 
  • تصفية - فلترة
  • الوقت
  • عرض
إلغاء تحديد الكل
مشاركات جديدة

  • #61
    السلام عليكم ورحمة الله وبركاته

    قبل الرجوع لآخر إنشغال .... أحببت أن أقرأ لأخ كريم أكواد أعجبتني شعرت أنه لم يطلع عليها متعلقة بمنصة الوينداوز
    و الوصول إلى بعض التفاصيل الدقيقــة في الجهاز قبل ذلك تفعيل الاضافة LuaCom ضروري
    لعمل الأكواد
    ملاحظة : بعض القيم المتغيرة اذ أريد توظيفها من الاحسن تستدعى من خلال الحدث on timer
    قرأت لك اليوم قد تحتاجها :
    الأكواد المتعلقة بــ : DataFile

    كود PHP:
    function WMIDateStringToDate(dtmDate)
        if 
    dtmDate then
            dtmDate 
    tostring(dtmDate);
            return (
    String.Mid (dtmDate72)  .. "/" ..
                    
    String.Mid (dtmDate52)  .. "/" ..
                    
    String.Left(dtmDate4)     .. " " ..
                    
    String.Mid (dtmDate92)  .. ":" .. 
                    
    String.Mid (dtmDate112) .. ":" .. 
                    
    String.Mid (dtmDate132)
                   );
        else
            return 
    "";
        
    end
    end

    function Escape(v)
        if (
    == nilthen return ""end
        
    if (type(v) == "table"then return Table.Concat(v", "); end
        
    if (type(v) == "boolean"then
            
    if (== truethen return "Yes"; else return "No"end
        end
        
    return v;
    end

    local sOutput      
    "";
    local sOutputTitle "Computer: localhost\r\n==========================================\r\n\r\n";
    local oWMIService  luacom.GetObject("winmgmts:\\\\localhost\\root\\CIMV2");
    local oColItems    oWMIService:ExecQuery("SELECT * FROM CIM_DataFile""WQL"48);
    if 
    oColItems then
        local oEnum   
    luacom.GetEnumerator(oColItems);
        
    local oItem oEnum:Next();
        while 
    oItem do
            
    sOutput sOutput .. "AccessMask: " .. Escape(oItem:AccessMask()) .. "\r\n";
            
    sOutput sOutput .. "Archive: " .. Escape(oItem:Archive()) .. "\r\n";
            
    sOutput sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
            
    sOutput sOutput .. "Compressed: " .. Escape(oItem:Compressed()) .. "\r\n";
            
    sOutput sOutput .. "CompressionMethod: " .. Escape(oItem:CompressionMethod()) .. "\r\n";
            
    sOutput sOutput .. "CreationClassName: " .. Escape(oItem:CreationClassName()) .. "\r\n";
            
    sOutput sOutput .. "CreationDate: " .. WMIDateStringToDate(oItem:CreationDate()) .. "\r\n";
            
    sOutput sOutput .. "CSCreationClassName: " .. Escape(oItem:CSCreationClassName()) .. "\r\n";
            
    sOutput sOutput .. "CSName: " .. Escape(oItem:CSName()) .. "\r\n";
            
    sOutput sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
            
    sOutput sOutput .. "Drive: " .. Escape(oItem:Drive()) .. "\r\n";
            
    sOutput sOutput .. "EightDotThreeFileName: " .. Escape(oItem:EightDotThreeFileName()) .. "\r\n";
            
    sOutput sOutput .. "Encrypted: " .. Escape(oItem:Encrypted()) .. "\r\n";
            
    sOutput sOutput .. "EncryptionMethod: " .. Escape(oItem:EncryptionMethod()) .. "\r\n";
            
    sOutput sOutput .. "Extension: " .. Escape(oItem:Extension()) .. "\r\n";
            
    sOutput sOutput .. "FileName: " .. Escape(oItem:FileName()) .. "\r\n";
            
    sOutput sOutput .. "FileSize: " .. Escape(oItem:FileSize()) .. "\r\n";
            
    sOutput sOutput .. "FileType: " .. Escape(oItem:FileType()) .. "\r\n";
            
    sOutput sOutput .. "FSCreationClassName: " .. Escape(oItem:FSCreationClassName()) .. "\r\n";
            
    sOutput sOutput .. "FSName: " .. Escape(oItem:FSName()) .. "\r\n";
            
    sOutput sOutput .. "Hidden: " .. Escape(oItem:Hidden()) .. "\r\n";
            
    sOutput sOutput .. "InstallDate: " .. WMIDateStringToDate(oItem:InstallDate()) .. "\r\n";
            
    sOutput sOutput .. "InUseCount: " .. Escape(oItem:InUseCount()) .. "\r\n";
            
    sOutput sOutput .. "LastAccessed: " .. WMIDateStringToDate(oItem:LastAccessed()) .. "\r\n";
            
    sOutput sOutput .. "LastModified: " .. WMIDateStringToDate(oItem:LastModified()) .. "\r\n";
            
    sOutput sOutput .. "Manufacturer: " .. Escape(oItem:Manufacturer()) .. "\r\n";
            
    sOutput sOutput .. "Name: " .. Escape(oItem:Name()) .. "\r\n";
            
    sOutput sOutput .. "Path: " .. Escape(oItem:Path()) .. "\r\n";
            
    sOutput sOutput .. "Readable: " .. Escape(oItem:Readable()) .. "\r\n";
            
    sOutput sOutput .. "Status: " .. Escape(oItem:Status()) .. "\r\n";
            
    sOutput sOutput .. "System: " .. Escape(oItem:System()) .. "\r\n";
            
    sOutput sOutput .. "Version: " .. Escape(oItem:Version()) .. "\r\n";
            
    sOutput sOutput .. "Writeable: " .. Escape(oItem:Writeable()) .. "\r\n";
            if (
    Dialog.Message("WMI Output",  sOutputTitle .. sOutput1) == 2then break; end
            sOutput 
    "";
            
    oItem oEnum:Next();
        
    end
    else
        
    Dialog.Message("WMI Output""No WMI Objects Found for class: CIM_DataFile");
    end 
    - الأكواد المتعلقة بــ DirectoryContainsFile

    [html]
    function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM CIM_DirectoryContainsFile", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "GroupComponent: " .. Escape(oItem:GroupComponent()) .. "\r\n";
    sOutput = sOutput .. "PartComponent: " .. Escape(oItem:PartComponent()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: CIM_DirectoryContainsFile");
    end[/html]

    الأكواد المتعلقة بــ ProcessExecutable
    [html]function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM CIM_ProcessExecutable", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
    sOutput = sOutput .. "BaseAddress: " .. Escape(oItem:BaseAddress()) .. "\r\n";
    sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
    sOutput = sOutput .. "GlobalProcessCount: " .. Escape(oItem:GlobalProcessCount()) .. "\r\n";
    sOutput = sOutput .. "ModuleInstance: " .. Escape(oItem:ModuleInstance()) .. "\r\n";
    sOutput = sOutput .. "ProcessCount: " .. Escape(oItem:ProcessCount()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: CIM_ProcessExecutable");
    end[/html]

    الأكواد المتعلقة بــ VideoControllerResolution
    [html]function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM CIM_VideoControllerResolution", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
    sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
    sOutput = sOutput .. "HorizontalResolution: " .. Escape(oItem:HorizontalResolution()) .. "\r\n";
    sOutput = sOutput .. "MaxRefreshRate: " .. Escape(oItem:MaxRefreshRate()) .. "\r\n";
    sOutput = sOutput .. "MinRefreshRate: " .. Escape(oItem:MinRefreshRate()) .. "\r\n";
    sOutput = sOutput .. "NumberOfColors: " .. Escape(oItem:NumberOfColors()) .. "\r\n";
    sOutput = sOutput .. "RefreshRate: " .. Escape(oItem:RefreshRate()) .. "\r\n";
    sOutput = sOutput .. "ScanMode: " .. Escape(oItem:ScanMode()) .. "\r\n";
    sOutput = sOutput .. "SettingID: " .. Escape(oItem:SettingID()) .. "\r\n";
    sOutput = sOutput .. "VerticalResolution: " .. Escape(oItem:VerticalResolution()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: CIM_VideoControllerResolution");
    end[/html]

    الأكواد المتعلقة بــ Providers
    [html]
    function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM Msft_Providers", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "HostingGroup: " .. Escape(oItem:HostingGroup()) .. "\r\n";
    sOutput = sOutput .. "HostingSpecification: " .. Escape(oItem:HostingSpecification()) .. "\r\n";
    sOutput = sOutput .. "HostProcessIdentifier: " .. Escape(oItem:HostProcessIdentifier()) .. "\r\n";
    sOutput = sOutput .. "Locale: " .. Escape(oItem:Locale()) .. "\r\n";
    sOutput = sOutput .. "Namespace: " .. Escape(oItem:Namespace()) .. "\r\n";
    sOutput = sOutput .. "provider: " .. Escape(oItem:provider()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_AccessCheck: " .. Escape(oItem:ProviderOperation_AccessCheck()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CancelQuery: " .. Escape(oItem:ProviderOperation_CancelQuery()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CreateClassEnumAsync: " .. Escape(oItem:ProviderOperation_CreateClassEnumAsyn c()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CreateInstanceEnumAsync: " .. Escape(oItem:ProviderOperation_CreateInstanceEnumA sync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CreateRefreshableEnum: " .. Escape(oItem:ProviderOperation_CreateRefreshableEn um()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CreateRefreshableObject: " .. Escape(oItem:ProviderOperation_CreateRefreshableOb ject()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CreateRefresher: " .. Escape(oItem:ProviderOperation_CreateRefresher()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_DeleteClassAsync: " .. Escape(oItem:ProviderOperation_DeleteClassAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_DeleteInstanceAsync: " .. Escape(oItem:ProviderOperation_DeleteInstanceAsync ()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_ExecMethodAsync: " .. Escape(oItem:ProviderOperation_ExecMethodAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_ExecQueryAsync: " .. Escape(oItem:ProviderOperation_ExecQueryAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_FindConsumer: " .. Escape(oItem:ProviderOperation_FindConsumer()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_GetObjectAsync: " .. Escape(oItem:ProviderOperation_GetObjectAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_GetObjects: " .. Escape(oItem:ProviderOperation_GetObjects()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_GetProperty: " .. Escape(oItem:ProviderOperation_GetProperty()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_NewQuery: " .. Escape(oItem:ProviderOperation_NewQuery()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_ProvideEvents: " .. Escape(oItem:ProviderOperation_ProvideEvents()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_PutClassAsync: " .. Escape(oItem:ProviderOperation_PutClassAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_PutInstanceAsync: " .. Escape(oItem:ProviderOperation_PutInstanceAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_PutProperty: " .. Escape(oItem:ProviderOperation_PutProperty()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_QueryInstances: " .. Escape(oItem:ProviderOperation_QueryInstances()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_SetRegistrationObject: " .. Escape(oItem:ProviderOperation_SetRegistrationObje ct()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_StopRefreshing: " .. Escape(oItem:ProviderOperation_StopRefreshing()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_ValidateSubscription: " .. Escape(oItem:ProviderOperation_ValidateSubscriptio n()) .. "\r\n";
    sOutput = sOutput .. "TransactionIdentifier: " .. Escape(oItem:TransactionIdentifier()) .. "\r\n";
    sOutput = sOutput .. "User: " .. Escape(oItem:User()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: Msft_Providers");
    end[/html]

    الأكواد المتعلقة بــ Provider Counters
    [html]function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM Msft_WmiProvider_Counters", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "ProviderOperation_AccessCheck: " .. Escape(oItem:ProviderOperation_AccessCheck()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CancelQuery: " .. Escape(oItem:ProviderOperation_CancelQuery()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CreateClassEnumAsync: " .. Escape(oItem:ProviderOperation_CreateClassEnumAsyn c()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CreateInstanceEnumAsync: " .. Escape(oItem:ProviderOperation_CreateInstanceEnumA sync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CreateRefreshableEnum: " .. Escape(oItem:ProviderOperation_CreateRefreshableEn um()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CreateRefreshableObject: " .. Escape(oItem:ProviderOperation_CreateRefreshableOb ject()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_CreateRefresher: " .. Escape(oItem:ProviderOperation_CreateRefresher()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_DeleteClassAsync: " .. Escape(oItem:ProviderOperation_DeleteClassAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_DeleteInstanceAsync: " .. Escape(oItem:ProviderOperation_DeleteInstanceAsync ()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_ExecMethodAsync: " .. Escape(oItem:ProviderOperation_ExecMethodAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_ExecQueryAsync: " .. Escape(oItem:ProviderOperation_ExecQueryAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_FindConsumer: " .. Escape(oItem:ProviderOperation_FindConsumer()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_GetObjectAsync: " .. Escape(oItem:ProviderOperation_GetObjectAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_GetObjects: " .. Escape(oItem:ProviderOperation_GetObjects()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_GetProperty: " .. Escape(oItem:ProviderOperation_GetProperty()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_NewQuery: " .. Escape(oItem:ProviderOperation_NewQuery()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_ProvideEvents: " .. Escape(oItem:ProviderOperation_ProvideEvents()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_PutClassAsync: " .. Escape(oItem:ProviderOperation_PutClassAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_PutInstanceAsync: " .. Escape(oItem:ProviderOperation_PutInstanceAsync()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_PutProperty: " .. Escape(oItem:ProviderOperation_PutProperty()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_QueryInstances: " .. Escape(oItem:ProviderOperation_QueryInstances()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_SetRegistrationObject: " .. Escape(oItem:ProviderOperation_SetRegistrationObje ct()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_StopRefreshing: " .. Escape(oItem:ProviderOperation_StopRefreshing()) .. "\r\n";
    sOutput = sOutput .. "ProviderOperation_ValidateSubscription: " .. Escape(oItem:ProviderOperation_ValidateSubscriptio n()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: Msft_WmiProvider_Counters");
    end[/html]

    الأكواد المتعلقة بــ NetDiagnostics
    [html]
    function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM NetDiagnostics", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "bIEProxy: " .. Escape(oItem:bIEProxy()) .. "\r\n";
    sOutput = sOutput .. "id: " .. Escape(oItem:id()) .. "\r\n";
    sOutput = sOutput .. "IEProxy: " .. Escape(oItem:IEProxy()) .. "\r\n";
    sOutput = sOutput .. "IEProxyPort: " .. Escape(oItem:IEProxyPort()) .. "\r\n";
    sOutput = sOutput .. "NewsNNTPPort: " .. Escape(oItem:NewsNNTPPort()) .. "\r\n";
    sOutput = sOutput .. "NewsServer: " .. Escape(oItem:NewsServer()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: NetDiagnostics");
    end[/html]

    الأكواد المتعلقة بــ AccountSID
    [html]function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AccountSID", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "Element: " .. Escape(oItem:Element()) .. "\r\n";
    sOutput = sOutput .. "Setting: " .. Escape(oItem:Setting()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AccountSID");
    end[/html]

    الأكواد المتعلقة بــ ActionCheck
    [html]function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_ActionCheck", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "Action: " .. Escape(oItem:Action()) .. "\r\n";
    sOutput = sOutput .. "Check: " .. Escape(oItem:Check()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_ActionCheck");
    end[/html]

    الأكواد المتعلقة بــ AllocatedResource
    [html]function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AllocatedResource", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
    sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AllocatedResource");
    end[/html]

    الأكواد المتعلقة بـــ Win32_ApplicationCommandLine
    [html]function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_ApplicationCommandLine", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
    sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_ApplicationCommandLine");
    end[/html]

    الأكواد المتعلقة بــ ApplicationService
    [html]function WMIDateStringToDate(dtmDate)
    if dtmDate then
    dtmDate = tostring(dtmDate);
    return (String.Mid (dtmDate, 7, 2) .. "/" ..
    String.Mid (dtmDate, 5, 2) .. "/" ..
    String.Left(dtmDate, 4) .. " " ..
    String.Mid (dtmDate, 9, 2) .. ":" ..
    String.Mid (dtmDate, 11, 2) .. ":" ..
    String.Mid (dtmDate, 13, 2)
    );
    else
    return "";
    end
    end

    function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_ApplicationService", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
    sOutput = sOutput .. "CreationClassName: " .. Escape(oItem:CreationClassName()) .. "\r\n";
    sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
    sOutput = sOutput .. "InstallDate: " .. WMIDateStringToDate(oItem:InstallDate()) .. "\r\n";
    sOutput = sOutput .. "Name: " .. Escape(oItem:Name()) .. "\r\n";
    sOutput = sOutput .. "Started: " .. Escape(oItem:Started()) .. "\r\n";
    sOutput = sOutput .. "StartMode: " .. Escape(oItem:StartMode()) .. "\r\n";
    sOutput = sOutput .. "Status: " .. Escape(oItem:Status()) .. "\r\n";
    sOutput = sOutput .. "SystemCreationClassName: " .. Escape(oItem:SystemCreationClassName()) .. "\r\n";
    sOutput = sOutput .. "SystemName: " .. Escape(oItem:SystemName()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_ApplicationService");
    end[/html]

    الأكواد المتعلقة بــ AssociatedProcessorMemory
    [html]function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AssociatedProcessorMemory", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "Antecedent: " .. Escape(oItem:Antecedent()) .. "\r\n";
    sOutput = sOutput .. "BusSpeed: " .. Escape(oItem:BusSpeed()) .. "\r\n";
    sOutput = sOutput .. "Dependent: " .. Escape(oItem:Dependent()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AssociatedProcessorMemory");
    end[/html]

    الأكواد المتعلقة بــ AutochkSetting
    [html]function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_AutochkSetting", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
    sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
    sOutput = sOutput .. "SettingID: " .. Escape(oItem:SettingID()) .. "\r\n";
    sOutput = sOutput .. "UserInputDelay: " .. Escape(oItem:UserInputDelay()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_AutochkSetting");
    end[/html]

    الأكواد المتعلقة بــ BaseBoard
    [html]function WMIDateStringToDate(dtmDate)
    if dtmDate then
    dtmDate = tostring(dtmDate);
    return (String.Mid (dtmDate, 7, 2) .. "/" ..
    String.Mid (dtmDate, 5, 2) .. "/" ..
    String.Left(dtmDate, 4) .. " " ..
    String.Mid (dtmDate, 9, 2) .. ":" ..
    String.Mid (dtmDate, 11, 2) .. ":" ..
    String.Mid (dtmDate, 13, 2)
    );
    else
    return "";
    end
    end

    function Escape(v)
    if (v == nil) then return ""; end
    if (type(v) == "table") then return Table.Concat(v, ", "); end
    if (type(v) == "boolean") then
    if (v == true) then return "Yes"; else return "No"; end
    end
    return v;
    end

    local sOutput = "";
    local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n";
    local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2");
    local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_BaseBoard", "WQL", 48);
    if oColItems then
    local oEnum = luacom.GetEnumerator(oColItems);
    local oItem = oEnum:Next();
    while oItem do
    sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n";
    sOutput = sOutput .. "ConfigOptions: " .. Escape(oItem:ConfigOptions()) .. "\r\n";
    sOutput = sOutput .. "CreationClassName: " .. Escape(oItem:CreationClassName()) .. "\r\n";
    sOutput = sOutput .. "Depth: " .. Escape(oItem:Depth()) .. "\r\n";
    sOutput = sOutput .. "Description: " .. Escape(oItem:Description()) .. "\r\n";
    sOutput = sOutput .. "Height: " .. Escape(oItem:Height()) .. "\r\n";
    sOutput = sOutput .. "HostingBoard: " .. Escape(oItem:HostingBoard()) .. "\r\n";
    sOutput = sOutput .. "HotSwappable: " .. Escape(oItem:HotSwappable()) .. "\r\n";
    sOutput = sOutput .. "InstallDate: " .. WMIDateStringToDate(oItem:InstallDate()) .. "\r\n";
    sOutput = sOutput .. "Manufacturer: " .. Escape(oItem:Manufacturer()) .. "\r\n";
    sOutput = sOutput .. "Model: " .. Escape(oItem:Model()) .. "\r\n";
    sOutput = sOutput .. "Name: " .. Escape(oItem:Name()) .. "\r\n";
    sOutput = sOutput .. "OtherIdentifyingInfo: " .. Escape(oItem:OtherIdentifyingInfo()) .. "\r\n";
    sOutput = sOutput .. "PartNumber: " .. Escape(oItem:PartNumber()) .. "\r\n";
    sOutput = sOutput .. "PoweredOn: " .. Escape(oItem:PoweredOn()) .. "\r\n";
    sOutput = sOutput .. "Product: " .. Escape(oItem:Product()) .. "\r\n";
    sOutput = sOutput .. "Removable: " .. Escape(oItem:Removable()) .. "\r\n";
    sOutput = sOutput .. "Replaceable: " .. Escape(oItem:Replaceable()) .. "\r\n";
    sOutput = sOutput .. "RequirementsDescription: " .. Escape(oItem:RequirementsDescription()) .. "\r\n";
    sOutput = sOutput .. "RequiresDaughterBoard: " .. Escape(oItem:RequiresDaughterBoard()) .. "\r\n";
    sOutput = sOutput .. "SerialNumber: " .. Escape(oItem:SerialNumber()) .. "\r\n";
    sOutput = sOutput .. "SKU: " .. Escape(oItem:SKU()) .. "\r\n";
    sOutput = sOutput .. "SlotLayout: " .. Escape(oItem:SlotLayout()) .. "\r\n";
    sOutput = sOutput .. "SpecialRequirements: " .. Escape(oItem:SpecialRequirements()) .. "\r\n";
    sOutput = sOutput .. "Status: " .. Escape(oItem:Status()) .. "\r\n";
    sOutput = sOutput .. "Tag: " .. Escape(oItem:Tag()) .. "\r\n";
    sOutput = sOutput .. "Version: " .. Escape(oItem:Version()) .. "\r\n";
    sOutput = sOutput .. "Weight: " .. Escape(oItem:Weight()) .. "\r\n";
    sOutput = sOutput .. "Width: " .. Escape(oItem:Width()) .. "\r\n";
    if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end
    sOutput = "";
    oItem = oEnum:Next();
    end
    else
    Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_BaseBoard");
    end[/html]

    [hide]يتبع [/hide]
    التعديل الأخير تم بواسطة ثامر أبو بلقيس; الساعة 02-06-2014, 02:44 PM.

    تعليق


    • #62
      شـكــ وبارك الله فيك ـــرا لك ... لك مني أجمل تحية .
      موفق بإذن الله ... لك مني أجمل تحية . موفق بإذن الله ... لك مني أجمل تحية .

      تعليق


      • #63
        السلام عليكم ورحمة الله وبركاته
        كان الله في عونك وأسكنك الفردوس الاعلى
        موفق بإذن الله ... لك مني أجمل تحية .

        تعليق


        • #64
          قبل مواصلة مجموعة أخرى ضخمة المتعلقة بمنصة الوينداوز

          كنت بصدد إعداد تجميعية وأحتجت لمنع المستخدم من الخروج من حدود التجميعية فأحببت
          أن أقرأ لك هذا الكود الجميل و توفيره هنااا لاستغلاله

          1 - ماذا لو يكون مشروعنا يتميز بأنه flat و ننزع الاختيار movable
          وفعل الاضافة Memory
          2 - نزرع في globbal functions
          [html]function EnableWindow(nHWND, bEnable)
          local nEnable=0
          if bEnable then nEnable = 1 end
          DLL.CallFunction("user32.dll", "EnableWindow", nHWND..","..nEnable, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
          end
          function MouseClipping()
          _RECT = Memory.CreateStructure("long, long, long, long");
          Memory.SetStructureData(_RECT, 1, 0, nLeft, "");--left
          Memory.SetStructureData(_RECT, 2, 0, nTop, "");--top
          Memory.SetStructureData(_RECT, 3, 0, nRight, "");--right
          Memory.SetStructureData(_RECT, 4, 0, nBottom, "");--bottom
          DLL.CallFunction(_SystemFolder.."\\User32.dll", "ClipCursor", _RECT, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
          Memory.FreeStructure(_RECT);
          end
          function Screen_coordinates()
          nLeft = 0;
          nTop = 0;
          nRight = System.GetDisplayInfo().Width;
          nBottom = System.GetDisplayInfo().Height;
          end
          function Do_clipping()
          Input.SetText ("Input_left", nLeft);
          Input.SetText ("Input_top", nTop);
          Input.SetText ("Input_right", nRight);
          Input.SetText ("Input_bottom", nBottom);
          Page.StartTimer(250);
          Label.SetText ("Label4", "Press Alt+F4 to disable clipping.");
          Ex_it = 1;
          end[/html]

          3 - في on show
          كود PHP:
          nHWND Application.GetWndHandle();
          nLeft Window.GetPos (nHWND).X;
          nTop Window.GetPos (nHWND).Y;
          nRight Window.GetSize (nHWND).Width+nLeft;
          nBottom Window.GetSize (nHWND).Height+nTop;
          Do_clipping(); 
          4 - في on timer
          [html]nActiveHWND = String.ToNumber(DLL.CallFunction(_SystemFolder.."\ \User32.dll", "GetActiveWindow", "", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL))
          if nActiveHWND == nHWND then
          else
          EnableWindow(nHWND, true);
          end
          MouseClipping();[/html]


          --عاين مشروعك حينها تكتشف أنه كان من الأحسن وضع زر للمغادرة
          السلام عليكم ورحمة الله تعالى و بركاته

          تعليق


          • #65
            وعليكم السلام ورحمة الله وبركاته
            عندما اطلعت على اكواد منع الخروج من التجميعة قلت لماذا لا اجعلها مرنة مع حجم الشاشة ثم في نفس الوقت امنعه من الخروج منها
            فكانت النتيجة الملف المفتوح التالي
            http://www.gulfup.com/?C9YrdA
            بالتوفيق

            تعليق


            • #66
              لجمع كلا الكودين في ملف واحد علينا بطريقة أخرى وهي تحديد دقة الشاشة و تخزينها
              عند دخول التجميعة و تتغير الاكواد بطرح قيمة قليلة من على الزوايا الأربعة
              --------------------------------------------------
              أما غير هذا الاختيار فالماوس يبقى ممنوعا من تجاوز حد حيز التجميعة
              أليس كذلك
              موفق

              تعليق


              • #67
                المشاركة الأصلية بواسطة فرح صالحي مشاهدة المشاركة
                وعليكم السلام ورحمة الله وبركاته
                عندما اطلعت على اكواد منع الخروج من التجميعة قلت لماذا لا اجعلها مرنة مع حجم الشاشة ثم في نفس الوقت امنعه من الخروج منها
                فكانت النتيجة الملف المفتوح التالي
                http://www.gulfup.com/?C9YrdA
                بالتوفيق
                Memory

                تعليق


                • #68
                  المشاركة الأصلية بواسطة ثامر أبو بلقيس مشاهدة المشاركة
                  Memory
                  السلام عليكم ورحمة الله وبركاته
                  ما فهمت شيء !!!

                  تعليق


                  • #69

                    1 - ماذا لو يكون مشروعنا يتميز بأنه flat و ننزع الاختيار movable
                    وفعل الاضافة Memory
                    هل فعلت الاضافة المشار اليها عند وضعك للملف المفتوح

                    تعليق


                    • #70
                      السلام عليكم ورحمة الله وبركاته

                      لمحتك أخي تبحث عن اخفاء و اظهار شريط المهام و توظيف ذلك
                      في أحداث معينة حسب المشروع

                      استغل نفس الاضافة المذكورة في آخر مشاركة
                      Memory و بعد تفعيلها
                      - في global functions نكتب :
                      [html]function Hide_Taskbar(arg)
                      mem = Memory.Allocate(256)
                      Memory.PutString(mem, "Shell_traywnd", -1)
                      h = DLL.CallFunction("user32.dll", "FindWindowA", mem..", 0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
                      if (arg == false) then
                      DLL.CallFunction("user32.dll", "SetWindowPos", h..", 0, 0, 0, 0, 0, 64", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
                      else
                      DLL.CallFunction("user32.dll", "SetWindowPos", h..", 0, 0, 0, 0, 0, 128", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
                      end
                      Memory.Free(mem)
                      DLL.CallFunction("user32.dll", "SetFocus", Application.GetWndHandle(), DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
                      end[/html]

                      - لتنفيذ الإخفاء
                      [html]Hide_Taskbar(true)
                      Window.Show(Application.GetWndHandle());
                      [/html]

                      - لتنفيذ الإظهار :
                      كود PHP:
                      Hide_Taskbar(false)
                      Window.Show(Application.GetWndHandle()); 
                      موفق

                      تعليق


                      • #71
                        السلام عليكم ورحمة الله وبركاته
                        هذه هي النتيجة
                        http://www.gulfup.com/?IeZSoG
                        في الواقع فهمت بالغالط كنت اظن ان الاخفاء والاظهار يقع داخل التجميعة
                        موفق بإذن الله... لك مني أجمل تحية .

                        تعليق


                        • #72
                          السلام عليكم ورحمة الله وبركاته

                          رمضان كريم ... عودة لهذه الصفحات المخصصة للتسلية البرمجية

                          اليوم عندك عملية نسخ باستعمال الاضافة Clipboard حبيت تعرف
                          عدد الاسطر بطريقة ممتعة و غير منقولة

                          ازرع السطر تحت زر أنسخ ما تريده اضغط على الزر سيحسب لك عدد الاسطر
                          المنسوخة من الملف النصي
                          كود PHP:
                           Dialog.Message("^_^",String.Length(Clipboard.GetText())-String.Length(String.Replace(Clipboard.GetText(), "\r\n""."true))); 
                          في المرة القادمة اذا وجدنا وقت نحسبوها بنصف سطر


                          مع ملاحظة الخلل العام في البرنامج لتحديد مفهوم السطر !!!!!
                          التعديل الأخير تم بواسطة ثامر أبو بلقيس; الساعة 02-07-2014, 05:31 PM.

                          تعليق


                          • #73
                            ^_^ ههههههههههههههههه شكرا

                            تعليق


                            • #74
                              المشاركة الأصلية بواسطة minomars مشاهدة المشاركة
                              ^_^ ههههههههههههههههه شكرا
                              شكرا مينو

                              تعليق


                              • #75
                                شكرا على تلك الطريقة الجديدة و المفهومة

                                تعليق

                                مواضيع تهمك

                                تقليص

                                المنتدى: القسم العام نشرت بواسطة: Reem2Rabeh الوقت: 04-23-2025 الساعة 04:27 PM
                                المنتدى: ضبط وتوكيد الجودة نشرت بواسطة: HeaD Master الوقت: 04-15-2025 الساعة 09:30 AM
                                المنتدى: التصنيع والانتاج نشرت بواسطة: HeaD Master الوقت: 04-11-2025 الساعة 01:08 PM
                                المنتدى: القسم العام نشرت بواسطة: نوال الخطيب الوقت: 03-19-2025 الساعة 03:07 AM
                                المنتدى: الكمبيوتر والإنترنت نشرت بواسطة: عوض السوداني الوقت: 03-18-2025 الساعة 07:22 AM
                                يعمل...
                                X