Jump to content

Recommended Posts

Posted

We can't, but Jon can, which is why I say it will be fixed in the next version of AutoIt.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

sorry, just thought I read that the help file is out before the version...just giving you a hard time ;)

  Reveal hidden contents
All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

  Reveal hidden contents

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Posted

No,I said the new help file will surface when the new version of AutoIt is released.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Small stumbling block, and since I don't have a computer at the moment I can't fix it myself.

StringInStr when using negative occurances, the `start` argument is actually the last character you want to search in the string, and the `count` is the number of characters from start working backwards. Example:

; Using normal positive occurences
MsgBox(0, Default, StringInStr("This is a nice test", " ", 2, 1, 1, 11))

; The same as above, but find the last occurence (Doesn't work)
MsgBox(0, Default, StringInStr("This is a nice test", " ", 2, -1, 1, 11))

; The way to make it work
MsgBox(0, Default, StringInStr("This is a nice test", " ", 2, -1, 11, 11))

Not really an AutoIt bug, but since this code was buried deep in lots of other code it took me a while to find out what I had done wrong.

Might also be worth making a not whenever string character indexes are concerned, they are 1 based. StringMid and a few others already mention it, but there are others that don't.

Posted (edited)

$ifTopmost = IniRead($Ini, 'Setting', 'Topmost', True)

It is necessary to point out that the parameter "default" is converted to a string if it is not so.

 

_GUICtrlMonthCal_GetMinReqRectArray

Success: True, Handle is set to 0

Failure: False

Success: Array with the following format:

[0] - Count

[1] - X coordinate of the upper left corner of the rectangle

[2] - Y coordinate of the upper left corner of the rectangle

[3] - X coordinate of the lower right corner of the rectangle

[4] - Y coordinate of the lower right corner of the rectangle

_GUICtrlMonthCal_SetColor

#include <GUIConstantsEx.au3>
#include <GuiMonthCal.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>

$Debug_MC = False ; Check ClassName being passed to MonthCal functions, set to True and use a handle to another control to see it work

Global $iMemo

_Main()

Func _Main()
    Local $hMonthCal

    ; Create GUI
    GUICreate("Month Calendar Set Color", 400, 300)
    $hMonthCal = GUICtrlCreateMonthCal("", 4, 4, -1, -1, $WS_BORDER, 0x00000000)

    ; Create memo control
    $iMemo = GUICtrlCreateEdit("", 4, 188, 392, 108, 0)
    GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New")
    GUISetState()

    ; Get/Set calendar color
    MemoWrite("Background: 0x" & Hex(_GUICtrlMonthCal_GetColor($hMonthCal, $MCSC_MONTHBK), 6))
    ; _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_MONTHBK, $CLR_MONEYGREEN)
    _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_TEXT, 0x8BD4DF)
    _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_TITLEBK, 0xA9D7E4)
    _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_TITLETEXT, 0x005894)
    _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_MONTHBK, 0x3F3F3F)
    _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_TRAILINGTEXT, 0xB2C2A9)
    MemoWrite("Background: 0x" & Hex(_GUICtrlMonthCal_GetColor($hMonthCal, $MCSC_MONTHBK), 6))

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main

; Write message to memo
Func MemoWrite($sMessage)
    GUICtrlSetData($iMemo, $sMessage & @CRLF, 1)
EndFunc   ;==>MemoWrite

style2 (for _GUICtrlMonthCal_GetColor)

_GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_TEXT, 0xB02B00)
    _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_TITLEBK, 0x5EFFFE)
    _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_TITLETEXT, 0x0000FF)
    _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_MONTHBK, 0x87C4FF)
    _GUICtrlMonthCal_SetColor($hMonthCal, $MCSC_TRAILINGTEXT, 0x997777)

Yes?

Edited by AZJIO
Posted

in 

_GUICtrlEdit_Scroll

there is

Local $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE" & $Wow64 & "\AutoIt v3\AutoIt", "InstallDir") & "\include\changelog.txt"

in my system

$sFile = C:\Program Files (x86)\AutoIt3\Include\changelog.txt

 

but that file not exist

include dir is correct

AutoIt 3.8.1

SciTe 4/6/2013

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 as fixed:

  Quote

 

Revision: 6595
Author: guinness
Date: 30 December 2011 22:31:48
Message:
Fixed: Reference to changelog.txt when it should be _ReadMe_.txt and variable naming.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

thanks

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

The fix should have appeared in at least v3.3.9.0. Best to check the current beta file just in case.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

ok

I be remeber that

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

No problem, no harm done.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Regarding the treatment of Strings as Numbers by the comparison operators:

User AZJIO >brought this up last year, but I still think this is an issue. While the documentatoin of Datatypes is clear that Strings are converted to Numbers where a Number is expected, it is not clear that the comparison operators convert a String to a Number if the operands are of mixed type. I think the documentation should make this clear, since it seems to be a recurring confusion.

