wakillon

GUICtrlSetTip with Multi Lines for TabItems

9 posts in this topic

I want associate a multi line tip text to each tab items using GUICtrlSetTip.

I have recreated a simple example :

#include <GUIConstantsEx.au3>

GUICreate("My GUI Tab", 250, 150); will create a dialog box that when displayed is centered

GUISetBkColor(0x00E0FFFF)
GUISetFont(9, 300)

$sTipTxt1 = 'Line 1 : Paul' & @CR & _
    'Line 2 : Jo' & @CR & _
    'Line 3 : Al' & @CR & _
    'Line 4 : Steve'

$sTipTxt2 = 'Line 1 : Marc' & @CR & _
    'Line 6 : Mickael' & @CR & _
    'Line 7 : Franck'
Local $idTab = GUICtrlCreateTab(10, 10, 200, 100)

$idTabItem0 = GUICtrlCreateTabItem("tab0")

$idTabItem1 = GUICtrlCreateTabItem("tab----1")

$idTabItem2 = GUICtrlCreateTabItem("tab2")
GUICtrlSetState(-1, $GUI_SHOW); will be display first

GUICtrlCreateTabItem(""); end tabitem definition
GUICtrlCreateLabel("Label With Tip", 20, 130, 250, 20)
GUISetState(@SW_SHOW)

GUICtrlSetTip ( -1, $sTipTxt1, ' ', 1, 1 )
GUICtrlSetTip ( $idTabItem0, $sTipTxt2, ' ', 1, 1 )
GUICtrlSetTip ( $idTabItem1, $sTipTxt1, ' ', 1, 1 )
GUICtrlSetTip ( $idTabItem2, $sTipTxt2, ' ', 1, 1 )

Local $idMsg
; Loop until the user exits.
While 1
    $idMsg = GUIGetMsg()
    If $idMsg = $GUI_EVENT_CLOSE Then ExitLoop
    If $idMsg = $idTab Then
        ; display the clicked tab
        WinSetTitle("My GUI Tab", "", "My GUI Tab" & GUICtrlRead($idTab))
    EndIf
WEnd

Nothing found about that in help file or wiki/Tabs.

I have only seen that GUICtrlSetTip for tabitems sets incorrectly in certain situations

but i also seen it was fixed for the 3.3.10.0 AutoIt version.

So... may be not in case of multi lines

 


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I start from this:

And I make this:

#include <GuiConstantsEx.au3>
#include <GuiTab.au3>
#include <StaticConstants.au3>

; Tab colours
Global $aTabColours[4] = [0xFFC0C0, 0xC0FFC0, 0xC0C0FF, 0xC0C0C0]

; Create GUI
Global $hGUI = GUICreate("Test", 400, 300)
GUISetBkColor(0)

; Create label to cover tab "tab"
Global $ahColourTab[4]
For $i = 0 To 3
    $ahColourTab[$i] = GUICtrlCreateLabel("", 0, 0, 1, 1, BitOR($SS_NOTIFY, $SS_CENTER, $SS_SUNKEN))
Next
;~ Global $hColourTab = GUICtrlCreateLabel("", 0, 0, 1, 1, BitOR($SS_NOTIFY, $SS_CENTER, $SS_SUNKEN))

; Create tab
Global $hTab = GUICtrlCreateTab(5, 5, 390, 290)
Global $hTab_Handle = GUICtrlGetHandle($hTab)

$sTipTxt1 = 'Line 1 : Paul' & @CR & _
        'Line 2 : Jo' & @CR & _
        'Line 3 : Al' & @CR & _
        'Line 4 : Steve'

GUICtrlSetTip($ahColourTab[0], $sTipTxt1, ' ', 1, 1)


; Create tab items and colour them
Local $idTemp = 0
For $i = 0 To 3
    GUICtrlCreateTabItem("Tab item - " & $i)
    _GUICtrlTab_SetBkColor($hGUI, $hTab, $aTabColours[$i])
    GUICtrlCreateLabel('This is TAB #' & $i & ' content.', 100, 50)
    GUICtrlCreateTabItem("")
Next



GUISetState()

