Jump to content



Photo

Latest Beta


  • Please log in to reply
182 replies to this topic

#21 jaberwocky6669

jaberwocky6669

    Dull light.

  • Active Members
  • PipPipPipPipPipPip
  • 2,076 posts

Posted 08 February 2012 - 09:05 AM

::relief:: I thought it was about to asplode.





#22 UEZ

UEZ

    Never say never

  • MVPs
  • 3,605 posts

Posted 08 February 2012 - 01:21 PM

It's x86 callback. Currently AutoIt pushes data onto FPU stack regardless of the type of return. This is opposite of what it did before.
The problem with the code before was that float and double types weren't returned by callback functions at all.
...

Indeed, the problem occurs when the line
Global $hKey_Proc = DllCallbackRegister("_Mouse_Proc", "int", "int;ptr;ptr")
is processed.

AutoIt         
Func _Mouse_Proc($nCode, $wParam, $lParam) ;function called for mouse events.. Made by _Kurt     ;define local vars     Local $info, $mouseData, $Ret, $mi     If $nCode < 0 Then ;recommended, see http://msdn.microsoft.com/en-us/library/ms644986(VS.85).aspx         $Ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hM_Hook[0], "int", $nCode, "ptr", $wParam, "ptr", $lParam) ;recommended         Return $Ret[0]     EndIf     $info = DllStructCreate($MSLLHOOKSTRUCT, $lParam)     $mouseData = DllStructGetData($info, 3)     ;Find which event happened     Select         Case $wParam = $WM_MOUSEWHEEL And WinActive($hGUI)             $mi = GUIGetCursorInfo()             If Not @error Then                 If $mi[4] <> $List Then ;activate zooming only when mouse is not hovering listview section                     If _WinAPI_HiWord($mouseData) > 0 Then                         Zoom(1)                     Else                         Zoom(0)                     EndIf                     Return 1                 EndIf             EndIf     EndSelect     ;This is recommended instead of Return 0     $Ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hM_Hook[0], "int", $nCode, "ptr", $wParam, "ptr", $lParam)     Return $Ret[0] EndFunc   ;==>_Mouse_Proc


Thx,
UEZ

Edited by UEZ, 08 February 2012 - 01:22 PM.

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#23 wraithdu

wraithdu

    I am less fun than a twisted ankle.

  • MVPs
  • 2,137 posts

Posted 08 February 2012 - 02:43 PM

wraithdu you had a stub or two into bitwise operations. Any thoughts on this? Or anyone else maybe? What are the expectations?

Way back when I was playing with the bitwise ops, my main gripe was the different output from AutoIt versus C, in that an AutoIt bitshift to the right will propagate the sign bit. That doesn't happen in C.

If the bitwise ops will soon support 64-bit numbers, then make it consistent to the 32-bit ops in that regard. I would say to make the behavior consistent to the C bitwise ops, but that's your call.

#24 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 08 February 2012 - 04:12 PM

Make the behavior mimic C with regards to the sign bit. For BitShift() add a new parameter to specify the size. I see that BitRotate() already has a size so it just needs "Q" for QWORD. It may be best to mimic the flag parameter of BitRotate() for BitShift().

#25 UEZ

UEZ

    Never say never

  • MVPs
  • 3,605 posts

Posted 09 February 2012 - 11:04 AM

Here the problem with the beta shortened.