In other words, when comparing "abc" = 1, it is not documented that this expression "expects" numbers. I don't feel that it would be unreasonable for one to believe that this expression may convert 1 to "1" instead of converting "abc" to 0.

Perhaps the documentation for the comparison operators might state something along the lines of:

Comparison operators (case insensitive if used with strings except for ==. When operands are of mixed types, strings will treated as numbers, except for ==.

Thank you,

mwhidden

Posted
  On 6/17/2013 at 6:02 PM, mwhidden said:

In other words, when comparing "abc" = 1, it is not documented that this expression "expects" numbers. I don't feel that it would be unreasonable for one to believe that this expression may convert 1 to "1" instead of converting "abc" to 0.

It actually would be completely unreasonable and inconsistent.

Think twice. Simple string comparison of numbers doesn't work the way you expect it to work:

"123" is less than "5"

"45" is not equal to "045" and none is the same as "45 "

and so on.

Doing like you advise would make collation (sorting) impossible and provide us with a doubly infinite set of distincts elements of actual identical face value, i.e. "", "0", "00", "000", ... just for unsigned integers.

The comparison operators "expect" nothing, contrary to what you believe. They need to convert mixed-type operands to the only possible type for which comparison makes sense.

  Reveal hidden contents

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Posted (edited)

@mwhidden

Don't you feel a little bit egocentric to think that there is an issue or at least the doc is not clear on something fundamental to AutoIt in spite of thousands users per year? (plus you have been answered in the GHAS forum section).

PS: It's not the place to talk about it therefore I'm not going to answer if you reply (rhetorical question) :)

Edited by FireFox
Posted (edited)

_SoundPos
[, $iMode = 1]
1 = (by default) hh:mm:ss where h = hours, m = minutes and s = seconds

_SoundPlay
[, $iWait = 0]
 
1 = wait until sound has finished
0 = continue script while sound is playing (default)

not the correct order of the parameters

_SoundLength
[, $iMode = 1]
1 = (by default) hh:mm:ss where h = hours, m = minutes and s = seconds

TCPRecv
Forces the function to return binary data if set to 1 (default is 0, and will auto detect between binary/string).

flag
0 - (Default) will auto detect between binary/string
1 - return binary data


GUICtrlSetImage
for a TreeViewItem the icon size : 2 = selected, 4 for non-selected item.

0 = small (16x16)
1 = (by default) normal (32x32)
for TreeViewItem it is a status icon :
2 = icon for the selected item
4 = icon for non-selected item.

FileSetAttrib, FileSetTime
If this is set to 1, then directories are recursed into. Default is 0 (no recursion).

flag recurse
0 - (by default) no recursion
1 - directories are recursed into
 
UDPRecv
Forces the function to return receive from IP/port if set to 2. Results are returned in an Array :
[0] data
[1] from IP
[2] from Port

Many parameters are read by a column easier

1 = (by default) - Use this design as standard. You can even automatically highlight these values with a regular expression

 

Window Titles and Text (Advanced), Controls
X Y W H
- The position and size of a window

ControlGetText("Calc", "", "[CLASS:Button; X:54; Y:43; W:63; H:34]")
WinGetTitle("[CLASS:My Class; X:50; Y:40; W:300; H:250]")

You can add an example because I spent a whole day trying to guess how it works.

Edited by AZJIO
Posted

Maybe we should point out that the correct window style creates the client area of the specified size?

#include <WindowsConstants.au3>
#include <Array.au3>

Local $aStyle[8] = [ _
        BitOR($WS_SYSMENU, $WS_SIZEBOX), _
        $WS_SYSMENU, _
        BitOR($WS_BORDER, $WS_SYSMENU, $WS_SIZEBOX), _
        $WS_SYSMENU + $WS_BORDER, _
        BitOR($WS_BORDER, $WS_POPUP, $WS_SIZEBOX), _
        BitOR($WS_BORDER, $WS_POPUP), _
        $WS_OVERLAPPEDWINDOW, _
        BitOR($WS_CAPTION, $WS_SYSMENU, $WS_POPUP)]

Local $aSize[8][4]

For $i = 0 To 7
    $hGui = GUICreate('My', 200, 200, -1, -1, $aStyle[$i])
    GUISetState()
    $aClientSize = WinGetClientSize($hGui)
    $aPos = WinGetPos($hGui)
    $aSize[$i][0] = $aPos[2]
    $aSize[$i][1] = $aPos[3]
    $aSize[$i][2] = $aClientSize[0]
    $aSize[$i][3] = $aClientSize[1]
    GUIDelete($hGui)
Next
; _ArrayDisplay($aSize, 'Array')
$s = '|'
_ArrayDisplay($aSize, "The window size", -1, 0, $s, $s, 'N' & $s & 'W 1' & $s & 'H 1' & $s & 'w 2' & $s & 'h 2')
Guest
This topic is now closed to further replies.
×
×
  • Create New...