Quantcast
Channel: AutoIt v3 - Developer Chat
Viewing all 750 articles
Browse latest View live

AutoIt v3.3.13.11 Beta

$
0
0

File Name: AutoIt v3.3.13.11 Beta

File Submitter: Jon

File Submitted: 27 Jul 2014

File Category: Beta


3.3.13.11 (27th July, 2014) (Beta)
AutoIt:
- Added #2346: FileSetEnd().

- Fixed #2372: Incorrect line number given on a bad function call. (Still issues with Callback line errors).
- Fixed #2805: FileWriteLine() was not returning a failure when disk was full.
- Fixed #2623: RegDelete() returning 0 rather than 2 when a key exists but no write permissions to delete it.
- Fixed #2813: Accessing "last created control" once GUI deleted caused a hard crash.
- Fixed #2640: Odd conversion of strings containing numbers in expressions.

AutoItX:
- Fixed #2694: ControlListView not finding controls in x64 mode.


Click here to download this file


AutoIt v3.3.13.12 Beta

$
0
0

File Name: AutoIt v3.3.13.12 Beta

File Submitter: Jon

File Submitted: 28 Jul 2014

File Category: Beta


3.3.13.12 (28th July, 2014) (Beta)
AutoIt:
- Fixed: Memory leak with rewritten array code.
- Fixed: Dim performance regression.


Click here to download this file

_ArraySearch Finds "BigString" inside a '0'

$
0
0

Whilst hacking out some code my app crashed, gee that never happens... 

 

Tracked it down to this odd return value.  As written it outputs "Found String at index: 0"

The commented out arrays function normally, and return Error 6. Not Found.

So it seems odd that Element 0 gets a hit if it is = 0.

 

Autoit v3.3.12.0

#include <Array.au3> Local $Result = -1 Local $A[7] = [0,1,2,3,4,5,6]           ; Fail ;Local $A[7] = [1,2,3,4,5,6,7]          ; Ok ;Local $A[7] = ["1","2","3","4","5","6","7"]    ; Ok ;Local $A[7] = ["0","2","3","4","5","6","7"]    ; Ok $Result = _ArraySearch($A,"BigString") if $Result = -1 Then     ConsoleWrite("Error: " & @Error & @CRLF) Else     ConsoleWrite("FoundString at index: " & $Result & @CRLF) EndIf ConsoleWrite(@AutoItVersion & @CRLF)

_ArrayAdd Bug

$
0
0

I found that if i add a long string that contains both delimiters "|" and @CRLF....the function will fail if the last element is blank, and the previous element ends with the row delimiter on line 109:

$aSplit_2 = StringSplit($aSplit_1[$i], $sDelim_Item, $STR_NOCOUNT + $STR_ENTIRESPLIT)

I can resolve the problem by telling my for loop not to add an extra @CRLF to the end of the string on the last pass.
another method would be to insert:

If UBound($aSplit_2,1)=0 Then ContinueLoop

just after line 109 in Array.au3

Convert .a3x file

AutoIt v3.3.13.13 Beta

$
0
0

File Name: AutoIt v3.3.13.13 Beta

File Submitter: Jon

File Submitted: 31 Jul 2014

File Category: Beta


3.3.13.13 (31st July, 2014) (Beta)
AutoIt:
- Changed: PCRE regular expression engine updated to 8.35.

- Added: FileSetEnd() example.

- Fixed #2363: Call() with invalid user function was not setting @error correctly when used as an expression within another function call.
- Fixed #2364: Call() with CallArgArray and no parameters.
- Fixed #2789: With EndWith parameter issue.

AutoItX:
- Changed: AutoItX3.psd1 renamed to AutoItX.psd. PSModulePath updated on install so that the system will auto-import.

Others:
- Fixed: Using a static filepath instead of a temporary file.


Click here to download this file

autoit maps (hashtables) & OOP

$
0
0