AutoIt         
#include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global Const $MSLLHOOKSTRUCT = $tagPOINT & ";dword mouseData;dword flags;dword time;ulong_ptr dwExtraInfo" Global $hKey_Proc = DllCallbackRegister("_Mouse_Proc", "int", "int;ptr;ptr") Global $hM_Module = DllCall("kernel32.dll", "hwnd", "GetModuleHandle", "ptr", 0) Global $hM_Hook = DllCall("user32.dll", "hwnd", "SetWindowsHookEx", "int", $WH_MOUSE_LL, "ptr", DllCallbackGetPtr($hKey_Proc), "hwnd", $hM_Module[0], "dword", 0) Global Const $hGUI = GUICreate("Bug Test", 409, 201, 192, 124) Global Const $Button1 = GUICtrlCreateButton("Button1", 40, 40, 91, 65) Global Const $Button2 = GUICtrlCreateButton("Button2", 160, 40, 91, 65) Global Const $Button3 = GUICtrlCreateButton("Button3", 280, 40, 91, 65) Global Const $Button4 = GUICtrlCreateButton("Button4", 288, 152, 75, 25) GUISetState(@SW_SHOW) While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             DllCall("user32.dll", "int", "UnhookWindowsHookEx", "hwnd", $hM_Hook[0])             $hM_Hook[0] = 0             DllCallbackFree($hKey_Proc)             $hKey_Proc = 0             Exit     EndSwitch WEnd ;<a href='http://www.autoitscript.com/forum/index.php?showtopic=81761' class='bbc_url' title='' rel='norewrite'>http://www.autoitscript.com/forum/index.php?showtopic=81761</a> Func _Mouse_Proc($nCode, $wParam, $lParam) ;function called for mouse events.. Made by _Kurt     ;define local vars     Local $info, $mouseData, $Ret, $mi     If $nCode < 0 Then ;recommended, see <a href='http://msdn.microsoft.com/en-us/library/ms644986(VS.85' class='bbc_url' title='External link' rel='norewrite nofollow external'>http://msdn.microsoft.com/en-us/library/ms644986(VS.85</a>).aspx         $Ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hM_Hook[0], "int", $nCode, "ptr", $wParam, "ptr", $lParam) ;recommended         Return $Ret[0]     EndIf     $info = DllStructCreate($MSLLHOOKSTRUCT, $lParam)     $mouseData = DllStructGetData($info, 3)     ;Find which event happened     Select         Case $wParam = $WM_MOUSEWHEEL And WinActive($hGUI)             $mi = GUIGetCursorInfo()             If Not @error Then             EndIf     EndSelect     ;This is recommended instead of Return 0     $Ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hM_Hook[0], "int", $nCode, "ptr", $wParam, "ptr", $lParam)     Return $Ret[0] EndFunc   ;==>_Mouse_Proc


If you hover with the mouse over the buttons you will see what is happening.


Br,
UEZ

Edited by UEZ, 09 February 2012 - 11:05 AM.

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#26 wraithdu

wraithdu

    I am less fun than a twisted ankle.

  • MVPs
  • 2,137 posts

Posted 09 February 2012 - 02:40 PM

Wow, that's all kinds of goofy running as x86 (works ok as x64).

FYI, check your dllcall parameter types or use the _WinAPI_ functions. I know some of what you have there is "interchangeable", but bad code is bad code. For example, "hwnd" isn't correct anywhere, it should be "handle". There are also some return types that should be "bool", and the proc types should be "wparam" and "lparam" and "lresult". Being proper about it will keep platform and bitness bugs from creeping in. Just my opinion of course, take it or leave it.

#27 Melba23

Melba23

    Yes, me!

  • Moderators
  • 15,350 posts

Posted 19 February 2012 - 05:13 PM

Hi,

The Beta does not like my NoFocusLines UDF. The GUI no longer redraws correctly with controls vanishing and reappearing spontaneously - I even get the entire title bar vanishing on occasion. ;)

Looking at the list of changes made and the UDF code, DllCallbackRegister seems the likely culprit. However, the syntax in the UDF still appears to match that in the Help file. Could someone who understands what changes were made please suggest what I need to change in the UDF? :)

M23
StringSize - Automatically size controls to fit text - ExtMsgBox - A user customisable replacement for MsgBox

Toast - Small GUIs which pop out of the Systray - Marquee - Scrolling tickertape GUIs

Scrollbars - Automatically sized scrollbars with a single command - GUIFrame - Subdivide GUIs into many adjustable frames

GUIExtender - Extend and retract multiple sections within a GUI - NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes

ChooseFileFolder - Single and multiple selections from specified path tree structure - - Notify - Small notifications on the edge of the display

RecFileListToArray - An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options

GUIListViewEx - Insert, delete, move, drag and sort ListView items


#28 trancexx

trancexx

    Hm, I really shouldn't.

  • Active Members
  • PipPipPipPipPipPip
  • 5,188 posts

Posted 19 February 2012 - 05:49 PM

Nothing. If change log doesn't mention script breaking changes then all of your code should work like before.
When new beta would be out then try again.

Melba23, you could have said what windows you run, what version (bitness) of AutoIt and other stuff.

Edited by trancexx, 19 February 2012 - 06:00 PM.

eMyvnE


#29 Melba23

Melba23

    Yes, me!

  • Moderators
  • 15,350 posts

Posted 19 February 2012 - 06:04 PM

trancexx,

Sorry - I will try and do better next time. :)

M23

Edit: Although I hope there will not be a next time! ;)

Edited by Melba23, 19 February 2012 - 06:32 PM.

StringSize - Automatically size controls to fit text - ExtMsgBox - A user customisable replacement for MsgBox

