Jump to content

Recommended Posts

Posted (edited)

 

  On 9/13/2013 at 7:43 AM, AZJIO said:

Yes (Case = keyword)!

 

 

 
  On 9/13/2013 at 7:43 AM, AZJIO said:

Free interpretation

 

So why this is in Select...Case...EndSelect 

in parameter description ?

"Case <expression>"

EDIT:

such a description does not have the documentation to: Switch...Case...EndSwitch

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)

Switch...Case...EndSwitch

[Case &lt;value&gt; [To &lt;value&gt;] [,&lt;value&gt; [To &lt;value&gt;] ...]

there may be an expression, not only the value of
 
 
 
For...In...Next
For <$Variable> In <expression>
Variable  |    A variable to which an element is being assigned 
 
 
Dim / Global / Local / Const
Remove Dim mentions
 
Local [Const] $variable [ = initializer ]
Local [Const] $array[subscript_1]...[subscript_n] [ = initializer ]
 
Local $a, $b, $c
Local $a = 2, $b = 10, $c = 20
 
Dim Const $d = 21, $e = Exp(1)
Dim and Const incompatible

Send
Not to duplicate, you can make a link to the same page

Edited by AZJIO
Posted

AZJIO,

Please be aware issues are unlikely to be picked up by me and thus fixed. If you're cool with that then continue posting. Thanks.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

  On 9/13/2013 at 9:36 AM, AZJIO said:

Switch...Case...EndSwitch

[Case &lt;value&gt; [To &lt;value&gt;] [,&lt;value&gt; [To &lt;value&gt;] ...]
there may be an expression, not only the value of

 

 

 

For...In...Next

For <$Variable> In <expression>

Variable  |    A variable to which an element is being assigned 

 

 

Dim / Global / Local / Const

Remove Dim mentions

 

Local [Const] $variable [ = initializer ]

Local [Const] $array[subscript_1]...[subscript_n] [ = initializer ]

 

Local $a, $b, $c

Local $a = 2, $b = 10, $c = 20

 

Dim Const $d = 21, $e = Exp(1)

Dim and Const incompatible

Send

Not to duplicate, you can make a link to the same page

Fixed. But please don't make a habit of reporting issues here without a Trac reference. Thanks.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

@guinness

sorry I forgot to mention about  #2474

EDIT:

but I see you just closed this ticket "Fixed by revision [9036] in version: 3.3.9.22"

EDIT:

so I have to say also about #2464 "Select...Case...EndSelect - syntax - bug ??"

Fixed by revision [9020] in version: 3.3.9.22

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

  On 9/18/2013 at 2:57 PM, mlipok said:

@guinness

 

sorry I forgot to mention about  #2474

I saw that don't worry.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted
  On 9/18/2013 at 2:58 PM, guinness said:

I saw that don't worry.

 

I also thought I should mention this so that everyone participating in this thread, they had knowledge of what was reported.

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

  • 2 weeks later...
Posted (edited)
I checked the description.
I think it is a mistake in the description. It looks as if, in the process of creating documentation for FileSaveDialog () simply moved description of FileOpenDialog (), and not properly edited it.
 
I think the problem is that in this text:
Success: the full path of the file chosen. Results for multiple selections are "Directory | file1 | file2 | ..."
 
should be so formulated:
Success: the full path of the file chosen.
 
 
Especially since, after all, in principle, can not save one file at once in several new locations (checked on several programs such as Notepad, Wordpad).
 
I did a test:
 
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
$hFile = FileSaveDialog ( "title", @ScriptDir, "All (*.*)"  , $FD_MULTISELECT  , "test.txt" )
ConsoleWrite($hFile & @CRLF)

I think the problem is also the fact that a function FileSaveDialog option allows you to use $ FD_MULTISELECT.

This option is not indicated in the description of the parameters for the function FileSaveDialog()

Interestingly, the use of this option is that the Save dialog box lets users select multiple files.

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

_GUICtrlToolbar_SetMetrics
Retrieves the metrics of a toolbar control
Sets

_GUICtrlToolbar_LoadBitmap

_GUICtrlToolbar_LoadBitmap($hToolbar, @ScriptDir & "\images\Red.bmp")
_GUICtrlToolbar_LoadBitmap($hToolbar, @ScriptDir & "\Images\Green.bmp")
_GUICtrlToolbar_LoadBitmap($hToolbar, @ScriptDir & "\Images\Blue.bmp")

File does not exist

_GUICtrlToolbar_GetExtendedStyle, _GUICtrlToolbar_GetToolTips, _GUICtrlToolbar_SetExtendedStyle, _GUICtrlToolbar_SetToolTips
; Loop until user exits
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

Posted

@AZJIO  :  _GUICtrlToolbar_  problem Confirmed

Track: #2492

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

_GUICtrlToolbar_SetHotItem
Does not contain a function in the example

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

_Main()

Func _Main()
    Local $hGUI, $hToolbar
    Local Enum $idNew = 1000, $idOpen, $idSave, $idHelp

    ; Create GUI
    $hGUI = GUICreate(StringTrimRight(@ScriptName, 4), 400, 300)
    $hToolbar = _GUICtrlToolbar_Create($hGUI)

    GUISetState()

    ; Add standard system bitmaps
    _GUICtrlToolbar_AddBitmap($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR)

    ; Add buttons
    _GUICtrlToolbar_AddButton($hToolbar, $idNew, $STD_FILENEW)
    _GUICtrlToolbar_AddButton($hToolbar, $idOpen, $STD_FILEOPEN)
    _GUICtrlToolbar_AddButton($hToolbar, $idSave, $STD_FILESAVE)
    _GUICtrlToolbar_AddButtonSep($hToolbar)
    _GUICtrlToolbar_AddButton($hToolbar, $idHelp, $STD_HELP)

    ; Sets the hot item
    _GUICtrlToolbar_SetHotItem($hToolbar, 2)

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

EndFunc   ;==>_Main

_GUICtrlToolbar_GetMetrics, _GUICtrlToolbar_SetMetrics

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

Global $iMemo

Example()

Func Example()
    Local $hGUI, $hToolbar, $aMetrics
    Local Enum $idNew = 1000, $idOpen, $idSave, $idHelp

    ; Create GUI
    $hGUI = GUICreate("Toolbar", 400, 300)
    $hToolbar = _GUICtrlToolbar_Create($hGUI)
    $iMemo = GUICtrlCreateEdit("", 2, 76, 396, 222, $WS_VSCROLL)
    GUICtrlSetFont($iMemo, 10, 400, 0, "Courier New")
    GUISetState()

    ; Set control metrics
    _GUICtrlToolbar_SetMetrics($hToolbar, 40, 40, 30, 4)

    ; Add standard system bitmaps
    _GUICtrlToolbar_AddBitmap($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR)

    ; Add buttons
    _GUICtrlToolbar_AddButton($hToolbar, $idNew, $STD_FILENEW)
    _GUICtrlToolbar_AddButton($hToolbar, $idOpen, $STD_FILEOPEN)
    _GUICtrlToolbar_AddButton($hToolbar, $idSave, $STD_FILESAVE)
    _GUICtrlToolbar_AddButtonSep($hToolbar)
    _GUICtrlToolbar_AddButton($hToolbar, $idHelp, $STD_HELP)

    ; GUISetState(@SW_LOCK)
    ; Set control metrics
    ; _GUICtrlToolbar_SetMetrics($hToolbar, 1, 2, 3, 4)
    ; GUISetState(@SW_UNLOCK)

    ; Show control metrics
    $aMetrics = _GUICtrlToolbar_GetMetrics($hToolbar)
    MemoWrite("Button padding width ...: " & $aMetrics[0])
    MemoWrite("Button padding height ..: " & $aMetrics[1])
    MemoWrite("Button spacing width ...: " & $aMetrics[2])
    MemoWrite("Button spacing height ..: " & $aMetrics[3])

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

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

._GUICtrlToolbar_SetPadding

#include <GuiToolbar.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3> ; for 3.3.8.1

Global $iMemo

Example()

Func Example()
    Local $hGUI, $hToolbar, $aPad
    Local Enum $idNew = 1000, $idOpen, $idSave, $idHelp

    ; Create GUI
    $hGUI = GUICreate("Toolbar", 400, 300)
    $hToolbar = _GUICtrlToolbar_Create($hGUI)
    $iMemo = GUICtrlCreateEdit("", 2, 76, 396, 222, $WS_VSCROLL)
    GUICtrlSetFont($iMemo, 10, 400, 0, "Courier New")
    GUISetState()

    ; Set control padding
    _GUICtrlToolbar_SetPadding($hToolbar, 40, 40)

    ; Add standard system bitmaps
    _GUICtrlToolbar_AddBitmap($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR)

    ; Add buttons
    _GUICtrlToolbar_AddButton($hToolbar, $idNew, $STD_FILENEW)
    _GUICtrlToolbar_AddButton($hToolbar, $idOpen, $STD_FILEOPEN)
    _GUICtrlToolbar_AddButton($hToolbar, $idSave, $STD_FILESAVE)
    _GUICtrlToolbar_AddButtonSep($hToolbar)
    _GUICtrlToolbar_AddButton($hToolbar, $idHelp, $STD_HELP)

    ; Show control padding
    $aPad = _GUICtrlToolbar_GetPadding($hToolbar)
    MemoWrite("Horizontal padding : " & $aPad[0])
    MemoWrite("Vertical padding ..: " & $aPad[1])
    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>Example

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

.

Posted

@AZJIO 

whats wrong with

_GUICtrlToolbar_SetPadding ?

and

_GUICtrlToolbar_GetMetrics, _GUICtrlToolbar_SetMetrics ?

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

I confirm, and I did a deeper analysis.

See track Ticket:

#2493

#2494

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)

suggested addition to "Func...Return...EndFunc"

considering adding something along the lines of...

Event functions do not initialize the parameter variables when called through an Event.

source:

edit: ok, maybe that was a bit cryptic...

i was calling a function with an optional variable (Func _ToggleState($iParam = 0)) from an event function (TrayItemSetOnEvent(-1, "_ToggleState")) and wondering why i was getting "undeclared variable" when i found that post by Jos

Edited by iCode

FUNCTIONS: WinDock (dock window to screen edge) | EditCtrl_ToggleLineWrap (line/word wrap for AU3 edit control) | SendEX (yet another alternative to Send( ) ) | Spell Checker (Hunspell wrapper) | SentenceCase (capitalize first letter of sentences)

CODE SNIPPITS: Dynamic tab width (set tab control width according to window width)

Posted (edited)

_GUICtrlListView_FindInText

$fReverse [optional] If True, the search will start at $iStart - 1 to Zero. If $fWrapOK = True search will continue

It is correct? In two cases, the "True"

 

_GUIToolTip_AddTool
$iID [optional] Identifier or window handle of the tool
_GUIToolTip_TrackActivate
$iID [optional] Application-defined identifier of the tool
The parameters are the same, and their description of different

 

_GUIToolTip_GetToolInfo_GUIToolTip_HitTest

[1] - Flags that control the ToolTip display:

Counting the array must begin from zero (_GUIToolTip_ToolToArray)

Edited by AZJIO
Posted

  On 10/8/2013 at 9:11 AM, AZJIO said:

_GUICtrlListView_FindInText

$fReverse [optional] If True, the search will start at $iStart - 1 to Zero. If $fWrapOK = True search will continue

It is correct? In two cases, the "True"

Both those settings are correct, the first one will tell it to search in reverse from the $iStart position - 1, the second one tells it that if searching hits the first item in the listview, to start at the last one and keep searching. Although it could probably be written more clearly.

 

  Quote

_GUIToolTip_AddTool

$iID [optional] Identifier or window handle of the tool

_GUIToolTip_TrackActivate

$iID [optional] Application-defined identifier of the tool

The parameters are the same, and their description of different

_GUIToolTip_GetToolInfo_GUIToolTip_HitTest

[1] - Flags that control the ToolTip display:

Counting the array must begin from zero (_GUIToolTip_ToolToArray)

There's a lot of rewriting being needed in the _GUIToolTip_* help file documentation. I am redoing the entire _GUIToolTip help file and UDF to make it easier to work with them. Also I'm including examples for many of the functions in there. Work-in-progress at the moment though.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted (edited)
Can you tell which of the other parts of the documents Help File are in the process re-design ?
 
From what I remember it certainly RegExp.
 
I think that this information may be useful such a member like me, that are actively involved in the work on the documentation.
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

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
×
×
  • Create New...