Jump to content

Handle does not match when builded


Go to solution Solved by Nine,

Recommended Posts

Posted

I have a simple code, when run in the editor all work, but when builded it does not work.

The $hWnd when works contains 0x000408D8, and the $inputS gets a value.

When builded to an executable the handle is 0x00000000000408D8 and the $inputS is empty.

 

 

#include <MsgBoxConstants.au3>
#include <GUIListView.au3>

Local $teller = -1
Local $SearchType = "CX-" ;$CmdLine[1]

Local $hWnd = ControlGetHandle("TwinCAT Static Routes","","SysListView321")
Local $inputS = _GUICtrlListView_GetItemTextString($hWnd, 0) ;$teller is de regel

MsgBox($MB_SYSTEMMODAL, "info", $hWnd)
MsgBox($MB_SYSTEMMODAL, "info", $inputS)

  • Solution
Posted (edited)

Although both versions (x86 and x64) are installed.  You can decide to run/compile in either version afterwards.

Look at your current handle (when compiled) and you can see it is a 64bits handle.   Follow next instructions to compile x86 :

Open Scite, open your script, go to menu ==> Tools/Compile.  Make sure you only check x86 version checkbox.  Click compile button. Now, open DOS window (or File Explorer) and run your script.exe.

Edited by Nine
Posted

tried compiling before but it did not work, AV was also complaining about a virus.

Now it works, very strange.

I did not get an option when compiling, maybe that only for an 64bit installment?

But now understand the possible cause of the extra zero's.

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
×
×
  • Create New...