Toast - Small GUIs which pop out of the Systray - Marquee - Scrolling tickertape GUIs

Scrollbars - Automatically sized scrollbars with a single command - GUIFrame - Subdivide GUIs into many adjustable frames

GUIExtender - Extend and retract multiple sections within a GUI - NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes

ChooseFileFolder - Single and multiple selections from specified path tree structure - - Notify - Small notifications on the edge of the display

RecFileListToArray - An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options

GUIListViewEx - Insert, delete, move, drag and sort ListView items


#30 trancexx

trancexx

    Hm, I really shouldn't.

  • Active Members
  • PipPipPipPipPipPip
  • 5,188 posts

Posted 20 February 2012 - 09:25 AM

trancexx,

Sorry - I will try and do better next time. :)

M2

That's great, thanks.

eMyvnE


#31 caplan77

caplan77

    Seeker

  • New Members
  • 2 posts

Posted 21 February 2012 - 06:51 PM

Issue #2111 still appears to be broken in 3.3.9.0 compiled scripts.

Here's my testing example:

AutoIt         
;constants Global Const $tagBOOL = "int" Global Const $tagSTRING64 = "char[64]" Global Const $tagSTRING128 = "char[128]" Global Const $tagSTRING256 = "char[256]" Global Const $tagSTRING32767 = "char[32767]" Global Const $tagSTRING_CRED_MAX_USERNAME_LENGTH = "char[513]" Global Const $tagCREDUI_INFO = "DWORD cbSize;HWND hwndParent;PTR pszMessageText;PTR pszCaptionText;HBITMAP hbmBanner" ;Flags for CredUIPromptForCredentials Global Const $CRED_MAX_USERNAME_LENGTH = (256+1+256) Global Const $CREDUI_MAX_PASSWORD_LENGTH = 256 Global Const $CRED_MAX_GENERIC_TARGET_NAME_LENGTH = 32767 Global Const $CRED_MAX_STRING_LENGTH  = 256 Global Const $CREDUI_FLAGS_INCORRECT_PASSWORD = 0x00001  ;indicates the username is valid, but password is not Global Const $CREDUI_FLAGS_DO_NOT_PERSIST = 0x00002   ;Do not show "Save" checkbox, and do not persist credentials Global Const $CREDUI_FLAGS_REQUEST_ADMINISTRATOR = 0x00004 ;Populate list box with admin accounts Global Const $CREDUI_FLAGS_EXCLUDE_CERTIFICATES = 0x00008 ;do not include certificates in the drop list Global Const $CREDUI_FLAGS_REQUIRE_CERTIFICATE = 0x00010 Global Const $CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX = 0x00040 Global Const $CREDUI_FLAGS_ALWAYS_SHOW_UI = 0x00080 Global Const $CREDUI_FLAGS_REQUIRE_SMARTCARD = 0x00100 Global Const $CREDUI_FLAGS_PASSWORD_ONLY_OK = 0x00200 Global Const $CREDUI_FLAGS_VALIDATE_USERNAME = 0x00400 Global Const $CREDUI_FLAGS_COMPLETE_USERNAME = 0x00800   Global Const $CREDUI_FLAGS_PERSIST = 0x01000    ;Do not show "Save" checkbox, but persist credentials anyway Global Const $CREDUI_FLAGS_SERVER_CREDENTIAL = 0x04000 Global Const $CREDUI_FLAGS_EXPECT_CONFIRMATION = 0x20000 ;do not persist unless caller later confirms credential via CredUIConfirmCredential() api Global Const $CREDUI_FLAGS_GENERIC_CREDENTIALS = 0x40000 ;Credential is a generic credential Global Const $CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS = 0x80000 ;Credential has a username as the target Global Const $CREDUI_FLAGS_KEEP_USERNAME = 0x100000   ;don't allow the user to change the supplied username If IsArray($cmdline) Then If UBound($cmdline) > 1 Then   If $cmdline[1] = "/AdminConsole" Then    MsgBox(0,"Admin Console",@username & @CRLF & @WorkingDir)    Exit   EndIf EndIf EndIf CredTest() Exit Func CredTest() Local $lCreds, $lBslashLoc, $lDomain, $lUser, $lRPID $lCreds = _CredUIPromptForCredentials(0, "", "", "", " Admin Console", "", "", "", "", -1) If IsArray($lCreds) Then   If $lCreds[0] = 1223 Then    ;user canceled credentials box    $lDone = 1   ElseIf $lCreds[1] <> "" Then    If StringInStr($lCreds[1],"\") Then     $lBslashLoc = StringInStr($lCreds[1],"\")     $lDomain = StringLeft($lCreds[1], $lBslashLoc - 1)     $lUser = StringTrimLeft($lCreds[1], $lBslashLoc)    ElseIf StringInStr($lCreds[1],"@") Then     $lBslashLoc = StringInStr($lCreds[1],"@")     $lUser = StringLeft($lCreds[1], $lBslashLoc - 1)     $lDomain = StringTrimLeft($lCreds[1], $lBslashLoc)    EndIf    If ($lUser <> "") And ($lDomain <> "") And ($lCreds[2] <> "") Then       ;RunAs ( "username", "domain", "password", logon_flag, "filename" [, "workingdir" [, show_flag [, opt_flag ]]] )     $lRPID = RunAs($lUser, $lDomain, $lCreds[2],1,'"' & @ScriptFullPath & '" /AdminConsole', @SystemDir)     MsgBox(0,"Creds",$lUser & @CRLF & $lDomain & @CRLF & "PWLen: " & StringLen($lCreds[2]) & @CRLF & "PID: " & $lRPID)     If $lRPID = 0 Then      ;log- Admin Console - Access Denied. Unknown user name or bad password      $lMsgRslt = MsgBox(BitOR(0x1,0x30,0x40000)," Admin Console","Access Denied" & @CRLF & @CRLF & "Unknown user name or bad password." & @CRLF & "RunAs process could not be created.",120)      If ($lMsgRslt = -1) or ($lMsgRslt = 2) Then       ;user has canceled or the message timed out       $lDone = 1      EndIf     Else      ;admin console was started      $lDone = 1     EndIf    EndIf   EndIf Else   MsgBox(0,Default,"Array not returned") EndIf EndFunc Func _CredUIPromptForCredentials($lHWndParentUI = 0, $lpszMessageText = "", $lpszCaptionText = "", $lhbmBanner = "", $lpszTargetName = "", $ldwAuthError = "", $lpszUserName = "", $lpszPassword = "", $lpfSave = "", $ldwFlags = "") Local $sCREDUI_INFO, $spszMessageText, $spszCaptionText Local $spszTargetName, $spszUserName, $spszPassword, $spfSave, $lCredUIPromptForCredentials, $retArray[4] ;configure CREDUI_INFO structures $spszMessageText = DllStructCreate($tagSTRING32767) $spszCaptionText = DllStructCreate($tagSTRING128) DllStructSetData($spszMessageText, 1, $lpszMessageText) DllStructSetData($spszCaptionText, 1, $lpszCaptionText) $sCREDUI_INFO = DllStructCreate($tagCREDUI_INFO) DllStructSetData($sCREDUI_INFO, "cbSize", DllStructGetSize($sCREDUI_INFO)) DllStructSetData($sCREDUI_INFO, "hwndParent", $lHWndParentUI) DllStructSetData($sCREDUI_INFO, "pszMessageText", DllStructGetPtr($spszMessageText)) DllStructSetData($sCREDUI_INFO, "pszCaptionText", DllStructGetPtr($spszCaptionText)) DllStructSetData($sCREDUI_INFO, "hbmBanner", $lhbmBanner) ;configure CredUIPromptForCredentials structures $spszTargetName = DllStructCreate($tagSTRING32767) $spszUserName = DllStructCreate($tagSTRING_CRED_MAX_USERNAME_LENGTH) $spszPassword = DllStructCreate($tagSTRING256) $spfSave = DllStructCreate($tagBOOL) DllStructSetData($spszTargetName,1,$lpszTargetName) DllStructSetData($spszUserName,1,$lpszUserName) DllStructSetData($spszPassword,1,$lpszPassword) DllStructSetData($spfSave,1,$lpfSave) ;configure default prompting options If $ldwFlags = -1 Then   $ldwFlags = BitOR($CREDUI_FLAGS_DO_NOT_PERSIST,$CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS,$CREDUI_FLAGS_REQUEST_ADMINISTRATOR) EndIf ;prompting for credentials $lCredUIPromptForCredentials = DllCall("Credui.dll","DWORD", "CredUIPromptForCredentials","ptr", DllStructGetPtr($sCREDUI_INFO), "ptr", DllStructGetPtr($spszTargetName),"ptr", "", "DWORD", $ldwAuthError, "ptr", DllStructGetPtr($spszUserName),"ULONG", $CRED_MAX_USERNAME_LENGTH, "ptr", DllStructGetPtr($spszPassword), "ULONG", $CREDUI_MAX_PASSWORD_LENGTH, "ptr", DllStructGetPtr($spfSave), "DWORD", $ldwFlags) ;results array If IsArray($lCredUIPromptForCredentials) Then   $retArray[0] = $lCredUIPromptForCredentials[0]   $retArray[1] = DllStructGetData($spszUserName,1)   $retArray[2] = DllStructGetData($spszPassword,1)   $retArray[3] = DllStructGetData($spfSave,1) EndIf ;release structures $spszMessageText = 0 $spszCaptionText = 0 $sCREDUI_INFO = 0 $spszTargetName = 0 $spszUserName = 0 $spszPassword = 0 $spfSave = 0 Return $retArray EndFunc ;script end