I have been away from Autoit for a while (Learning Digital Mars D) and I just had a poke around and noticed Autoit has associative arrays or hash tables as they are also known (like lua tables or D's associative array) and I noticed you cannot get dot access for calling functions but you can still use funcname name. I presume that it must be a bug. I also noticed that Manadar said that at 100k keys plus that there is a speed drop off. I think that would be because Autoit would have to check for duplications before assigning toe next key. Finally I am very happy with the implementation of Maps because it means a proper OOP future for Autoit is now in sight

local $class[] Func somefunc($str)     MsgBox(0,'',$str) EndFunc $class.afunc = somefunc somefunc(FuncName($class.afunc)) $class.afunc("s")

New SciTE4AutoIt3 available with updated SciTE v3.4.4

$
0
0

8/1/2014: Uploaded a new SciTE4AutoIt3.exe installer with an updated SciTE v3.4.4 release.

These are the major changes:
Changed the Fileversion numbers for the installer and programs I support to make the te same.
Format is: YY.(M)MDD.(H)HMM.0 for the installer release version. Betas will be increments of the 4th number.  Fixes for reported bugs in Au3Stripper.

Enjoy,
Jos

Addition/Changes/Fixes in the current installer:

Plain Text         
-------------------------------------------------------------------------------------------------- 8/1/2014 General: Changed the Fileversion numbers for the installer and programs I support to make the te same. Format is: YY.(M)MDD.(H)HMM.0 for the installer release version. Betas will be increments of the 4th number. *** Merged the SciTE v 3.4.4 by Neil Hodgson with our own version of SciTE. (Jos)     - Added Options:         #~ highlight.current.word.stopatspace=0        // 1 is the default behaviour.     - Added Ctrl+E shortcut which will open Explorer in the ScriptDir and select the filename being edited.     - Added Shift+F7 to just compile the script for testing without running any other utility. Similar to #AutoIt3Wrapper_Testing=y     - Added logic to better determine the current CallTip parameter being edited by testing for the delimiter style define with:         calltip.au3.delimiter.style=8 *** Updated SciTE4AutoIt3 installer v14.801.2025.0 (Jos)     - Changed code to update the SCITE_USERHOME enviroment variable.     - Added Restore option for SciTE-Lite when uninstalling this Full version. *** Updated SciTE4AutoIt3 helpfile (Jos)     - Added Directive sections to the index.     - Updated AutoIt3Help.exe to automatically open this helpfile when the keyword contains #autoit3wrapper_ , #au3stripper or #tidy_. *** Updated Au3Stripper v14.801.2025.0 (Jos)     - Fixed lexing typo with /RenameMinimum commandline parameter.     - Fixed to be able to handle more levels of Include files and avoid a stackspace crash .     - Added #Au3Stripper_Parameters Parameter:         - /rsln -> Replace @ScriptLineNumber with the actual line number for source debug purposes with compiled scripts. (Idea of mLipok) *** Updated AutoIt3Wrapper v14.801.2025.0 (Jos)     - Changed the re-start shortcut to Ctrl+Alt+Break.     - Added /test parameter to allow shortcut to compile script in test without running anything else than AUT2XE.     - Added UPX support for x64 scripts since it is now supported.     - Added ShowProgress INI option and #AutoIt3Wrapper_ShowProgress directive to allow disable of Progress Window.     - Added directives to allow forcing the #RequireAdmin for Run_Before or Run_After statements:         #AutoIt3Wrapper_Run_Before_Admin=               ;(Y/N) Run subsequent Run_Before statements with #RequireAdmin. Default=N         #AutoIt3Wrapper_Run_After_Admin=                ;(Y/N) Run subsequent Run_After statements with #RequireAdmin. Default=N     - Added directives to allow Fileversion increase before compilation:         #AutoIt3Wrapper_Res_Fileversion_First_Increment ;(Y/N) AutoIncrement Y=Before or N=After compile. Default=N *** Updated SciTEConfig v14.801.2025.0 (Jos)     - Fixed several small bugs. (Jos) *** Updated Tidy v14.801.2025.0 (Jos)     - Fixed regression when the FUNC keyword is on a #region line *** Updated CodeWizard v1.5.3.1 (Jos)     - Fixed to make use of the new SCITE_USERHOME env variable and several other syntax updates. --------------------------------------------------------------------------------------------------

==> ScitillaHistory page containing all SciTE/Scintilla updates.
==> Visit the SciTE4AutoIt3 Download page for the latest versions
==> <B>Check the newly formatted</B> the online documentation for an overview of all extra's you get with this installer.
 

 


AutoIt v3.3.13.14 Beta

$
0
0

File Name: AutoIt v3.3.13.14 Beta

File Submitter: Jon

File Submitted: 02 Aug 2014

File Category: Beta


3.3.13.14 (2nd August, 2014) (Beta)
AutoIt:
- Changed: Maps re-implemented internally as hash tables. Massive performance improvements for large maps.

- Fixed #2820: WinExists() and other Win functions were incorrectly converting strings containing numbers into window handles and causing false matches.

UDFs:
- Changed: _GDIPlus_Startup() need explicit Dll for GDI+ v1.1 support under Vista or Server 2008.

- Fixed: _ArrayAdd() failing with a trailing delimiter in $vValue.
- Fixed #2816: Doc precision with _GDIPlus_ImageLoadFromFile() specifying -1 when it's 0 on failure.
- Fixed: _Crypt_DecryptData() and _Crypt_EncryptData() failing with a blank string when using the RC4 algorithm.
- Fixed #2821: Example comment was incorrect for _DateToDayOfWeekISO().

Others:
- Added: Additional example for FileSetEnd().


Click here to download this file

Help Me To Convert trancexx's Autoit Script RunBinary.au3 To C++ Program

$
0
0

Hi Everyone I started to convert trancexx script "RunBinary" into c++ i have done lot of work on this but now my exams are starting and can't spend anymore time for this so please anyone who can help me please convert this remaining script and also check for error in current code c++.

i spend  three days to make this c++ code i did that fast and didn't write any comments or documentation

I Attached both files

RunBinary.au3 by trancexx

Main.cpp And RunFromMem.h Created By Me In Visual Studio 2012 C++

 

Note: I'm creating this for 32bit Programs which can run on 64bit

 

 

Attached File  RunBinary.au3   26KB   8 downloads

Attached File  MAIN.cpp   263bytes   7 downloads

Attached File  RunFromMem.h   12.04KB   10 downloads

Defect or by design dictionary object assignment in AutoIT

$
0
0
Hi,
 
Any suggestions/directions on thoughts on below. Defect or by design?
 
I am working on my UIAWrappers as is in example section but ran into this issue
 
$obj2 is just another object
AutoIt         
#include "UIAWrappers.au3"   ;~ Reproducer script, not for functional purposes just to reproduce issue $dic=ObjCreate("Scripting.Dictionary") ;~ $obj2=ObjCreate("Scripting.Dictionary") $obj2=ObjCreate("word.application") $obj2.visible=true   $dic.add("o1",$obj2) $retrievedObj=$dic("o1") if isobj($retrievedObj) Then consolewrite("Yes, first time its an object" & @CRLF) Else consolewrite("No, first time its NOT an object" & @CRLF) EndIf   $dic("o1")=$obj2 $retrievedObj=$dic("o1") if isobj($retrievedObj) Then consolewrite("Yes, 2nd time its an object" & @CRLF) Else consolewrite("No, 2nd time its NOT an object" & @CRLF) EndIf   $dic.add("o2",$UIA_oDesktop) $retrievedObj=$dic("o2") if isobj($retrievedObj) Then consolewrite("Yes, 3rd time its an object" & @CRLF) Else consolewrite("No, 3rd time its NOT an object" & @CRLF) EndIf   $dic("o2")=$UIA_oDesktop $retrievedObj=$dic("o2") if isobj($retrievedObj) Then consolewrite("Yes, 4th time its an object" & @CRLF) Else consolewrite("No, 4th time its NOT an object" & @CRLF) EndIf Exit
When I run above I get this as output where I do not understand when using = as assignment suddenly its not an object anymore
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\Elwin\Documents\UIA\testme.au3" /UserParams     +>23:24:00 Starting AutoIt3Wrapper v.2.1.0.33    Environment(Language:0413  Keyboard:00020409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64) >Running AU3Check (3.3.12.0)  from:C:\Program Files (x86)\AutoIt3 +>23:24:00 AU3Check ended.rc:0 >Running:(3.3.12.0):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\Elwin\Documents\UIA\testme.au3"     --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop Yes, first time its an object No, 2nd time its NOT an object Yes, 3rd time its an object No, 4th time its NOT an object +>23:24:01 AutoIT3.exe ended.rc:0 >Exit code: 0    Time: 2.018
  • Only difference is that $UIA_Desktop is created with function ObjCreateInterface
  • I have now worked around this in _UIA_setVar by removing first from dictionary and then re adding
  • I think in the past in AutoIT (I think in version before december 2013) all 4 above would give Yes. 
  • Below is to reproduce only with Word.Application (weird thing when I use scripting.dictionary as obj2 it works correctly)
;~ Reproducer script, not for functional purposes just to reproduce issue $dic=ObjCreate("Scripting.Dictionary") ;~ $obj2=ObjCreate("Scripting.Dictionary") $obj2=ObjCreate("word.application") $obj2.visible=true $dic.add("o1",$obj2) $retrievedObj=$dic("o1") if isobj($retrievedObj) Then     consolewrite("Yes, first time its an object" & @CRLF) Else     consolewrite("No, first time its NOT an object" & @CRLF) EndIf $dic("o1")=$obj2 $retrievedObj=$dic("o1") if isobj($retrievedObj) Then     consolewrite("Yes, 2nd time its an object" & @CRLF) Else     consolewrite("No, 2nd time its NOT an object" & @CRLF) EndIf

Using WinSetTrans function to fade in and out

$
0
0

Initially, I wanted to change the desktop background to fade in, make the change, and then fade out.

The test program works fine except the desktop context menu can no longer be accessed with a

right click.  The AutoIt Window Info program displays no Title or Class name.

 

If I run just the fade in portion of the code, and then refresh the screen, the background reappears as

expected.  It's the second portion(fade out) that seems to cause the the above issue.

 

I would like to resolve this problem before moving on.

 

I am using Windows XP and the latest AutoIt version.

Attached Files

WORD GAME using C language (v4.9.9.2)

$
0
0
Hi guys. Im new at any programming language. Im using C language v4.9.9.2. I want to make program that is a word game. It is similar to the game WHO WANTA TO BE A MLLIONAIRE. i want to input questions and the system will display it randomly. What's the right code for that? This is for my project. Thanks guys. More power to you all.

AutoIt v3.3.13.15 Beta

$
0
0

File Name: AutoIt v3.3.13.15 Beta

File Submitter: Jon

File Submitted: 05 Aug 2014

File Category: Beta


3.3.13.15 (5th August, 2014) (Beta)
AutoIt:
- Fixed #2502: Copy-on-write optimization when passing array and map elements ByRef was incorrect.

UDFs:
- Fixed #2823: _ChooseFont() default color BGR not RGB.
- Fixed: Limit bug in _ArrayToClip(), _ArrayExtract() and _ArrayToString().


Click here to download this file

Alternate Of Autoit Code in C++

$
0
0
Please tell me the alternative of these three commands in c++
 
; Allocate enough space (in our space) for the new module
Local $tModule = DllStructCreate("byte[" & $iOptionalHeaderSizeOfImageNEW & "]")
 
; Get pointer
Local $pModule = DllStructGetPtr($tModule)
 
; Headers
Local $tHeaders = DllStructCreate("byte[" & $iOptionalHeaderSizeOfHeadersNEW & "]", $pHEADERS_NEW)

AutoIt v3.3.13.16 Beta

$
0
0

File Name: AutoIt v3.3.13.16 Beta

File Submitter: Jon

File Submitted: 07 Aug 2014

File Category: Beta


3.3.13.16 (7th August, 2014) (Beta)
AutoIt:
- Added: Regular expression caching. Small performance improvements when using the same pattern multiple times.

- Fixed: Assigning objects by reference to COM properties like "$obj(some, params) = $obj2".
- Fixed: Regression with Redim.

UDFs:
- Added #2826: Quit to close the browser.

- Fixed #2828: Typo of security in _IEFormElementSetValue().

Others:
- Fixed: Re-writing the scripts which generate the syntax files for the editors and GeSHi, resulted in missing descriptions being added and correct sorting of functions.


Click here to download this file

MS SQL: what is the difference ODBC provider and driver , or OLEDB

$
0
0

Manual search of scite output console

$
0
0

Is there a way to do this.

 

After a program is ran, I copy the contents, past into notepad and search it.

 

If there were a way to also search output as well or instead of the edit field it would be useful.

How to obtain the owner of a Hotkey?

$
0
0

After searching the forum and MSDN, I believe that is it not possible to obtain the owner of a hotkey.

To enhance my _Hotkey() function (see here), I would like to show the owner of a hotkey, if Hotkeyset() fails.

I believe to the power of the developers to make the impossible possible. 

I prepared a skeleton script to start with.

Just the last function _HotkeyOwner() needs some tweaks.

AutoIt         
;~ Hotkey checker #include <WinAPI.au3> _HotKey("{ESC}") _HotKey("{F12}") Func _HotKey($hotkey = "")     Switch @HotKeyPressed         Case "{ESC}"             Exit MsgBox(64 + 262144, Default, "Exit", 1)         Case "{F12}"             Beep()         Case Else             If Not IsDeclared("hotkey") Then Return MsgBox(16 + 262144, Default, "No CASE statement defined for hotkey " & @HotKeyPressed)             If HotKeySet($hotkey, "_Hotkey") = 0 Then Return MsgBox(16 + 262144, Default, "Hotkey " & $hotkey & " invalid or set by another application." & @LF & "Error: " & @error & " Extented: " & @extended & @LF & "Lasterror: " & _WinAPI_GetLastErrorMessage() & @LF & _HotkeyOwner($hotkey))     EndSwitch EndFunc   ;==>_HotKey While Sleep(100) ; here should be your application. WEnd ; meanwhile, here is a dummy loop. Func _HotkeyOwner($hotkey)     Return "No Hotkeyowner detected for hotkey " & $hotkey EndFunc   ;==>_HotkeyOwner

Please confirm, that there is no solution   :  or better, ... show me the impossible. :thumbsup:

Thanks Exit

Bug or feature? DllClose sets last Windows error to zero

$
0
0

DllClose makes the function _WinAPI_GetLastError() return zero. OK that would not be a problem and I understand why this is as it is. But if I make a DllCall without DLL handle but with DLL name, then DllOpen and DllCose is automatically called. And then _WinAPI_GetLastError() always returns zero. I now use 3.3.8.1 and can not test on newer version, but I think it's the same result.

 

 

Here is an example:

AutoIt         
#include <WinAPI.au3> Global Const $tagDATA_BLOB = "DWORD cbData;ptr pbData;" ; DllClose sets last Windows error to zero _BugTest() _WorkingTest() Func _BugTest()     Local $bData = Binary("0x1234567890")     Local $tDataBuf = DllStructCreate($tagDATA_BLOB)     Local $tDataIn = __DataToBlob($bData)     Local $aRet = DllCall("crypt32.dll", "BOOL", "CryptUnprotectData", "struct*", $tDataIn, "ptr*", 0, "ptr", 0, "ptr", 0, "ptr", 0, "DWORD", 0, "struct*", $tDataBuf)     If $aRet[0] = 0 Then ;of cource this fails         MsgBox(16, "BugTest", "Last Windows error: " & _WinAPI_GetLastError())     Else         _WinAPI_LocalFree(DllStructGetData($tDataBuf, "pbData"))     EndIf     _WinAPI_LocalFree(DllStructGetData($tDataIn, "pbData")) EndFunc Func _WorkingTest()     Local $bData = Binary("0x1234567890")     Local $tDataBuf = DllStructCreate($tagDATA_BLOB)     Local $tDataIn = __DataToBlob($bData)     Local $hDLL_Crypt32 = DllOpen("crypt32.dll")     Local $aRet = DllCall($hDLL_Crypt32, "BOOL", "CryptUnprotectData", "struct*", $tDataIn, "ptr*", 0, "ptr", 0, "ptr", 0, "ptr", 0, "DWORD", 0, "struct*", $tDataBuf) ;~  DllClose($hDLL_Crypt32)     If $aRet[0] = 0 Then ;of cource this fails         MsgBox(16, "WorkingTest", "Last Windows error: " & _WinAPI_GetLastError())     Else         _WinAPI_LocalFree(DllStructGetData($tDataBuf, "pbData"))     EndIf     DllClose($hDLL_Crypt32)     _WinAPI_LocalFree(DllStructGetData($tDataIn, "pbData")) EndFunc Func __DataToBlob($data)     ;funkey 2014.08.11th     Local $iLen, $tDataIn, $tData, $aMem     Local Const $LMEM_ZEROINIT = 0x40     Select         Case IsString($data)             $iLen = StringLen($data)         Case IsBinary($data)             $iLen = BinaryLen($data)         Case Else             Return SetError(1, 0, 0)     EndSelect     $tDataIn = DllStructCreate($tagDATA_BLOB)     $aMem = DllCall("Kernel32.dll", "handle", "LocalAlloc", "UINT", $LMEM_ZEROINIT, "UINT", $iLen)     $tData = DllStructCreate("byte[" & $iLen & "]", $aMem[0])     DllStructSetData($tData, 1, $data)     DllStructSetData($tDataIn, "cbData", $iLen)     DllStructSetData($tDataIn, "pbData", DllStructGetPtr($tData))     Return $tDataIn EndFunc   ;==>__DataToBlob

What do you think about it?

Viewing all 750 articles
Browse latest View live