Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/19/2020 in all areas

  1. 2 points
  2. jcpetu

    RichEdit resize

    Hi pixelsearch, this UDF does the non native controls resizing very well. It also use the label trick but it's a clever implementation with AdlibRegister fired by $WM_SIZE message and manages the label and not standard controls with arrays which is actually faster and much more compact. I appreciate you remember the issue and provided the solution.
    1 point
  3. vulcan4d, I have just tested your function using Number to convert some trial positive and negative strings and everything works as expected. Could you please post the files concerned so we can take a look at exactly what you are extracting - I know you say the contents extract correctly, but there must be something which is leading to an incorrect conversion. M23
    1 point
  4. For future googlers like me who found this topic because of the scaling issues: I was able to fix my problem by using DllCall and SetCursorPos. That matches with the numbers I get from MouseGetPos(). So instead of: MouseMove($x, $y) I used: DllCall("user32.dll", "bool", "SetCursorPos", "int", $x, "int", $y)
    1 point
  5. Yes you are right. Setting it solve the problem, now working as expected with : option explicit Dim oFileSys, oTSF, sText Set oFileSys = WScript.CreateObject("Scripting.FileSystemObject") Set oTSF = oFileSys.OpenTextFile("\\.\pipe\pipename", 2, True, 0) oTSF.WriteLine("Ceci est un test") oTSF.Close WScript.Sleep(50) Set oTSF = oFileSys.OpenTextFile("\\.\pipe\pipename", 1, True, 0) sText = oTSF.Readline() oTSF.Close() MsgBox(sText & vbCRLF)
    1 point
  6. I had a problem with @xrxca's fantastic MultiMon.au3, commented above, with my Windows 10 64-bit configuration. I have four displays, of which only two are the same size. My PC's BIOS displays boot messages on the left monitor, but Windows thinks that it's monitor #2, so I have my Display Settings like the attachment shows ( [2] [1] [3] [4] ). I had to add a few lines to MultiMon.au3 to show the monitors in the correct physical representation, because it was showing Display 2 (primary display) as the 4th hMonitor instead of the 1st. I put an _ArraySort in _GetMonitors() to fix this (at least on my system). I also added a line to the example _ShowMonitorInfo() to provide the hMonitor value(s). See attached "before after" screenshot for the result. #include-Once #include<Array.au3> ;added to fix the display order Global $__MonitorList[1][5] $__MonitorList[0][0] = 0 ; Just for testing ;~ _ArrayDisplay(_GetMonitors()) ;added as another way to see the info _ShowMonitorInfo() ;================================================================================================== ; Function Name: _ShowMonitorInfo() ; Description:: Show the info in $__MonitorList in a msgbox (line 0 is count of monitors and entire Desktop size) ; Parameter(s): n/a ; Return Value(s): n/a ; Author(s): xrxca (autoit@forums.xrx.ca) ;================================================================================================== Func _ShowMonitorInfo() If $__MonitorList[0][0] == 0 Then _GetMonitors() EndIf Local $Msg = "" Local $i = 0 For $i = 0 To $__MonitorList[0][0] $Msg &= $i & " - hnd:" & $__MonitorList[$i][0] ;added for information $Msg &= ", L:" & $__MonitorList[$i][1] & ", T:" & $__MonitorList[$i][2] $Msg &= ", R:" & $__MonitorList[$i][3] & ", B:" & $__MonitorList[$i][4] If $i < $__MonitorList[0][0] Then $Msg &= @CRLF Next MsgBox(0, $__MonitorList[0][0] & " Monitors: ", $Msg) EndFunc ;==>_ShowMonitorInfo ;================================================================================================== ; Function Name: _MaxOnMonitor($Title[, $Text = ''[, $Monitor = -1]]) ; Description:: Maximize a window on a specific monitor (or the monitor the mouse is on) ; Parameter(s): $Title The title of the window to Move/Maximize ; optional: $Text The text of the window to Move/Maximize ; optional: $Monitor The monitor to move to (1..NumMonitors) defaults to monitor mouse is on ; Note: Should probably have specified return/error codes but haven't put them in yet ; Author(s): xrxca (autoit@forums.xrx.ca) ;================================================================================================== Func _MaxOnMonitor($Title, $Text = '', $Monitor = -1) _CenterOnMonitor($Title, $Text, $Monitor) WinSetState($Title, $Text, @SW_MAXIMIZE) EndFunc ;==>_MaxOnMonitor ;================================================================================================== ; Function Name: _CenterOnMonitor($Title[, $Text = ''[, $Monitor = -1]]) ; Description:: Center a window on a specific monitor (or the monitor the mouse is on) ; Parameter(s): $Title The title of the window to Move/Maximize ; optional: $Text The text of the window to Move/Maximize ; optional: $Monitor The monitor to move to (1..NumMonitors) defaults to monitor mouse is on ; Note: Should probably have specified return/error codes but haven't put them in yet ; Author(s): xrxca (autoit@forums.xrx.ca) ;================================================================================================== Func _CenterOnMonitor($Title, $Text = '', $Monitor = -1) $hWindow = WinGetHandle($Title, $Text) If Not @error Then If $Monitor == -1 Then $Monitor = _GetMonitorFromPoint() ElseIf $__MonitorList[0][0] == 0 Then _GetMonitors() EndIf If ($Monitor > 0) And ($Monitor <= $__MonitorList[0][0]) Then ; Restore the window if necessary Local $WinState = WinGetState($hWindow) If BitAND($WinState, 16) Or BitAND($WinState, 32) Then WinSetState($hWindow, '', @SW_RESTORE) EndIf Local $WinSize = WinGetPos($hWindow) Local $x = Int(($__MonitorList[$Monitor][3] - $__MonitorList[$Monitor][1] - $WinSize[2]) / 2) + $__MonitorList[$Monitor][1] Local $y = Int(($__MonitorList[$Monitor][4] - $__MonitorList[$Monitor][2] - $WinSize[3]) / 2) + $__MonitorList[$Monitor][2] WinMove($hWindow, '', $x, $y) EndIf EndIf EndFunc ;==>_CenterOnMonitor ;================================================================================================== ; Function Name: _GetMonitorFromPoint([$XorPoint = -654321[, $Y = 0]]) ; Description:: Get a monitor number from an x/y pos or the current mouse position ; Parameter(s): ; optional: $XorPoint X Position or Array with X/Y as items 0,1 (ie from MouseGetPos()) ; optional: $Y Y Position ; Note: Should probably have specified return/error codes but haven't put them in yet, ; and better checking should be done on passed variables. ; Used to use MonitorFromPoint DLL call, but it didn't seem to always work. ; Author(s): xrxca (autoit@forums.xrx.ca) ;================================================================================================== Func _GetMonitorFromPoint($XorPoint = 0, $y = 0) If @NumParams = 0 then local $MousePos = MouseGetPos() Local $myX = $MousePos[0] Local $myY = $MousePos[1] Elseif ( @NumParams = 1 ) and IsArray($XorPoint) Then Local $myX = $XorPoint[0] Local $myY = $XorPoint[1] Else Local $myX = $XorPoint Local $myY = $y EndIf If $__MonitorList[0][0] == 0 Then _GetMonitors() EndIf Local $i = 0 Local $Monitor = 0 For $i = 1 To $__MonitorList[0][0] If ($myX >= $__MonitorList[$i][1]) _ And ($myX < $__MonitorList[$i][3]) _ And ($myY >= $__MonitorList[$i][2]) _ And ($myY < $__MonitorList[$i][4]) Then $Monitor = $i Next Return $Monitor EndFunc ;==>_GetMonitorFromPoint ;================================================================================================== ; Function Name: _GetMonitors() ; Description:: Load monitor positions ; Parameter(s): n/a ; Return Value(s): 2D Array of Monitors ; [0][0] = Number of Monitors ; [i][0] = HMONITOR handle of this monitor. ; [i][1] = Left Position of Monitor ; [i][2] = Top Position of Monitor ; [i][3] = Right Position of Monitor ; [i][4] = Bottom Position of Monitor ; Note: [0][1..4] are set to Left,Top,Right,Bottom of entire screen ; hMonitor is returned in [i][0], but no longer used by these routines. ; Also sets $__MonitorList global variable (for other subs to use) ; Author(s): xrxca (autoit@forums.xrx.ca) ;================================================================================================== Func _GetMonitors() $__MonitorList[0][0] = 0 ; Added so that the global array is reset if this is called multiple times Local $handle = DllCallbackRegister("_MonitorEnumProc", "int", "hwnd;hwnd;ptr;lparam") DllCall("user32.dll", "int", "EnumDisplayMonitors", "hwnd", 0, "ptr", 0, "ptr", DllCallbackGetPtr($handle), "lparam", 0) DllCallbackFree($handle) Local $i = 0 For $i = 1 To $__MonitorList[0][0] If $__MonitorList[$i][1] < $__MonitorList[0][1] Then $__MonitorList[0][1] = $__MonitorList[$i][1] If $__MonitorList[$i][2] < $__MonitorList[0][2] Then $__MonitorList[0][2] = $__MonitorList[$i][2] If $__MonitorList[$i][3] > $__MonitorList[0][3] Then $__MonitorList[0][3] = $__MonitorList[$i][3] If $__MonitorList[$i][4] > $__MonitorList[0][4] Then $__MonitorList[0][4] = $__MonitorList[$i][4] Next _ArraySort($__MonitorList, 0, 1, 0, 0, 0) ;added to sort it by the first column (hMonitor) so that they line up in physical order like Display Settings-->Rearrange Displays Return $__MonitorList EndFunc ;==>_GetMonitors ;================================================================================================== ; Function Name: _MonitorEnumProc($hMonitor, $hDC, $lRect, $lParam) ; Description:: Enum Callback Function for EnumDisplayMonitors in _GetMonitors ; Author(s): xrxca (autoit@forums.xrx.ca) ;================================================================================================== Func _MonitorEnumProc($hMonitor, $hDC, $lRect, $lParam) Local $Rect = DllStructCreate("int left;int top;int right;int bottom", $lRect) $__MonitorList[0][0] += 1 ReDim $__MonitorList[$__MonitorList[0][0] + 1][5] $__MonitorList[$__MonitorList[0][0]][0] = $hMonitor $__MonitorList[$__MonitorList[0][0]][1] = DllStructGetData($Rect, "left") $__MonitorList[$__MonitorList[0][0]][2] = DllStructGetData($Rect, "top") $__MonitorList[$__MonitorList[0][0]][3] = DllStructGetData($Rect, "right") $__MonitorList[$__MonitorList[0][0]][4] = DllStructGetData($Rect, "bottom") Return 1 ; Return 1 to continue enumeration EndFunc ;==>_MonitorEnumProc Now when I use _CenterOnMonitor, it correctly moves the specified WindowTitle to the specified Monitor number. _CenterOnMonitor("Notepad", "", 1) ;leftmost Sleep(2000) _CenterOnMonitor("Notepad", "", 2) ;middle left Sleep(2000) _CenterOnMonitor("Notepad", "", 3) ;middle right Sleep(2000) _CenterOnMonitor("Notepad", "", 4) ;rightmost Edit: I didn't find MultiMon.au3 anywhere in the AutoIt Examples pages to follow up with my 2 cents, so I stuck it here.
    1 point
  7. Hi everybody Here is a simple script that allows to display a tooltip while hovering the mouse over a listview cell. The tooltip disappears as soon as the cell isn't hovered over anymore. The 2 eventual listview scrollbars and the listview headers area are correctly excluded from the hovering process. The GUI is resizable and maximizable and the ListView is a native-created one (only because it's a bit simpler to auto-resize the listview while resizing the GUI) but the basis of this script would work too on a UDF-created listview Both hovered cells "Mary 10" and "Mary 30" display a tooltip in the script below : #include <GuiListView.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Hover over 'Mary 10' or 'Mary 30'", 420, 400, -1, -1, _ BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_MAXIMIZEBOX)) $idListView = GUICtrlCreateListView("Peter|Paul|Mary", 60, 50, 300, 300) GUICtrlSetResizing(-1, $GUI_DOCKAUTO) $hListView = GuiCtrlGetHandle($idListView) $iHeaderHeight = _WinAPI_GetWindowHeight(_GUICtrlListView_GetHeader($hListView)) For $iRow = 0 To 39 $sRow = StringFormat("%2s", $iRow) GUICtrlCreateListViewItem( _ "Peter " & $sRow & " |" & _ "Paul " & $sRow & " |" & _ "Mary " & $sRow & (($iRow = 10 Or $iRow = 30) ? " <" : ""), $idListView) Next For $iCol = 0 To 2 _GUICtrlListView_SetColumnWidth($hListview, $iCol, 100) Next GUISetState() $bToolTip = False ; False = no tooltip actually displayed, True = tooltip displayed While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($hGUI) Exit Case $GUI_EVENT_MOUSEMOVE Local $aMPos = MouseGetPos() Local $aLVPos = WinGetPos($hListView) Local $aLVCli = WinGetClientSize($hListView) If $aMPos[0] <= $aLVPos[0] OR $aMPos[0] > $aLVPos[0] + $aLVCli[0] + 1 _ OR $aMPos[1] <= $aLVPos[1] + $iHeaderHeight OR $aMPos[1] > $aLVPos[1] + $aLVCli[1] + 1 Then If $bToolTip Then ToolTip("") $bToolTip = False EndIf ContinueLoop EndIf Local $aHit = _GUICtrlListView_SubItemHitTest($hListView) If ($aHit[0] = 10 Or $aHit[0] = 30) And $aHit[1] = 2 Then ; item 10 or 30 / subitem 2 ToolTip("Infos " & _GUICtrlListView_GetItemText($hListview, $aHit[0], $aHit[1]) & @lf & _ "Topmost visible item : " & _GUICtrlListView_GetTopIndex($hListview) & @lf & _ "Time " & @HOUR & ":" & @MIN & ":" & @SEC) $bToolTip = True Else If $bToolTip Then ToolTip("") $bToolTip = False EndIf EndIf EndSwitch WEnd For the record, it all started with Siwa's request in this link (Melba23's thread) and after several tries, here is the final result, which could be useful to our Forum members.
    1 point
  8. pixelsearch

    RichEdit resize

    Hi everybody, I would like to revive this thread for 2 reasons : 1) In case jcpetu (OP) still got his issue unsolved, maybe the solution below could work for him. 2) To share with you an alternate way of resizing UDF-created controls, without using the "disabled label way" described in this thread (though it worked fine for me). All credits go to MrCreatoR's UDF GUICtrlSetResizingEx.au3 version 1.3 found in this link. For the record, I discovered MrCreatoR's UDF just now, after having read this new thread from matwachich in this link. So here is jcpetu's code, simplified, with 1 line only to resize the RichEdit controls and it worked great for me, with lesser (apparent) code. Fingers crossed for you, jcpetu #include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include 'GUICtrlSetResizingEx.au3' ; https://www.autoitscript.com/forum/topic/202781-guictrlsetresizing-on-udf-createwindowex-created-controls/?tab=comments#comment-1455745 Opt('GUIOnEventMode', 1) Opt('GUICloseOnESC', 0) Global $GuiMain, $GUIversion = 'Rich Edit Resize', $DeskW = @DesktopWidth - 20, $DeskH = @DesktopHeight - 80 Global $I1, $I2, $Edit1, $Edit2 $GuiMain = GUICreate($GUIversion, $DeskW, $DeskH, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX)) ; GUISetBkColor(0xC4C4C4) ; Just so you can see the RichEdits GUISetOnEvent($GUI_EVENT_CLOSE, 'CloseApp') $I1 = GUICtrlCreateInput('', 66, 30, 581, 31) GUICtrlSetResizing(-1, 1) $I2 = GUICtrlCreateInput('', 66, 70, 581, 31) GUICtrlSetResizing(-1, 1) $Edit1 = _GUICtrlRichEdit_Create($GuiMain, '', 10, 140, ($DeskW / 2) - 10, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL)) _GUICtrlSetResizingEx($Edit1, $GUI_DOCKAUTO) $Edit2 = _GUICtrlRichEdit_Create($GuiMain, '', ($DeskW / 2) + 10, 140, ($DeskW / 2) - 15, 320, BitOR($ES_MULTILINE, $WS_HSCROLL, $WS_VSCROLL)) _GUICtrlSetResizingEx($Edit2, $GUI_DOCKAUTO) $LV1 = GUICtrlCreateListView("", 8, 480, $DeskW - 18, 161, -1, BitOR($LVS_EX_CHECKBOXES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER)) GUICtrlSetResizing(-1, 1) _GUICtrlListView_AddColumn(-1, "#", 30, 1) _GUICtrlListView_AddColumn(-1, "Date", 110, 2) _GUICtrlListView_AddColumn(-1, "Time", 110, 2) _GUICtrlListView_AddColumn(-1, "Event", 110, 2) GUISetState(@SW_SHOW, $GuiMain) While 1 Sleep(10) WEnd Func CloseApp() _GUICtrlRichEdit_Destroy($Edit1) _GUICtrlRichEdit_Destroy($Edit2) GUIDelete($GuiMain) Exit EndFunc ;==>CloseApp To make it easier for you to run the script, I attach below MrCreatoR's UDF GUICtrlSetResizingEx.au3 (version 1.3 dated 09/22/2015), it's the original UDF as found in his archive file : GUICtrlSetResizingEx.au3
    1 point
  9. wolflake

    AutoIt Snippets

    Code to a String: This is a tool to modify code from the clipboard to be pasted as code that can let one program write a file and run the code from that file. I had written an #include file that needed to run a separate program to make a window, but I didn't want to hard code the location of the include file or the window. So I decided to carry the window program within the main program. To do this I wrote the separate program to make the window, then copied it to the clipboard and ran the program below that takes the clipboard and reformats it into code that when run puts that code into a string. I copy that code into the main program then when I need to run the window program the main program calls the function that takes the string writes it to a file and runs the file. ;Make a $sString of code to include in prgm ;Put the code on the clipboard run the prg and paste the string building code in your prg #include <array.au3> Global $q = Chr(39) $aStr = StringSplit(clipget(),@CRLF,3) ;ArrayFromClip for $i = 0 to UBound($aStr) - 1 if $i = 0 then $aStr[$i] = "$sString = " & $q & $aStr[$i] & $q & "& @CRLF" Else $aStr[$i] = "$sString &= " & $q & $aStr[$i] & $q & "& @CRLF" EndIf Next _ArrayToClip($aStr,@CRLF) So copying the program above to the clipboard and running it would produce... $sString = ';Make a $sString of code to include in prgm'& @CRLF $sString &= ';Put the code on the clipboard run the prg and paste the string building code in your prg'& @CRLF $sString &= '#include <array.au3>'& @CRLF $sString &= 'Global $q = Chr(39)'& @CRLF $sString &= '$aStr = StringSplit(clipget(),@CRLF,3) ;ArrayFromClip'& @CRLF $sString &= 'for $i = 0 to UBound($aStr) - 1'& @CRLF $sString &= ' if $i = 0 then'& @CRLF $sString &= ' $aStr[$i] = "$sString = " & $q & $aStr[$i] & $q & "& @CRLF"'& @CRLF $sString &= ' Else'& @CRLF $sString &= ' $aStr[$i] = "$sString &= " & $q & $aStr[$i] & $q & "& @CRLF"'& @CRLF $sString &= ' EndIf'& @CRLF $sString &= 'Next'& @CRLF $sString &= '_ArrayToClip($aStr,@CRLF)'& @CRLF $sString &= ''& @CRLF Adding: FileWrite(@workingdir & "filename.au3",$sString) ShellExecute(@workingdir & "filename.au3") would write it and run it. You could add code to erase the file as part of $GUI_EVENT_CLOSE or just before the codes exits with OnAutoItExitRegister. That way you don't end up with multiple copies if you run in different folders. I hope this is understandable but I happy to answer a question if it isn't.
    1 point
  10. Don't try to overthink it before first trying to use the information provided. Keep it simple -- at least at first. In this case, you don't need to know what those parts of the declaration mean. All you really need to know about those odd declarations are the data types. The description of the function that you provided states that the function only really requires 2 integer values for input. It goes on to state that the result will be placed into a wchar buffer that you need to supply the pointer to and the size of that wchar buffer. #include <Constants.au3> #include <array.au3> #include <WinAPIConv.au3> Example_GetCLRVersionForPSVersion(2, 0) Func Example_GetCLRVersionForPSVersion($iPsMajorVersion, $iPsMinorVersion) Local $aResult Local $tWcharBuffer ;Create wchar buffer to hold result $tWcharBuffer = DllStructCreate("wchar buffer[30];") ;Call function $aResult = DllCall("pwrshplugin.dll", "int:cdecl", "GetCLRVersionForPSVersion", _ "int", $iPsMajorVersion, _ "int", $iPsMinorVersion, _ "ulong_ptr", DllStructGetSize($tWcharBuffer), _ "ptr", DllStructGetPtr($tWcharBuffer), _ "ulong_ptr*", Null) If @error Then Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", "DllCall failed - @error = " & @error) ElseIf _WinAPI_LoWord($aResult[0]) <> 0 Then ;HRESULT return code Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", "Bad return code from DllCall - RC = " & $aResult[0] & " (0x" & Hex($aResult[0]) & ")") EndIf _ArrayDisplay($aResult, "DllCall Result") ;Display the results ConsoleWrite("GetCLRVersionForPSVersion Example" & @CRLF) ConsoleWrite("PowerShell Version : " & "v" &$iPsMajorVersion & "." & $iPsMinorVersion & @CRLF) ConsoleWrite("CLR Runtime Version: " & ($tWcharBuffer.buffer = "" ? "PS Version Not Installed" : $tWcharBuffer.buffer) & @CRLF) EndFunc Console: GetCLRVersionForPSVersion Example PowerShell Version: v2.0 CLR Runtime Version: v2.0.50727
    1 point
  11. Sorry about the lack of updates, I have been busy with life (as usual) and wasn't able to properly formulate a plan on how to proceed forward with parsing statements, I decided that it would be better to tackle expression parsing now, but that threw me into a whole new tangent about various different kinds of techniques for parsing expressions... luckily I have made up my mind with what approach I will use in the initial implementation, I am not 100% sure it will work, but it should. In the mean-while I created an "official" thread for the project: This thread was never really meant to be used for actual technical discussion of the implementation, and it has gotten too big and ugly anyway, it is impossible for new users to get a brief glance about the whole thing without reading through all the pages. So everyone please follow the new thread for updates! I should have an update out soon if all goes according to plan
    1 point
  12. I updated the files attached to the previous post. I added a new API (_wimlib_get_wim_info), a new function to check the state of a given WIM_INFO bit flag (_wimlib_wiminfo_is_flag_set), and a function that will let you lookup the bit flag's name by it's bit position (_wimlib_wiminfo_get_flag_name). I also added examples of the new stuff in the example file. The starter UDF file and the example file should get you back on track and motivated to continue learning more about structs, pointers, and dllcalls.
    1 point
  13. I'm not knocking autoit but when you start running up against these walls you start to realize the limitations of the language. Autoit is great for many things, I appreciate the effort they put in to at least make these types of ventures possible. i've been down this road and its not fun beating your head against your keyboard. I mean go for it. I updated my last post. The only other advice i can give you is that you can just figure out how big the struct needs to be. Allocate a buffer or create a struct the same size or couple bits to spare and you can just traverse it via memory reads. I've found that making structs that are just of type bytes and then just reading specific parts of it via creating a new struct of a specific type at that pointer location is a useful. But again you could always just readprocessmemory().
    1 point
  14. ; ; In C: ; struct { ; uint32_t a : 1 ; uint32_t b : 1 ; uint32_t c : 2 ; uint32_t d : 4 ; uint32_t e : 24 ; } t; ; ; Warning: C doesn't specify the bit order which is implementation-dependant ; ; here assume the following layout: ; eeeeeeee eeeeeeee eeeeeeee ddddccba ; Local $t = DllStructCreate("dword") DllStructSetData($t, 1, 0x0123045D) Local $a = BitAND(DllStructGetData($t, 1), 0x01) Local $b = BitAND(BitShift(DllStructGetData($t, 1), 1), 0x01) Local $c = BitAND(BitShift(DllStructGetData($t, 1), 2), 0x03) Local $d = BitAND(BitShift(DllStructGetData($t, 1), 4), 0x0F) Local $e = BitAND(BitShift(DllStructGetData($t, 1), 8), 0x00FFFFFF) ConsoleWrite(Hex($a) & @TAB & Hex($b) & @TAB & Hex($c) & @TAB & Hex($d) & @TAB & Hex($e) & @LF)
    1 point
×
×
  • Create New...