; Pre sets of colours
For $i = 3 To 0 Step -1
    _GUICtrlTab_ClickTab($hTab_Handle, $i)
    TabEvent()
Next
_GUICtrlTab_SetCurSel($hTab_Handle, 0)
_GUICtrlTab_SetCurFocus($hTab_Handle, 0)
TabEvent()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $ahColourTab[0]
            _GUICtrlTab_ClickTab($hTab_Handle, 0)
        Case $ahColourTab[1]
            _GUICtrlTab_ClickTab($hTab_Handle, 1)
        Case $ahColourTab[2]
            _GUICtrlTab_ClickTab($hTab_Handle, 2)
        Case $ahColourTab[3]
            _GUICtrlTab_ClickTab($hTab_Handle, 3)
;~         Case $hTab ; not needed because you click in Label not in Tab
;~             TabEvent()
    EndSwitch
WEnd

Func TabEvent()

    ; Set values
    Local $iTab_X = 5, $iTab_Y = 5, $iTab_Margin = 1
    ; Get index of current tab
    Local $iTab_Index = GUICtrlRead($hTab)
    ; Get coordinates of TabItem
    Local $aTab_Coord = _GUICtrlTab_GetItemRect($hTab_Handle, $iTab_Index)
    ; Get text of TabItem
    Local $sTab_Text = _GUICtrlTab_GetItemText($hTab_Handle, $iTab_Index)
    ; Place label
    GUICtrlSetPos($ahColourTab[$iTab_Index], $iTab_X + $aTab_Coord[0] + $iTab_Margin, $iTab_Y + $aTab_Coord[1] + $iTab_Margin, $aTab_Coord[2] - $aTab_Coord[0] - ($iTab_Margin * 2), $aTab_Coord[3] - $aTab_Coord[1] - ($iTab_Margin * 2) + 5)
    ; Set text
    GUICtrlSetData($ahColourTab[$iTab_Index], $sTab_Text)
    ; Set colour
    GUICtrlSetBkColor($ahColourTab[$iTab_Index], $aTabColours[$iTab_Index])
    ; Set focus
    _GUICtrlTab_SetCurFocus($hTab_Handle, $iTab_Index)

EndFunc   ;==>TabEvent

Func _GUICtrlTab_SetBkColor($hWnd, $hSysTab32, $sBkColor)

    ; Get tab position
    Local $aTabPos = ControlGetPos($hWnd, "", $hSysTab32)
    ; Get size of user area
    Local $aTab_Rect = _GUICtrlTab_GetItemRect($hSysTab32, -1)
    ; Create label
    GUICtrlCreateLabel("", $aTabPos[0] + 2, $aTabPos[1] + $aTab_Rect[3] + 4, $aTabPos[2] - 6, $aTabPos[3] - $aTab_Rect[3] - 7)
    ; Colour label
    GUICtrlSetBkColor(-1, $sBkColor)
    ; Disable label
    GUICtrlSetState(-1, $GUI_DISABLE)

EndFunc   ;==>_GUICtrlTab_SetBkColor

 

EDIT: Added here:

https://www.autoitscript.com/wiki/Tabs#Related_links

 

Edited by mLipok

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

:huh: mLipok - I think you may have responded in the wrong topic.


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Well, have tried with beta too unsuccessfully.

Tip show only the first line.

Do i should open a new Ticket or someone has a solution or an alternative ?


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I have only seen that GUICtrlSetTip for tabitems sets incorrectly in certain situations

but i also seen it was fixed for the 3.3.10.0 AutoIt version.

So... may be not in case of multi lines

What do you mean "seen it was fixed for the 3.3.10.0" ?

 

I try with 3.3.10.2 and I see this as not fixed.

 

Edited by mLipok
typo

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

I mean, it was already reported by Lazycat that GUICtrlSetTip for tabitems sets incorrectly in certain situations

Look at this ticket

It's also notified in the changelog history

But when i use a tip with multi lines, only the first line is displayed on the tip.

 


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Well now everything is clearly explained.
Let's wait for the response of others.


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

