Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/08/2022 in all areas

  1. Due to the overwhelming responses of the many testers of this new version, I am forced to postpone the release of the next version of the SciTE4AutoIt3 installer to Christmas next year. Thank you for your understanding.
    2 points
  2. Do you mean something like: Run(@ScriptDir & "\Web\Subfolder\Filename.exe")
    1 point
  3. Melba23

    Read Memory Value Issues

    StefanM, Looking at G Hub on Google, I see: Reading that gives me, quite legitimately IMO, reason to think that there might be a confliction with the forum rules on gaming threads. So, very politely, I asked for an explanation of just what you were doing so we could make a reasoned decision on whether this was the case. Reading your explanation, I am of the opinion that there is no conflict and the thread can remain open. But now we come to the next point. I also asked, again politely, that everyone else stay out of the discussion until the matter had been clarified. But our late unlamented intruder decided to ignore this and not only offered help but also made unnecessary comments about the moderation here - which comments became even more aggressive in various PM exchanges with the Mod team, resulting in his permanent removal from the community. And now you decide to lay into us as well. Let us deal with your points in order: "Is it not, in case of doupt for the writer?" No, it is up to the Mods to decide - when we require clarification we will intervene as I did above. "Dont ban people who wants to help". We do not - but we might well ban those who egregiously flout our explicit request not to offer help until the matter is cleared. "If you see or think womething is illegal, write it. Otherwise let people help". What do you think I did in my first intervention above? "I would rate the moderation as very bad". Your decision, but as I did exactly what you suggested would be the correct thing to do I feel your comment is illogical in the extreme. "I dont think that anyone will write here to help and risk a ban anytime soon, as it is already an old topic, maybe none.".. As the thread is now cleared we will soon see - but no-one risks a ban for helping now. "but great moderating! This is my opionion". Sarcasm is never a very successful form of wit. But I have wasted enough of this lovely morning on you already. I hope you do get a solution to your problem, but a word of warning: after the comments made above you have used up any flex we are prepared to give you, so please make sure you respect the forum rules form now on. M23
    1 point
  4. Hmmmyes. The main problem is the way you can get the source of the page. InetRead doesn't always work indeed, so you can use the way pixelsearch mentioned, or use curl, etc After that the regex must obviously be adapted to fit the search of the required data For example, using a txt file containing the source of the page1 link you provided, this code works for me ;https://www.lomcn.org/forum/members/list/?page=1 #Include <Array.au3> $txt = FileRead("site_page1.txt") ; source $list = "" $items = StringRegExp($txt, 'forum/members/(\w+\.\d+)', 3) $items = _ArrayUnique($items) For $k = 0 to UBound($items)-1 $list &= $items[$k] & @crlf Next Msgbox(0,"", $list) ;FileWrite("results.txt", $list) Edit @pixelsearch please try this ;https://www.lomcn.org/forum/members/list/?page=1 #Include <Array.au3> $out = _XP_Read("https://www.lomcn.org/forum/members/list/?page=1") ;ConsoleWrite($out & @crlf) $list = "" $items = StringRegExp($out, 'forum/members/(\w+\.\d+)', 3) $items = _ArrayUnique($items) For $k = 0 to UBound($items)-1 $list &= $items[$k] & @crlf Next Msgbox(0,"", $list) ;FileWrite("results.txt", $list) Func _XP_Read($url) Local $cmd = "curl -L -s -k -A 'Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1)' " & $url Local $iPID = Run($cmd, "", @SW_HIDE, 2) ;$STDOUT_CHILD ProcessWaitClose($iPID) Local $output = StdoutRead($iPID) Return $output EndFunc I love curl
    1 point
  5. Please download the updated script Office2010S_Download_1F.zip (see attachment in first post) I have updated the script (now v1.0.1), because I noticed twice, some files were not completely downloaded. This could be potentially frustating when you try to install Office 2010 Starter later.😉 The script now requests the filesize before downloading and checks the size after each download. If the file was not downloaded completely, the script wil inform the user and ask comfirmation to download the file again. Only some main languages like Chinese, Dutch, English, French, German, Italian and Turkish and Ukrain were tested😀 Downloasing the files could take anything from 5, 10, 20 or even 30 minutes, so the other language have not yet been tested. Should the download for a language not work, some feedback would be appreciated. Also from the downloaded files, I only installed the Dutch, English and Turkish Office 2010 Starter (all seperately) as a test. Known issues: I am using an alternative explorer, and noticed it froze periodically during download, however I have like over 100 Chrome tabs open, so that may also be part of the freeze.
    1 point
  6. Bilgus

    Extended CPUID x86, x64

    User asked about checking for cpuid features that weren't supported by _WinAPI_IsProcessorFeaturePresent() I researched it a bit and found that 'Andreik' executed some asm on the fly to get vendorID which quite frankly is amazing So I ran with it and created a function that is more general purpose and good for x86 and x64 #include <String.au3> #include <Memory.au3> Test(); Func Test() Local $sFeat1D = "" Local $aFeat1D[32] = ["FPU","VME","DE","PSE","TSC","MSR","PAE","MCE", _ "CX8","APIC","?","SEP","MTRR","PGE","MCA","CMOV", _ "PAT","PSE36","PSN","CLFSH","?","DS","ACPI","MMX", _ "FXSR","SSE","SSE2","SS","HTT","TM","IA64","PBE"] Local $iEdx = CpuID(0x00000001)[3] For $i = 0 to 31 if Get_BitGroup_Dword($iEdx, $i, $i) = 1 Then $sFeat1D &= $aFeat1D[$i] & " " Next Local $sFeat1C = "" Local $aFeat1C[32] = ["SSE3","PCLMULQDQ","DTES64","MONITOR","DS-CPL","VMX","SMX","EST", _ "TM2","SSSE3","CNTX-ID","SDBG","FMA","CX16","XTPR","PDCM", _ "?","PCID","DCA","SSE4.1","SSE4.2","X2APIC","MOVBE","POPCNT", _ "TSC-DEADLINE","AES","XSAVE","OSXSAVE","AVX","F16C","RDRND","HYPERVISOR"] Local $iEcx = CpuID(0x00000001)[2] For $i = 0 to 31 if Get_BitGroup_Dword($iEcx, $i, $i) = 1 Then $sFeat1C &= $aFeat1C[$i] & " " Next MsgBox(0, "CpuId", CpuId_Vendor() & @CRLF & CpuId_Processor_Brand() & @cRLF & $sFeat1D & @cRLF & $sFeat1C) EndFunc ;---------------------------------------------------------------------------- Func Get_BitGroup_Dword($iDword, $iLsb, $iMsb) Local $iVal1 = BitShift($iDword, $iLsb) ;>> Local Const $iMask = 0xFFFFFFFF Local $iVal2 = BitNOT(BitShift($iMask, ($iLsb-$iMsb-1))) ;~<< Return BitAND($iVal1, $iVal2) EndFunc Func RevBinStr($val) Local $rev For $n = BinaryLen($val) To 1 Step -1 $rev &= Hex(BinaryMid($val, $n, 1)) Next Return BinaryToString("0x" & $rev) EndFunc Func CpuId($iLeaf, $iSubLeaf = 0) Local $aE[4] = [0, 0, 0, 0] Local $aCPUID = __Cpuid_Get_Leaf(BitAND($iLeaf, 0xFFFF0000)) ;need to get max first If @error or $aCPUID[0] < $iLeaf Then Return SetError(1, @error, $aE) Return __Cpuid_Get_Leaf($iLeaf, $iSubLeaf) EndFunc Func CpuId_Vendor() Local $aCPUID = __Cpuid_Get_Leaf(0x0) Return RevBinStr($aCPUID[1]) & RevBinStr($aCPUID[3]) & RevBinStr($aCPUID[2]) EndFunc Func CpuId_Processor_Brand() Local $sPBS = "NOT SUPPORT" Local $aCPUID = __Cpuid_Get_Leaf(0x80000000) ;need to get max extended value first If $aCPUID[0] < 0x80000004 Then Return SetError(1, 0, $sPBS) $aCPUID = __Cpuid_Get_Leaf(0x80000002) $sPBS = RevBinStr($aCPUID[0]) & RevBinStr($aCPUID[1]) & RevBinStr($aCPUID[2]) & RevBinStr($aCPUID[3]) $aCPUID = __Cpuid_Get_Leaf(0x80000003) $sPBS &= RevBinStr($aCPUID[0]) & RevBinStr($aCPUID[1]) & RevBinStr($aCPUID[2]) & RevBinStr($aCPUID[3]) $aCPUID = __Cpuid_Get_Leaf(0x80000004) $sPBS &= RevBinStr($aCPUID[0]) & RevBinStr($aCPUID[1]) & RevBinStr($aCPUID[2]) & RevBinStr($aCPUID[3]) Return StringStripWS($sPBS, 7) EndFunc Func CpuId_Signature_Info() Local $aRet[6] = [0, 0, 0, 0, 0 ,0] Local Enum $eStep = 0, $eModel, $eFamily, $eType, $eExtModel, $eExtFamily Local $aCPUID = __Cpuid_Get_Leaf(0x00000000) ;need to get max id value first If $aCPUID[0] < 0x00000001 Then Return SetError(1, 0, $aRet) $aCPUID = __Cpuid_Get_Leaf(0x00000001) Local $iEax = $aCPUID[0] $aRet[$eStep] = Get_BitGroup_Dword($iEax, 0, 3) $aRet[$eModel] = Get_BitGroup_Dword($iEax, 4, 7) $aRet[$eFamily] = Get_BitGroup_Dword($iEax, 8, 11) $aRet[$eType] = Get_BitGroup_Dword($iEax, 12, 13) $aRet[$eExtModel] = Get_BitGroup_Dword($iEax, 16, 19) $aRet[$eExtFamily] = Get_BitGroup_Dword($iEax, 20, 27) Return $aRet EndFunc Func __Cpuid_Get_Leaf($iLeaf, $iSubLeaf = 0) Local Const $sCode32 = "0x" & _ ; use32 "55" & _ ; push ebp "89E5" & _ ; mov ebp, esp "53" & _ ; push ebx "8B4508" & _ ; mov eax, [ebp + 08] ;$iLeaf "8B4D0C" & _ ; mov ecx, [epb + 12] ;$iSubLeaf "31DB" & _ ; xor ebx, ebx ; set ebx = 0 "31D2" & _ ; xor edx, edx ; set edx = 0 "0FA2" & _ ; cpuid "8B6D10" & _ ; mov ebp, [ebp + 16] ;ptr int[4] "894500" & _ ; mov [ebp + 00], eax "895D04" & _ ; mov [edi + 04], ebx "894D08" & _ ; mov [edi + 08], ecx "89550C" & _ ; mov [edi + 12], edx "5B" & _ ; pop ebx "5D" & _ ; pop ebp "C3" ; ret Local Const $sCode64 = "0x" & _ ; use 64 "53" & _ ; push rbx "89C8" & _ ; mov eax, ecx ;$ileaf "89D1" & _ ; mov ecx, edx ;$iSubleaf "31DB" & _ ; xor ebx, ebx "31D2" & _ ; xor edx, edx "0FA2" & _ ; cpuid "67418900" & _ ; mov [r8d], eax ;ptr int[4] "6741895804" & _ ; mov [r8d + 04], ebx "6741894808" & _ ; mov [r8d + 08], ecx "674189500C" & _ ; mov [r8d + 12], edx "5B" & _ ; pop rbx "C3" ; ret Local Const $sCode = @AutoItX64 ? $sCode64 : $sCode32 Local Const $iSize = BinaryLen($sCode) Local $aE_X[4] = [0, 0, 0, 0] Local $iErr Do $iErr = 1 Local $pBuffer = _MemVirtualAlloc(0, $iSize, BitOR($MEM_COMMIT, $MEM_RESERVE), $PAGE_EXECUTE_READWRITE) If $pBuffer = 0 Then ExitLoop $iErr = 2 DllStructSetData(DllStructCreate("BYTE[" & $iSize & "]", $pBuffer), 1, $sCode) If @error Then ExitLoop $iErr = 3 Local $tRet = DllStructCreate("int EAX;int EBX;int ECX;int EDX;") If @error Then ExitLoop $iErr = 4 Local $aRet = DllCallAddress("uint:cdecl", $pBuffer, "int", Int($iLeaf), "int", Int($iSubLeaf), "ptr", DllStructGetPtr($tRet)) If @error Then ExitLoop $iErr = 0;Success? Until(True) _MemVirtualFree($pBuffer, $iSize, $MEM_DECOMMIT) ConsoleWrite($iErr <> 0 ? "Error " & $iErr & @CRLF : Hex($aRet[0], 8) & " Leaf: 0x" & Hex($iLeaf, 8) & " SubLeaf: 0x" & Hex($iSubLeaf, 8) & @CRLF) For $i = 0 To $iErr <> 0 ? -1 : UBound($aE_X) - 1 $aE_X[$i] = "0x" & Hex(DllStructGetData($tRet, $i + 1)) ConsoleWrite("E" & Chr(65 + $i) & "X: " & $aE_X[$i] & @CRLF) Next Return SetError($iErr, @error, $aE_X) EndFunc Most of the processor features can be checked with CPUID(0xXXXXXXXX) and using GET_BitGroup_Dword($iE_X, $iBitpos, $iBitpos) as shown in the example I broke the weirder ones out into their own specialized functions
    1 point
  7. Here is a little script with 3 functions to demonstrate how to get information about the working area of the desktop. That is the area of the desktop not covered by the taskbar or any docked windows. It will give the correct result no matter which edge of the screen the taskbar is docked. #Include <WinAPI.au3> Local $Rect[4] $Rect = _GetworkingAreaRect() MsgBox(0,"Desktop Working Area", "Width = " & _GetworkingAreaWidth() & @CRLF & "Height = " & _GetworkingAreaHeight() & @CRLF & "TopLeft = " & $Rect[0] & "," & $Rect[1] & @CRLF & "BottomRight = " & $Rect[2] & "," & $Rect[3] ) Func _GetworkingAreaWidth() Local $aRect[4] Local $iWidth = 0 $aRect = _GetworkingAreaRect() If Not @error Then $iWidth = $aRect[2] - $aRect[0] Return $iWidth Else Return SetError(1,0,0) EndIf EndFunc Func _GetworkingAreaHeight() Local $aRect[4] Local $iWidth = 0 $aRect = _GetworkingAreaRect() If Not @error Then $iWidth = $aRect[3] - $aRect[1] Return $iWidth Else Return SetError(1,0,0) EndIf EndFunc Func _GetworkingAreaRect() Local $aRect[4] Const $SPI_GETWORKAREA = 0x0030 Local $rect = DllStructCreate("int;int;int;int") Local $iResult = 0 $iResult = _WinAPI_SystemParametersInfo($SPI_GETWORKAREA, 0 , DllStructGetPtr($rect)) If $iResult Then $aRect[0] = DllStructGetData($rect,1) $aRect[1] = DllStructGetData($rect,2) $aRect[2] = DllStructGetData($rect,3) $aRect[3] = DllStructGetData($rect,4) Return $aRect Else Return SetError(1,0,0) EndIf EndFunc
    1 point
×
×
  • Create New...