Jump to content

Recommended Posts

Posted (edited)

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
Posted

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
Posted (edited)

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
Posted

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
Posted (edited)

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...