Jump to content

Recommended Posts

Posted

Hello I'm a .Net C# Developer.

I use in my code on my PC Windows 7 32 bits this line:

string text = au3.ControlListView(windowTitle, "", "SysListView321", "GetText", "1", "");

I receive a correct result

but on my second PC Windows 7 64 bits, the same line give me a blank result ?? I touch anything, I open the same project but on two different machines (32 bits and 64 bits), on 32 bits, I've installed 32 bits version of AutoIT, and on 64 bits version 64 bits.

If I install 32 bits version on Windows 7 64 bits, my script crash

Do you plan a new version or a Beta version correct this ?

Thanks for your good job

David

Posted

From the help-file for the function ControlListView():

"Some commands may fail when using a 32-bit AutoIt process to read from a 64-bit process. Likewise commands may fail when using a 64-bit AutoIt process to read from a 32-bit process."

I guess that's not really a bug but windows internal?

  • 1 month later...
Posted (edited)

The only AutoIt internal way I know of is compiling your script in x64 :D... then accessing the data should be no problem.

What I did once for SSD was to write a 32bit wrapper for a script complied to 32bit AND 64bit to work in both worlds...

Global $sFilename, $iPID, $timer
 
If Not FileExists(@ScriptDir & "\SSD") Then DirCreate(@ScriptDir & "\SSD")
Global $sConfig_Path = @ScriptDir & "\SSD"
 
If @OSArch = "X86" Then
    $sFilename = $sConfig_Path & "\SSD_32bit.exe"
    FileInstall("SSD_32bit.exe", $sFilename)
Else
    $sFilename = $sConfig_Path & "\SSD_64bit.exe"
    FileInstall("SSD_64bit.exe", $sFilename)
EndIf
 
If Not FileExists($sFilename) Then _Exit("Could not extract OSArch file to" & @CRLF & @CRLF & $sFilename)
 
Run(FileGetShortName($sFilename) & " " & $CmdLineRaw, $sConfig_Path)
 
Func _Exit($sMsg = "")
    If $sMsg Then MsgBox(16 + 262144, "SSD Install Error", $sMsg)
    Exit
EndFunc   ;==>_Exit
Edited by KaFu
Posted

Im an currently working with a script doing this exact thing that you are asking and it works fine for 32bit and 64bit, (Obviously a 64bit compiled exe wont work on a 32bit machine)

string text = ControlListView("WindowTitle", "", "SysListView321", "GetText", "1", "") should work with no issues - I run this exact line of code on 32bit and 64bit machines all day long

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...