Jump to content

Recommended Posts

Posted

The _PathSplit() issue seams to be fixed on Au3.3.16.0 RC2

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

 

MsgBox(262144, "@OSVersion", '@OSVersion = "' & @OSVersion & '"' & _ 
                            @CR & 'WinVer: ' & FileGetVersion("WinVer.exe")  & _
                            @CR & 'ProductName: ' & RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'ProductName') & _
                            @CR & 'CurrentVersion: ' & RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'CurrentVersion') & _
                            @CR & 'ReleaseId: ' & RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'ReleaseId') & _
                            "", 60)

 

Edit4: fixed on RC3 ( see bellow )

Edited by argumentum
fixed

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

  • Administrators
  • Jon unpinned this topic
Posted (edited)

Great, that the new version ist out. Thank to all involved for the ongoing work on AutoIt.

  On 3/5/2022 at 3:00 PM, Jon said:

Edit: I've noticed over the last few years, and at work, it's almost impossible in modern browsers to download .exe files. So I think I'm going to wrap the installer in a .zip as well. I'll probably have two installer versions up though so it doesn't break any updater type scripts.

Expand  

If you find time, can you adjust the update.dat or upload the exe (https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3.3.16.0-setup.exe) as well?

 

//Edit: Working now, perfect!

Edited by HurleyShanabarger
Posted (edited)

There is a bug in the GDIPlus.au3 because I wondered why a function suddenly doesn't work properly:

Old:

Func _GDIPlus_GraphicsSetInterpolationMode($hGraphics, $iInterpolationMode)
    Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetInterpolationMode", "handle", $hGraphics, "int", $iInterpolationMode)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)

    Return True
EndFunc   ;==>_GDIPlus_GraphicsSetInterpolationMode

New:

Func _GDIPlus_GraphicsSetInterpolationMode($hGraphics, $iInterpolationMode)
    Local $aCall = DllCall($__g_hGDIPDll, "int", "GdipSetInterpolationMode", "handle", $hGraphics, "int", $iInterpolationMode + 1)
    If @error Then Return SetError(@error, @extended, False)
    If $aCall[0] Then Return SetError(10, $aCall[0], False)

    Return True
EndFunc   ;==>_GDIPlus_GraphicsSetInterpolationMode

Why " + 1"?

 

Btw, there a some more functions with added " + 1"!?!?!:

_GDIPlus_GraphicsSetCompositingMode, _GDIPlus_GraphicsSetCompositingQuality, _GDIPlus_GraphicsSetCompositingQuality

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted

It was changed toogether with: https://www.autoitscript.com/trac/autoit/ticket/3835
In SVN revision 12580

@UEZ please check also: 

_GDIPlus_GraphicsSetCompositingMode
_GDIPlus_GraphicsSetCompositingQuality
_GDIPlus_GraphicsSetInterpolationMode
_GDIPlus_GraphicsSetPixelOffsetMode
 

and:
_GDIPlus_GraphicsGetCompositingMode
_GDIPlus_GraphicsGetCompositingQuality
_GDIPlus_GraphicsGetInterpolationMode

there is:

Return $aCall[2] - 1

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Confirmed, also functions

_GDIPlus_GraphicsGetCompositingMode
_GDIPlus_GraphicsGetCompositingQuality
_GDIPlus_GraphicsGetInterpolationMode

wrongly changed to " - 1"!

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted (edited)
  On 3/6/2022 at 10:16 PM, mLipok said:

_GDIPlus_GraphicsSetCompositingMode
_GDIPlus_GraphicsSetCompositingQuality
_GDIPlus_GraphicsSetInterpolationMode
_GDIPlus_GraphicsSetPixelOffsetMode

Expand  

and what about all this ones ?
Could you test it?

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)
  On 3/6/2022 at 10:33 PM, mLipok said:

and what about all this ones ?
Could you test it?

Expand  

I edited my previous post after I recognized also that the other functions were buggy.

 

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted
  On 3/6/2022 at 10:35 PM, UEZ said:

I edited my previous post after I recognized also that the other functions were buggy.

Expand  

I was testing things and was not aware about your edits ;)

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Hi @Jon

Bravo for this great job you did :)
In case a new amended release 3.3.16.1 should appear (because of the crash when ArrayDisplay faces an element with a NULL value as described in this link), do you think the following could be considered too :

Help file, topic Number :
When you add some spaces at the beginning of strings containing digits, the content of the string is still correctly evaluated, for example :

Number("  3.14") ; Returns 3.14
Number("  24/7") ; Returns 24

The only one which isn't correctly evaluated is the hexadecimal case :

Number("  0xcade") ; Returns 0
Number("0xcade") ; Returns 51934

Should it be amended to return 51934 in both cases ?
Thanks
 

"I think you are searching a bug where there is no bug..."

Posted (edited)
  On 3/9/2022 at 9:10 AM, Jon said:

we were very friendly ... then I guess "    0xcade" should.

Expand  

Thanks for being friendly :)
I tried them all like this :

Local $dNumber1 = Number(1 + 2 + 10) ; Returns 13.
Local $dNumber2 = Number("  3.14") ; Returns 3.14.
Local $dNumber3 = Number("  24/7") ; Returns 24.
Local $dNumber4 = Number("  tmp3") ; Returns 0 as this is a string.
Local $dNumber5 = Number("  1,000,000") ; Returns 1 as it strips everything after (and including) the first comma.
Local $dNumber6 = Number("  24autoit") ; Returns 24
Local $dNumber7 = Number("  1.2e3sa") ; Returns 1200
Local $dNumber8 = Number("  0xcade") ; Returns 0 <=================
Local $dNumber9 = Number(Ptr(5)) ; Returns 5
Local $dNumber10 = Number(Binary("abc")) ; Returns decimal value of 0x616263 = 6513249
Local $dNumber11 = Number(ObjCreate("Scripting.Dictionary")) ; Returns 0
Local $dNumber12 = Number(1 > 3 Or 5 <= 15) ; Returns 1
Local $dNumber13 = Number("  -30") ; Returns 30 (minor : should be -30 in help file) <====

Depending on what you'll decide, I'll finally get rid of these lines (or not) in a personal rework :

If $iType = 1 And StringLeft(StringStripWS($aArray[0], 1), 2) = "0x" Then ; $STR_STRIPLEADING = 1
    For $i = 0 To $_g_ArrayDisplay_nRows - 1
        $sData &= Number(StringStripWS($aArray[$i], 1)) & $sDelim ; $sDelim also at end of string (used by dll +++)
    Next
Else
    ...

 

Edited by pixelsearch

"I think you are searching a bug where there is no bug..."

  • 2 weeks later...
Posted (edited)

@Jon: thanks for the fix in 3.3.16.1 . Now Number() ignores eventual leading spaces in strings containing hexa :

MsgBox(0, @AutoItversion, "Number('   0xcade') = " & Number('   0xcade'))

2052777000_hexwithspacesfixed.png.66729fc81cdae8d28897b10a206828af.png

In fact, now it works like C++ . If you look at the C++ example concerning stoi in this link and you add leading spaces to any of the 4 strings, then C++ result ignores any leading space when converting :

std::string str_dec  = "   2001, A Space Odyssey";
std::string str_hex  = "   40c3";
std::string str_bin  = "   -10010110001";
std::string str_auto = "   0x7f";

After compiling, stoi of "   40c3" displays correctly 16579... just like AutoIt 3.3.16.1
Well done, Jon :)

Edit: I just tested : you already fixed this in AutoIt stable version 3.3.16.0 , damn you're fast !

Edited by pixelsearch

"I think you are searching a bug where there is no bug..."

  • 2 weeks later...
Posted (edited)

Here is something that looks a bit hard to solve (let's hope I'm wrong)

#include <Debug.au3>

Local $a = [1, 2, 3]
Local $b = ["x", "y", $a, "z"]

_DebugArrayDisplay($b, "$b : " & @AutoItVersion, Default, Default, Default, _
    "Col 0", Default, _UserFunc)

Func _UserFunc($aArray, $aSelected) ; as found in help file
    _DebugArrayDisplay($aSelected, "Selected rows : " & @AutoItVersion, "1:")
EndFunc    ;==>_UserFunc

1284739185_Debugfunction3.3_14.5.png.24b4ac7bdaba5b1d29562657d9d623ea.png

1572419142_Debugfunction3.3_16.1.png.d7784492b65b4ee816866b5f3091831a.png

* Calling ArrayDisplay recursively worked fine with AutoIt 3.3.14.5 because there was no subclassing, no global sort indexes stored in arrays etc... but the display was slow when it came to big arrays.

* Looking at the pics above, calling ArrayDisplay recursively isn't really recommended with AutoIt 3.3.16.0+ because of the WM_NOTIFY message handler held through subclassing (?) maybe also because of the global indexes stored in arrays etc... but the advantage of 3.3.16.0+ is an immediate display (no matter the rows number) and a quick column sort.

See how the row values disappeared in the 2nd pic (in 3.3.16.1) . Now, after you close the "Selected rows" pic, then click on Col0 to Sort (hoping to make values reappear ?), it's the main GUI that will disappear too, leaving you with nothing. You'll have to close AutoIt.exe (which is now slowly heating CPU) by yourself, through the Task Manager.

It made me remember of a sentence from Melba23, I just googled on "autoit melba23 plague subclassing" to retrieve the post where he shared his contagious thoughts :D

Edited by pixelsearch
Func _UserFunc as found in help file (the recursive call)

"I think you are searching a bug where there is no bug..."

Posted

Silly question,

where/how did  you pickup 3.3.16.1 ?

From the dowwnload area I just pickup  3.3.16.0

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