Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/01/2014 in all areas

  1. trancexx

    DllCall?

    There is no such thing as wstr[] in AutoIt, probably you meant wchar[]. If you want to pass string in len of 5 characters and want it to be double-null-termninated then create struct in size of 7 characters and fill it with the string. Last two characters will be null-s, because AutoIt zero-out allocated space anyway.
    2 points
  2. 3: #include <MsgBoxConstants.au3> Local $sMessage[2] = ["This is False", "This is True"] Local $bIsTrue = True MsgBox($MB_SYSTEMMODAL, "", $sMessage[$bIsTrue]) also an option 3: could be considered
    1 point
  3. LarsJ

    Read file to (huge) array

    Geir1983, have you tried something like this: $hFile = FileOpen( "file", 16 ) ; 16 = binary mode $sBinData = FileRead( $hFile ) $iBytes = @extended FileClose( $hFile ) $tInts = DllStructCreate( "int[" & $iBytes/4 & "]" ) $pInts = DllStructGetPtr( $tInts ) $tBytes = DllStructCreate( "byte[" & $iBytes & "]", $pInts ) DllStructSetData( $tBytes, 1, $sBinData ) Now should $tInts contain your integers.
    1 point
  4. No... Local $tStruct = DllStructCreate('int;int') DllStructSetData($tStruct, 0, 100) ; Change to 1. ConsoleWrite(DllStructGetData($tStruct, 0) & @CRLF) ; Change to 1.
    1 point
  5. Danp2

    [Solved] DllStruct issue.

    should be: DllStructSetData($Struct, 1, $aString[$i], $i + 1)
    1 point
  6. Now I understand your point. Sorry.
    1 point
  7. Because I like writing cleaner code and it's just an example. It doesn't take a lot for someone to change it to work in an older (buggier) version of AutoIt! Also it's at my discretion whether or not I want to update my code snippets for the benefit of the community. I was hoping it was a "thanks guinnness!" But wishful thinking as usual.
    1 point
  8. water

    _FileListToArray Not Running

    _FileListToArray sets @error when there is a problem. What's the value of @error when you run your script?
    1 point
  9. Don't confuse the floating-point 15 to 16 max digits with the value range of integral type(s). The problem I can see -and it's a true bug from my view- is when the interpretor sees a 4-byte hex literal having the leftmost bit set: it interprets it as a 32-bit negative value. Local $aTest = [0xFFFFFFFF, 0x80000000, 0x8FFFFFFF, 0x0080000000, 0x00FFFFFFFF, 0x008FFFFFFF] For $i In $aTest ConsoleWrite($i & @LF) Next
    1 point
  10. Seems wraithdu already created a wrapper function around >VerifyVersionInfo.
    1 point
  11. trancexx

    DllCall?

    Autoit will ignore all characters after the null-terminator, so your second null won't get thru. Just use two two characters bigger dllstruct and fill it with the original string. Have in mind that binary code will receive passive buffer and not actual CString, so for anything done on it you have to use copy constructor to create real CString that you can work on.
    1 point
  12. Wouldn't it just as easy to use FileGetVer on the Winver.exe file and compare it to the version you're looking for?
    1 point
  13. Mat

    DllCall?

    I wouldn't rely on it. But you can always just at Chr(0) on the end manually.
    1 point
  14. Starg

    Version Helper functions

    IIRC, IsWindowsXPOrGreater is a wrapper for VerifyVersionInfo.
    1 point
  15. jmosley708

    Guitar Tab Tester

    I am impressed, one that you created this in one day and of the implementation. This would be a great training tool for young guitarist. I came across your script while looking for autoit3 sound creation tools. I want to work on ear training. Your script shows that I can do that, thanks.
    1 point
  16. I have 8.1 x64, with a 64-bit processor and testing with AutoIt x64.
    1 point
  17. I got this >> ## int ## Type: Int32 Size: 4 ## int64 ## Type: Int64 Size: 8 Seems correct to me.
    1 point
  18. The macros can be looked up. What does the code say where those macros are actually defined?
    1 point
  19. For now, added 9 more examples. Thanks again to Eukalyptus for providing more examples! Br, UEZ
    1 point
  20. jchd

    Version Helper functions

    Read the MSDN page again: it insist that these inline helper functions live in the said .h file from the Windows 8.1 SDK. That means the function is not in any dll whatsoever. I wonder how you plan to use a C macro or inline function from AutoIt alone.
    1 point
  21. I am guessing the var $sQuery should be used as the function API. Seems GetVersionEx is deprecated in Windows 8.1+. Also I tried this and it didn't work. Local $vReturn = _IsMinVersionSupported() ConsoleWrite((($vReturn = Null) ? 'The function failed.' : $vReturn) & @CRLF) Func _IsMinVersionSupported() Local $aReturn = DllCall("Ntdll.dll", "bool", "IsWindowsXPOrGreater") If @error Then Return SetError(@error, @extended, Null) Return $aReturn[0] EndFunc ;==>_IsMinVersionSupported
    1 point
  22. I'm glad you like it so much, thanks
    1 point
  23. Hi, The way you suggested is pretty easy to do but not very secure, atleast use a secure connection (SSL) when you use this approach. Anyways this proof of concept should get you started... Important: This method is not secure and SHOULD NOT BE USED AS IS. (The data is transmitted over an unsecure connection and also feeding it an 's' will spoof a successfull login and so on.) AutoIt script [app_login.au3]: PHP script [app_login.php]: MySQL Table (username=test, password=test) : Note: To make this suitable for vBulletin or the likes the password hashing logic in the PHP script must be rewritten to match that of the forum software.
    1 point
  24. borg303, Welcome to the AutoIt forum. You need to deactivate the HotKey as you enter the function and then reactivate it as you leave. Otherwise you keep activating the HotKey itself and enter an endless recursive loop - as you found. Try this: HotKeySet("6", "press") While 1 Sleep(10) ; Very important to save your CPU WEnd Func press() ; Unset the HotKey HotKeySet("6") ; Now you can use the key normally Send ("6" ) Send ("X") ; And now reset the HotKey HotKeySet("6", "press") EndFuncAll clear? M23
    1 point
×
×
  • Create New...