If you had tried the example, you would have understood ;)

 


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Yes, but previously, I overlooked that you are refering to old fixed bug.


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • antonioj84
      By antonioj84
      #include <GUIConstantsEx.au3> #include "GUIExtender.au3" $hGUI = GUICreate("Move Example", 250, 230) GUICtrlCreateGroup(" Choose Orientation ", 10, 10, 230, 80) $cRadio_Horz = GUICtrlCreateRadio(" Horizontal ", 20, 30, 100, 20) GUICtrlSetState(-1, $GUI_CHECKED) $cRadio_Vert = GUICtrlCreateRadio(" Vertical ", 20, 60, 100, 20) GUICtrlCreateGroup(" Choose Move Style ", 10, 100, 230, 110) $cRadio_0 = GUICtrlCreateRadio(" Fix Left ", 20, 120, 100, 20) $cRadio_1 = GUICtrlCreateRadio(" Fix Centre ", 20, 150, 100, 20) $cRadio_2 = GUICtrlCreateRadio(" Fix Right ", 20, 180, 100, 20) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cRadio_Horz GUICtrlSetData($cRadio_0, " Fix Left ") GUICtrlSetState($cRadio_0, $GUI_UNCHECKED) GUICtrlSetState($cRadio_1, $GUI_UNCHECKED) GUICtrlSetData($cRadio_2, " Fix Right ") GUICtrlSetState($cRadio_2, $GUI_UNCHECKED) Case $cRadio_Vert GUICtrlSetData($cRadio_0, " Fix Top ") GUICtrlSetState($cRadio_0, $GUI_UNCHECKED) GUICtrlSetState($cRadio_1, $GUI_UNCHECKED) GUICtrlSetData($cRadio_2, " Fix Bottom ") GUICtrlSetState($cRadio_2, $GUI_UNCHECKED) Case $cRadio_0 _Create_GUI(0) Case $cRadio_1 _Create_GUI(1) Case $cRadio_2 _Create_GUI(2) EndSwitch WEnd Func _Create_GUI($iMove) Local $sTitle Switch $iMove Case 0 If GUICtrlRead($cRadio_Horz) = 1 Then $sTitle = "Fixed Left" Else $sTitle = "Fixed Top" EndIf Case 1 $sTitle = "Fixed Centre" Case 2 If GUICtrlRead($cRadio_Horz) = 1 Then $sTitle = "Fixed Right" Else $sTitle = "Fixed Bottom" EndIf EndSwitch GUISetState(@SW_HIDE, $hGUI) $hGUI_Ex = GUICreate($sTitle, 500, 500) If GUICtrlRead($cRadio_Horz) = 1 Then _GUIExtender_Init($hGUI_Ex, 1, $iMove) _GUIExtender_Section_Create($hGUI_Ex, 0, 250) _GUIExtender_Section_Activate($hGUI_Ex, 2, "", "", 220, 10, 20, 20) _GUIExtender_Section_Create($hGUI_Ex, 250, 250) GUICtrlCreateLabel("", 250, 0, 250, 500) GUICtrlSetBkColor(-1, 0xFFCCCC) _GUIExtender_Section_Create($hGUI_Ex, -99) Else _GUIExtender_Init($hGUI_Ex, 0, $iMove) _GUIExtender_Section_Create($hGUI_Ex, 250, 0) _GUIExtender_Section_Activate($hGUI_Ex, 2, "", "", 470, 220, 20, 20) _GUIExtender_Section_Create($hGUI_Ex, 250, 250) GUICtrlCreateLabel("", 0, 250, 500, 250) GUICtrlSetBkColor(-1, 0xFFCCCC) _GUIExtender_Section_Create($hGUI_Ex, -99) EndIf _GUIExtender_Section_Action($hGUI_Ex, 2, False) GUISetState() While 1 $aMsg = GUIGetMsg(1) Switch $aMsg[0] Case $GUI_EVENT_CLOSE GUISetState(@SW_SHOW, $hGUI) GUIDelete($hGUI_Ex) _GUIExtender_Clear($hGUI_Ex) ExitLoop EndSwitch _GUIExtender_EventMonitor($aMsg[1], $aMsg[0]) ; Check for click on Action control WEnd EndFunc I am trying to implement 2 side window toggle hide and show with 2 different menu.  can someone give me some direction  thanks

    • Clemens
      By Clemens
      Hi there,
      I have a small hopefully quick fixable issue with reading information from my ListView:
      So in fact I just want to have information about which items are selected, so I'm using
      msgbox(0 , "return", GUICtrlRead($myListView), 1)
      but unfortunately it only returns me either the first item id or if this is not selected the second item id, or if this is not selected the third, etc. or 0 if none is selected.
      Anybody has an idea how to get the full picture of my >>multiple Items selected<< ListView?
      Thanks in advance!
      Clemens
    • ruslanas402
      By ruslanas402
      Hello there, could anyone advanced in WinHTTP tell me what am I missing please?
      #include "WinHttp.au3" #include <Array.au3> $sPic = "C:\Users\Source\Pictures\Capturex1.PNG" $sPic2 = "C:\Users\Source\Pictures\Capturex2.PNG" $hOpen = _WinHttpOpen() $hConnect = _WinHttpConnect($hOpen, "https://m.facebook.com/") $sRead = _WinHttpSimpleFormFill($hConnect, "login.php", "login_form", "name:email", "login@mail.com", "name:pass", "pasword") $aRead = _WinHttpSimpleFormFill($hConnect, "/groups/1111111111111", "index:1", "name:view_photo", True, "[RETURN_ARRAY]") ;<-- 11111... <-- Group ID $aURL = _WinHttpCrackUrl($aRead[2]) $aRead = _WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], Default, "name:file1", $sPic, "[RETURN_ARRAY]") $aURL = _WinHttpCrackUrl($aRead[2]) $aRead = _WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], "index:0", "name:view_photo", True, "[RETURN_ARRAY]") ;<-- Suppose to press on Add More photos isn't? $aURL = _WinHttpCrackUrl($aRead[2]) $aRead = _WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], Default, "name:file1", $sPic2, "[RETURN_ARRAY]") ; <-- also submit second photo? $aURL = _WinHttpCrackUrl($aRead[2]) _WinHttpSimpleFormFill($hConnect, $aURL[6] & $aURL[7], Default, "name:view_post", True) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) I'm trying to post multi photos in group, but no luck. Here is idea I came from:
       
    • wakillon
      By wakillon
      Mp3SearchEngine v2.0.0.6

      May be some of you know Songr .
      This script do the same job, it can find more mp3 files but is not as fast as Songr.
       
       



      Sites used are music search engine Websites designed for LEGAL entertainment purposes only.
      Thanks to Brett Francis, Prog@ndy and Eukalyptus for >Bass Udf, trancex for >WinHttp Udf and the AutoIt Community for his help.

       
      Changes of v1.0.8.5
       
      Three websites replaced cause they are dead or use now js.
      All search engines updated ( not without difficulties for audiodump)
      I use RAGrid.dll for the first listview (more fast and stable, but with some inconvenients to manage the no-edit of cells)
      Input queries are saved ( the twenty latest)
      I use now an mp3 pre-Load management before playing and a double progressbar for visualize pre-load and play, where you can click for directly go play in the loaded part.
      Most includes needed are embedded and all external files are embedded in script with >BinaryToAu3Kompressor .
      Multi downloads available with embedded downloader.exe
       
      Changes of v1.0.8.8
      Search on audiodump and myfreemp3 fixed.
      New buttons.
      Added Gui Menu.
      Titles are no more editable.
      New "About" with >TaskDialog (Thanks Prog@andy)
      Query button permit now to check / uncheck all checkboxes
      And some few fixes and cleaning.
      Really more stable now.
      Changes of v1.0.9.2
      Dilandau is replaced by mp3chief and mp3ili by mp3clan 
      Search on mp3juices, baseofmp3 and soundcloud fixed.
      Soso now provide m4a (aac) instead of mp3 ( m4a can be played by MSE)
      Added possibility to encode automaticaly to mp3, aac or ogg ( at the end of download) using bassenc.dll and command line tools : lame, faac and oggenc.
       
      Changes of v1.0.9.3   mp3skull fixed mp3chief fixed myfreemp3 fixed mp3clan changed to tusmp3  mp3juices changed to emp3world baseofmp3 changed to imp3 and some minor improvements.  
      Version 2.0.0.6
      Most previous websites used are dead or have changed the way to get links, 
      so instead of try to repair the previous version, i have created a complete new version.
      The main tendency is the simplification :
      Only one website : audiodump (Up to 500 results by request)
      Script use now the little pearl created by Ward : curl.au3
      It permit to create tasks (get source and get multi mp3) in asynchronous mode.
      So now, no need to use several executables and no more gui who do not respond in case of connection problems. 
      Script use Bass.dll X86 loaded in memory for play songs.
      Result is light and fast, but don't abuse of audiodump servers who are not beasts of race.
      Warning : For avoid errors with curl.au3, you'll need to comment the line 63 : ;~ #Include <BinaryCall.au3>
      @AutoItX64 not supported and only tested on Win7X64 and Win8.1X64.
      As your browser, use Ctrl+w for remove the current Tab.(if there is no search or download running from it)
      And also Ctrl+q for set/remove Gridlines.
      Events are displayed to the bottom of the Gui.
       
      Version 2.0.1.1
      Added a Paste Button.
      Querry list is now correctly saved.
      Querry Combo is now sorted in alphabetical order
      After a 'No match', the next search will use the previous empty listview.
      Bug when removing tabs is corrected.
      Added string correction for the request that, in the previous version, was not always able to return a correct result.
       
      A big thanks to Ward for his great UDF, and Nina my favorite tester, (who between us is also my third daughter), for his precious advices .
      previous downloads : 1703
       
      As there is no more script downloads count, source and executable are available in the downloads section

      Enjoy ! 
       
    • Rfsvieira
      By Rfsvieira
      Hello, i was working in two tipes of design have difirent problems for the same design
      1st one i was making child gui for all tabs and sub tabs
      -problems:
      to big the code, for the tab1 its go back, but tab 2 doesn t move if for item 3, but i have to declarate 20 child guis in the end if it of course not now
      2nd one i make child guid only for the sub tabs
      problems:
      doesnt go back from tab 1 to tab, and from tab2 to tab1, wen enter in  tab1 doesnt charge the buttons, only if i click in outher tab item and go back the button appear
      CODE 1 - BIG MESSI
      #include <GuiTab.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> $GUI = GUICreate("", 450, 600, 0, 0); BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX)) ;GUICtrlCreateMenu("") ;GUISetBkColor(0x940F1B) GUISetIcon("hunosicon.ico") $Pic1 = GUICtrlCreatePic("img\App\barra.jpg", 0, 0, 450, 120) $Button1 = GUICtrlCreateButton("FIRST TAB ITEM A", 0, 580, 450, 20) $Tab = GUICtrlCreateTab(1,120) GUICtrlCreateTabItem("A") ;GUICtrlSetState(-1, $GUI_SHOW) GUICtrlCreateTabItem("B") GUICtrlCreateTabItem("C") GUICtrlCreateTabItem("D") GUICtrlCreateTabItem("E") GUICtrlCreateTabItem("") GUISetState() ; //////////////////////////////A\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_1 = GUICreate("", 450, 440, 0, 140, BitOR($WS_POPUP, 0), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xE0A652) GUISetState(@SW_SHOW) ; //////////////////////////////B\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_2 = GUICreate("", 450, 440, 0, 140, BitOR($WS_POPUP, 1), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAAAAA) GUISetState(@SW_HIDE) ; //////////////////////////////C\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_3 = GUICreate("", 445, 440, 0, 140, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAEEAA) GUISetState(@SW_HIDE) ; //////////////////////////////D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_4 = GUICreate("", 445, 440, 0, 120, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAEEAA) $Tab1 = GUICtrlCreateTab(0,0,455,440,$tcs_buttons) _GUICtrlTab_SetBkColor($GUI_Child_4, $Tab1, 0xFFCCCC) GUICtrlCreateTabItem("<----") GUICtrlCreateTabItem("11") GUICtrlCreateTabItem("22") GUICtrlCreateTabItem("33") GUICtrlCreateTabItem("44") GUICtrlCreateTabItem("55") GUICtrlCreateTabItem("66") GUICtrlCreateTabItem("") GUISetState(@SW_HIDE) ; //////////////////////////////E\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_5 = GUICreate("", 445, 440, 0, 140, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAEEAA) GUISetState(@SW_HIDE) ; //////////////////////////////11\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_6 = GUICreate("", 445, 440, 0, 120, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAE6AA) $Tab2 = GUICtrlCreateTab(0,0,455,440,$tcs_buttons) _GUICtrlTab_SetBkColor($GUI_Child_6, $Tab2, 0xFFAACC) GUICtrlCreateTabItem("<----") GUICtrlCreateTabItem("H2O") GUICtrlCreateTabItem("CO2") GUICtrlCreateTabItem("H2") GUICtrlCreateTabItem("O2") GUICtrlCreateTabItem("") GUISetState(@SW_HIDE) ; //////////////////////////////22\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_7 = GUICreate("", 445, 440, 0, 140, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAEEAA) GUISetState(@SW_HIDE) While 1 $msg = GUIGetMsg() Switch $msg Case -3 Exit Case $Tab $SelTab = _GUICtrlTab_GetCurSel($Tab) _GUICtrlTab_SetCurSel($Tab1, 2) ;_GUICtrlTab_SetCurSel($Tab2, 1) Switch $SelTab Case 0 ;A GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_4) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_SHOW,$GUI_Child_1) Case 1 ;B GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_1) GUISetState(@SW_SHOW,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_4) Case 2 ;C GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_4) GUISetState(@SW_SHOW,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) Case 3 ;D GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_SHOW,$GUI_Child_4) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) Case 4 ;E GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_SHOW,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_4) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) EndSwitch Case $Tab1 ; NUMBERS Tab $SelTab1 = _GUICtrlTab_GetCurSel($Tab1) _GUICtrlTab_SetCurSel($Tab2, 1) Switch $SelTab1 Case 0 _GUICtrlTab_ClickTab($Tab, 0, "left", False, 1, 100) Case 1 ;11 GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_SHOW,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_4) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) Case 2; 22 GUISetState(@SW_SHOW,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_4) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) EndSwitch Case $Tab2 ; TABLE PER $SelTab2 = _GUICtrlTab_GetCurSel($Tab2) ;_GUICtrlTab_SetCurSel($Tab1, 2) Switch $SelTab2 Case 0 ;MsgBox("0", "tttt", "hehhheh") _GUICtrlTab_ClickTab($Tab, 3, "left", False, 1, 100); IF I CHANGE TO 2 IT MOVE EndSwitch Case $Button1 _GUICtrlTab_ClickTab($Tab, 0, "left", False, 1, 100) EndSwitch WEnd Func _GUICtrlTab_SetBkColor($hWnd, $hSysTab32, $sBkColor) Local $aTabPos = ControlGetPos($hWnd, "", $hSysTab32) Local $aTab_Rect = _GUICtrlTab_GetItemRect($hSysTab32, -1) GUICtrlCreateLabel("", $aTabPos[0]+2, $aTabPos[1]+$aTab_Rect[3]+4, $aTabPos[2]-6, $aTabPos[3]-$aTab_Rect[3]-7) GUICtrlSetBkColor(-1, $sBkColor) GUICtrlSetState(-1, $GUI_DISABLE) EndFunc CODE 2 I THINK IS THE BETHER OPTION IF WORKS
      #include <GuiTab.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> ; //////////////////////////////MENU\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; $GUI = GUICreate("", 450, 600, 0, 0); BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX)) ;GUICtrlCreateMenu("") ;GUISetBkColor(0x940F1B) GUISetIcon("hunosicon.ico") $Pic1 = GUICtrlCreatePic("img\App\barra.jpg", 0, 0, 450, 120) $Button1 = GUICtrlCreateButton("BACK TO GUI", 0, 580, 450, 20); TESTE BUTON $Tab = GUICtrlCreateTab(1,120) GUICtrlCreateTabItem("A") $Button1 = GUICtrlCreateButton("AAAAAAA", 16, 254, 75, 25) ;GUICtrlSetState(-1, $GUI_SHOW) GUICtrlCreateTabItem("B") $Button2 = GUICtrlCreateButton("BBBBBBBB", 16, 254, 75, 25) GUICtrlCreateTabItem("C") GUICtrlCreateTabItem("D") GUICtrlCreateTabItem("E") GUICtrlCreateTabItem("") GUISetState() ; //////////////////////////////MENU1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_1 = GUICreate("", 450, 440, 0, 120, BitOR($WS_POPUP, 0), $WS_EX_MDICHILD, $GUI) ;GUISetBkColor(0xE0A652) $Tab1 = GUICtrlCreateTab(0,0,455,440,$tcs_buttons) ; _GUICtrlTab_SetBkColor($GUI_Child_1, $Tab1, 0xFFCCCC) GUICtrlCreateTabItem("<----") GUICtrlCreateTabItem("11") GUICtrlCreateTabItem("22") $Button3 = GUICtrlCreateButton("222222", 16, 254, 75, 25) GUICtrlCreateTabItem("33") GUICtrlCreateTabItem("44") GUICtrlCreateTabItem("55") GUICtrlCreateTabItem("66") GUICtrlCreateTabItem("") GUISetState(@SW_HIDE) ; //////////////////////////////MENU 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ;<---, CASTELO PRINCIPAL, PA1, PA2, PA3 $GUI_Child_2 = GUICreate("", 445, 440, 0, 120, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) ;GUISetBkColor(0xAAAE6AA) $Tab2 = GUICtrlCreateTab(0,0,455,440,$tcs_buttons) ; _GUICtrlTab_SetBkColor($GUI_Child_2, $Tab2, 0xFFAACC) GUICtrlCreateTabItem("<----") GUICtrlCreateTabItem("H2O") $Button4 = GUICtrlCreateButton("WATER C", 16, 254, 75, 25) GUICtrlCreateTabItem("CO2") GUICtrlCreateTabItem("H2") GUICtrlCreateTabItem("02") GUICtrlCreateTabItem("") GUISetState(@SW_HIDE) While 1 $msg = GUIGetMsg() Switch $msg Case -3 Exit Case $Tab $SelTab = _GUICtrlTab_GetCurSel($Tab) _GUICtrlTab_SetCurSel($Tab1, 2) ;_GUICtrlTab_SetCurSel($Tab2, 1) Switch $SelTab Case 3 GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_SHOW,$GUI_Child_1) EndSwitch Case $Tab1 ; $SelTab1 = _GUICtrlTab_GetCurSel($Tab1) _GUICtrlTab_SetCurSel($Tab2, 1) Switch $SelTab1 Case 0 ;MsgBox("0", "tttt", "hehhheh") _GUICtrlTab_ClickTab($Tab, 0, "left", False, 1, 100); GO BACK TO MENU Case 1 GUISetState(@SW_SHOW,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) EndSwitch Case $Tab2 ; $SelTab2 = _GUICtrlTab_GetCurSel($Tab2) ;_GUICtrlTab_SetCurSel($Tab1, 2) Switch $SelTab2 Case 0 ;MsgBox("0", "tttt", "h55555") _GUICtrlTab_ClickTab($Tab, 0, "left", False, 1, 100); GO BACK TO MENU1 EndSwitch Case $Button1 _GUICtrlTab_ClickTab($Tab, 0, "left", False, 1, 100) EndSwitch WEnd Func _GUICtrlTab_SetBkColor($hWnd, $hSysTab32, $sBkColor) Local $aTabPos = ControlGetPos($hWnd, "", $hSysTab32) Local $aTab_Rect = _GUICtrlTab_GetItemRect($hSysTab32, -1) GUICtrlCreateLabel("", $aTabPos[0]+2, $aTabPos[1]+$aTab_Rect[3]+4, $aTabPos[2]-6, $aTabPos[3]-$aTab_Rect[3]-7) GUICtrlSetBkColor(-1, $sBkColor) GUICtrlSetState(-1, $GUI_DISABLE) EndFunc Any idea?
      I have been Reading a lot of the help file and web, but didnt get
      Thanks