Jump to content
Sign in to follow this  
semiono

REG_BINARY (TELIN, INTEL)

Recommended Posts

semiono

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\VirtualDub.org\VirtualDub\Window Placement]

"Main window"=hex:00,00,00,00,00,00,00,00,80,04,00,00,2c,03,00,00,00,00,00,00

HOWTO RegWrite() it - ...04,80... to> 80,04 and ..03,2c.. > 2c,03 ??

$AB,$CD to $CD,$AB ??

the parametrs is not constant! it's variable i need to RegWright

Edited by semiono

Share this post


Link to post
Share on other sites
PsaltyDS

If you mean the bytes look swapped, you may be having endian issues with the binary data. Post a short example script that does a RegRead() of your value and displays the result. Then indicate what you expected it to give you instead. That will help figuring out what you want for the RegWrite().

:blink:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
semiono

I wish create universal loader for app windows on any desktops

My example:

#Include <Constants.au3>
#NoTrayIcon
TraySetIcon("warning")

$x = BitOR(@DesktopWidth, @DesktopWidth)
$y = BitOR(@DesktopHeight-52, @DesktopHeight-52)
$z = Binary(0) & Binary(0) & Binary($x) & Binary($y) & Binary(0)

RegWrite("HKCU\Software\VirtualDub.org\VirtualDub\Window Placement", "Main windowZ", "REG_BINARY", $z)

ShellExecute(@ProgramFilesDir & "\VirtualDub\Veedub64.exe", $CmdLineRaw)

Posted Image

I could see that BitOR() himeself not useful... :blink:

What is true, good idea for this task resolve? Please help me?

Why Binary(0) is wright for bytes NULL ?

Edited by semiono

Share this post


Link to post
Share on other sites
PsaltyDS

So the write and read values match (exact value depends on your desktop size, of course):

$bWrite = Binary(0) & Binary(0) & Binary(@DesktopWidth) & Binary(@DesktopHeight-52) & Binary(0)
ConsoleWrite("Debug: $bWrite = " & $bWrite & @LF)
RegWrite("HKCU\Software\VirtualDub.org\VirtualDub\Window Placement", "Main windowZ", "REG_BINARY", $bWrite)
$bRead = RegRead("HKCU\Software\VirtualDub.org\VirtualDub\Window Placement", "Main windowZ")
ConsoleWrite("Debug:  $bRead = " & $bRead & @LF)

; Output:
; Debug:      $z = 0x0000000000000000800700007C04000000000000
; Debug:  $bRead = 0x0000000000000000800700007C04000000000000

What did you want to be different?

:blink:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
semiono

String - 'Main windowZ' do not need!

I need only make universal loader for VirtualDub for any desktops size.

But i not sure that my coding is correct, i'm newbie :blink:

Ok! I see it not wrong.

$x = Binary(0) & Binary(0) & Binary(@DesktopWidth) & Binary(@DesktopHeight-52) & Binary(0)
RegWrite("HKCU\Software\VirtualDub.org\VirtualDub\Window Placement", "Main window", "REG_BINARY", $x)
ShellExecute(@ProgramFilesDir & "\VirtualDub\Veedub64.exe", $CmdLineRaw)

Good works!

Edited by semiono

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.