#32 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 29 February 2012 - 05:29 PM

Special Note: This is an official beta release but it is not digitally signed. Only Jon has the certificate used for digital signatures and the last time I checked I was not Jon.

3.3.9.1 (29th February, 2012) (Beta)

Spoiler


The following changes are script breaking changes:
Spoiler


Report issues here.
Download here.
  • jaberwocky6669 likes this

#33 caplan77

caplan77

    Seeker

  • New Members
  • 2 posts

Posted 06 March 2012 - 10:22 PM

I verified issue #2111 is fixed with our whacky vendor app & 3.3.9.1 compiled scripts. Thanks again Valik!

And thank you to ALL the AutoIt developers, you rock!!!

#34 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 11 March 2012 - 01:07 AM

Special Note: This is an official beta release but it is not digitally signed. Only Jon has the certificate used for digital signatures and the last time I checked I was not Jon.

3.3.9.2 (10th March, 2012) (Beta)

Spoiler


The following changes are script breaking changes:
Spoiler


Report issues here.
Download here.

#35 JFX

JFX

    Polymath

  • Active Members
  • PipPipPipPip
  • 206 posts

Posted 04 April 2012 - 07:52 PM

DllCallbackRegister changes give a little confusion here http://www.autoitscript.com/forum/topic/119505-guiframe-udf-melba23-version-24-mar-12/page__view__findpost__p__976617

Please clarify what's going wrong.

#36 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 09 April 2012 - 02:24 AM

Special Note: This is an official beta release but it is not digitally signed. Only Jon has the certificate used for digital signatures and the last time I checked I was not Jon.

3.3.9.3 (8th April, 2012) (Beta)

Spoiler


The following changes are script breaking changes:
Spoiler


NOTE: WinAPIEx is included in this release. The files exist but there are no documentation or examples. Filenames and functions are subject to change or removal. Functions will be moved out to other files before the final release and the file WinAPIEx.au3 will likely not exist when that happens.

Report issues here.
Download here.

#37 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,216 posts

Posted 09 April 2012 - 01:43 PM

- Added #1191: Explicit size of arrays optional for explicit initialization.


HOLY C****! HOLY FREAKIN C***** I CANNOT BELIEVE THIS!!!

It's about damn time...
Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.

#38 Mat

Mat

    43 38 48 31 30 4E 34 4F 32

  • MVPs
  • 4,040 posts

Posted 09 April 2012 - 02:27 PM

HOLY C****! HOLY FREAKIN C***** I CANNOT BELIEVE THIS!!!

It's about damn time...

If you got that excited about that, just wait till you see the next line.

I don't know where I'm going, but I'm on my way.


#39 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,216 posts

Posted 09 April 2012 - 02:28 PM

If you got that excited about that, just wait till you see the next line.

I didn't really get it, and I forgot to ask, what does it mean?
Ok, nevermind, I see it now, I just sorta failed to pay attention to it when seeing the one above it, both of these two new features are awesome, I can't believe they took this long to do this.

MsgBox(0,"",StringSplit("Test 1|Test 2|Test3","|",2)[1])


Added: Array access on expression: StringSplit("a,b", ",")[1]

Also, I've been waiting for something like this, I always wanted to make a feature request for it but I didn't think they would approve and always thought it was the way it was for some reason unknown to me.

I downloaded the beta, opened the beta directory, highlighted all the files in it and cut n pasted all the beta files into the release version directory overwriting the current installation, all the other previous version are inferior to me now.

Edited by ApudAngelorum, 09 April 2012 - 02:37 PM.

Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.

#40 Shaggi

Shaggi

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 296 posts

Posted 09 April 2012 - 08:48 PM

If you got that excited about that, just wait till you see the next line.

this.
Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users