Jump to content

GUIListViewSysLink UDF!


MrCreatoR
 Share

Recommended Posts

Hi!

This whole concept belongs to rasim, and the idea of SysLink control inside ListView belongs to ptrex! He proposed it, and i thought that this will be a good challenge/practic for me! :P

Here we go...

#cs
    Name:               GUIListViewSysLink.au3
    Description:        Functions to set Hyperlink (via SysLink control) for ListView items.
    Author:             G.Sandler (a.k.a MrCreatoR), initial concept idea by R.Gilman (a.k.a rasim), this UDF idea by ptrex!
    AutoIt version:     3.2.12.1 - 3.3.8.1
    UDF version:        1.2
#CE

Example:

#include "GUIListViewSysLink.au3"

$hGUI = GUICreate("ListView with SysLink Control!", 420, 530, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX))

$hListView1 = GUICtrlCreateListView("Files|Path|Links", 10, 10, 400, 240, BitOR($LVS_REPORT, $WS_BORDER, $WS_CLIPSIBLINGS))
GUICtrlCreateListViewItem("AutoIT|C:\Program Files\AutoIt3", $hListView1)
GUICtrlCreateListViewItem("Opera|C:\Program Files\Opera", $hListView1)
GUICtrlCreateListViewItem("Script|C:\MyScripts", $hListView1)

$nSysLinkBkColor = 0xC0C0C0
$nSysLinkStockObject = $LTGRAY_BRUSH

$hListView2 = GUICtrlCreateListView("Name|Links", 10, 270, 400, 240, BitOR($LVS_REPORT, $WS_BORDER, $WS_CLIPSIBLINGS))
GUICtrlCreateListViewItem("Some Name", $hListView2)

$hSysLink1  = _GUICtrlListView_SysLinkCreate($hListView1, "AutoIt Script Home Page", "http://autoitscript.com", 0, 2)
_GUICtrlListView_SysLinkSetFont(-1, "Tahoma", 9.5)

$hSysLink2  = _GUICtrlListView_SysLinkCreate($hListView1, "Opera Home Page", "http://opera.com", 1, 2)
_GUICtrlListView_SysLinkSetFont(-1, "Tahoma", 9.5)

$hSysLink3  = _GUICtrlListView_SysLinkCreate($hListView1, "My Scripts Home Page?", "http://creator-lab.ucoz.ru", 2, 2)
_GUICtrlListView_SysLinkSetFont(-1, "Tahoma", 9.5)

$hSysLink1_2  = _GUICtrlListView_SysLinkCreate($hListView2, "Some other Home Page", "http://creator-lab.ucoz.ru", 0, 1)
_GUICtrlListView_SysLinkSetFont(-1, "Arial", 10.5)

GUICtrlSetBkColor($hListView1, $nSysLinkBkColor)
GUICtrlSetBkColor($hListView2, $nSysLinkBkColor)

GUICtrlSendMsg($hListView1, $LVM_SETCOLUMNWIDTH, 0, 80)
GUICtrlSendMsg($hListView1, $LVM_SETCOLUMNWIDTH, 1, 150)
GUICtrlSendMsg($hListView1, $LVM_SETCOLUMNWIDTH, 2, 120)

GUICtrlSendMsg($hListView2, $LVM_SETCOLUMNWIDTH, 0, 230)
GUICtrlSendMsg($hListView2, $LVM_SETCOLUMNWIDTH, 1, 115)

;Here we add ID to the $hSysLink1
_GUICtrlListView_SysLinkSetLinkInfo($hSysLink1, "http://autoitscript.com", "AutoIt")

;And now we check if it was added :)
$aInfo = _GUICtrlListView_SysLinkGetLinkInfo($hSysLink1)
$sInfo = StringFormat("Info For $hSysLink1:\n\nSysLink State\t\t= %i\nURL\t\t\t= %s\nID\t\t\t= %s\nParent ListView Handle\t= %s", _
    $aInfo[1], $aInfo[2], $aInfo[3], $aInfo[4])

ConsoleWrite($sInfo)

GUISetState(@SW_SHOW, $hGUI)

While GUIGetMsg() <> $GUI_EVENT_CLOSE
WEnd

The UDF and this example attached bellow.

P.S

Feedbacks and bug reports are always welcome!

GUIListViewSysLink_1.2.zip

ListView_SysLink_1.1.zip

ListView_SysLink_1.0.zip

Test Version (with Label control):

ListView_Link_TestVersion.zip

History version:

v1.2 [13.01.2013]

* AutoIt 3.3.8.1 compatibility.

* UDF renamed to GUIListViewSysLink.au3.

* Fixed issue when clicking on link does not executed properly.

* Fixed an issue with wrong SysLink control position set after resizing.

If "Display window content when draging" is disabled in Performance options, resizing was wrong.

v1.1 [21.10.2008]

+ Added handler to activate the main window when SysLink control is focused.

This handler also set hot cursor ($OCR_NO) while user trying to drag the SysLink control.

+ Added 2 more functions:

_GUICtrlListView_SysLinkSetLinkInfo() - Sets link information.

_GUICtrlListView_SysLinkGetLinkInfo() - Gets link information.

+ Added WM_CTLCOLORSTATIC registration to set bk color for the SysLink control.

(To change the color just set $nSysLinkBkColor variable to desired color).

* Rewrited parameters for the _GUICtrlListView_SysLinkCreate() function...

* $sTextFormat splitted into different 3 parameters: $sTitle, $sLink and $iLnkID.

* Added $iFillItemText - Allows to fill item text (SysLink text),

so the LV item will have the same text as SysLink control. Default is 1.

* Fixed inactive GUI window after executing url.

v1.0 [10.10.2008]

* First release.

Enjoy! Posted Image

Edited by MrCreatoR

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • Moderators

Good work here... a suggestion I'd make is to get the back ground color of the listview and paint the background color of the CreateWindowEx the same :(... You two seem to feed of each other well :P .

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Link to comment
Share on other sites

  • Moderators

@SmOke_N

I am just kicking the ball, it is MrCreatoR and ProgAndy who is scoring here !! :P

Anyhow this is a very nice addition to the standard listView.

Regards,

ptrex

I was speaking of Rasim :( ... Both have produced some nice Listview alternatives/options. That's who I was referring to by feeding well off of one another (I mistyped in my other post, I put "Feed of" rather than "Feed off").

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Thanks for the feedbacks!

@SmOke_N

a suggestion I'd make is to get the back ground color of the listview and paint the background color of the CreateWindowEx the same

Actualy i tried that, i spent on this issue more time than on building the UDF itself :(

How to set background color for window created with _WinAPI_CreateWindowEx() ?

And what is the best way to get Background color of ListView control?

This one not working:

$hDC = DllCall("User32.dll", "hwnd", "GetDC", "hwnd", $hLV)
$hDC = $hDC[0]

$nColor = DllCall("GDI32.dll", "int", "GetBkColor", "hwnd", $hDC)

It returns FFFFFF (white) always :P

Edited by MrCreatoR

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • Moderators

For setting the bg color, experiment with the WM_CTLCOLOR* messages. I don't know which one, if any, that a syslink control sends though. Here's the msdn -

http://msdn.microsoft.com/en-us/library/bb432504(VS.85).aspx

I don't see a call on 32 bit system for SysLink control ...

Thanks for the feedbacks!

@SmOke_N

Actualy i tried that, i spent on this issue more time than on building the UDF itself :(

How to set background color for window created with _WinAPI_CreateWindowEx() ?

And what is the best way to get Background color of ListView control?

This one not working:

$hDC = DllCall("User32.dll", "hwnd", "GetDC", "hwnd", $hLV)
$hDC = $hDC[0]

$nColor = DllCall("GDI32.dll", "int", "GetBkColor", "hwnd", $hDC)

It returns FFFFFF (white) always :P

This is a similar issue I had here: http://www.autoitscript.com/forum/index.php?showtopic=65802

I reformatted it a bit using wraithdu's and googles suggestion: http://cboard.cprogramming.com/archive/ind...hp/t-91110.html :

Func _GUISetSysLinkBkColor($h_parent, $h_wnd, $i_color = 0xFFFFFF)
    Local Const $GCL__HBRBACKGROUND  = -10
    Local Const $RDW__ERASE          = 0x04
    Local Const $RDW__INVALIDATE        = 0x01
    Local Const $RDW__ALLCHILDREN      = 0x080
    Local Const $RDW__UPDATENOW      = 0x100
    Local Const $WM__CTLCOLORSTATIC  = 0x00138

    Local $i_color_bgr = _
                        BitOR(BitShift(BitAND($i_color, 0x000000FF), 16), _
                        BitAND($i_color, 0x0000FF00), _
                        BitShift(BitAND($i_color, 0x00FF0000),16))
                        
    Local $h_dc = DllCall("User32.dll", "hwnd", "GetDC", "hwnd", $hSysLink1)
    If @error Then Return SetError(1, 0, 0)
    
    Local $h_sm = DllCall("User32.dll", "hwnd", "SendMessage", "hwnd", $h_parent, "uint", $WM__CTLCOLORSTATIC, "wparam", $h_dc[0], "lparam", $h_wnd)
    If @error Then Return SetError(2, 0, 0)
    
    Local $i_scl = DllCall("User32.dll", "int", "SetClassLongA", "hwnd", $h_wnd, "int", $GCL__HBRBACKGROUND, "dword", $h_sm[0])
    If @error Then Return SetError(3, 0, 0)
    
    DllCall("User32.dll", "int", "DeleteObject", "long", $i_scl[0])
    DllCall("User32.dll", "int", "InvalidateRect", "hwnd", $h_wnd, "int", 0, "int", 1)
    DllCall("User32.dll", "int", "RedrawWindow", "hwnd", $h_wnd, "int", 0, "int", 0, "uint", _
                BitOR($RDW__ERASE, $RDW__INVALIDATE, $RDW__ALLCHILDREN, $RDW__UPDATENOW))
    DllCall("User32.dll", "int", "UpdateWindow", "hwnd", $h_wnd)
    DllCall("User32.dll", "int", "ReleaseDC", "hwnd", $h_wnd, "hwnd", $h_dc[0])
    Return 1
EndFunc
But still the same issue :idea: ... I'll be curious to see this be accomplished for more than one reason obviously :) ...

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I spent 2 more hours (or maybe more) on this, this function has suffered a lot from me :P But no luck either :)

In the end(?) i came up with two workarounds:

1) Change the background color of ListView control :( - Not so preferable.

2) Instead of SysLink control use standard labels on top of new GUI (as framework), and handle the clicks with some timer function.

For the first one just add this to the top of _GUICtrlListView_SysLinkCreate function:

Local $nBkColor = _WinAPI_GetSysColor($COLOR_3DFACE)
    GUICtrlSetBkColor($hWnd, $nBkColor)

(before «If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)»).

About the second one, later i will post test-version (to see if it's good enough :idea: ).

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • 2 weeks later...

UDF updated!

History:

; v1.0 [10.10.2008, 02:20]

; First release.

;

; v1.1 [21.10.2008, 00:03]

; - Added handler to activate the main window when SysLink control is focused.

; This handler also set hot cursor ($OCR_NO) while user trying to drag the SysLink control.

;

; - Added 2 more functions:

; _GUICtrlListView_SysLinkSetLinkInfo() - Sets link information.

; _GUICtrlListView_SysLinkGetLinkInfo() - Gets link information.

;

; - Added WM_CTLCOLORSTATIC registration to set bk color for the SysLink control.

; (To change the color just set $nSysLinkBkColor variable to desired color).

;

; - Rewrited parameters for the _GUICtrlListView_SysLinkCreate() function...

; * $sTextFormat splitted into different 3 parameters: $sTitle, $sLink and $iLnkID.

; * Added $iFillItemText - Allows to fill item text (SysLink text),

; so the LV item will have the same text as SysLink control. Default is 1.

;

; - Fixed inactive GUI window after executing url.

I also added mentioned before Test version (with Label control), please see first post.

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • 2 years later...

hummm getting in 3.3.6.1 an error message :unsure:

C:\Program Files\AutoIt3\Include\_ListView_SysLink.au3(59,31) : ERROR: $HDN_FIRST previously declared as a 'Const'

Global Const $HDN_FIRST = -300

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\test3.au3 - 1 error(s), 0 warning(s)

maybe u can do something whit it :>

i don't ;)

as finishing touch god created the dutch

Link to comment
Share on other sites

Delete the line with the error message, it's already been declared in one of the other included files, HeaderConstants.au3 in this case.

EDIT:typo

Edited by BrewManNH

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!

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

Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...

Update (after 4 years! :lmao: ):

v1.2 [13.01.2013]

* AutoIt 3.3.8.1 compatibility.

* UDF renamed to GUIListViewSysLink.au3.

* Fixed issue when clicking on link does not executed properly.

* Fixed an issue with wrong SysLink control position set after resizing.

If "Display window content when draging" is disabled in Performance options, resizing was wrong.

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • 6 months later...

Hello MrCreatoR,

I recently found your solution for the hyperlinks for listviews and found it really helpfull. I almost got my Autoit applicaton running however stumbled over a problem I have difficulties to resolve. It might be quite trivial for you and hopefully you can help. I am using your GUIListViewSysLink code to actually show hyperlinks in a listview which have prior been extracted from a text file. Hence the string containing the address (in my case it will be a file path) will need to be stored assigned to a variabel first and then will need to be handed over to your function. Here is the line of code where the problem starts:

...

_GUICtrlListView_SysLinkCreate($listview, "Update", $link, $i-1, 4)

...

Here the $link variable contains a simple string such as "C:tempupdate.bat". and it really needs to be a variable to allow changing hyperlinks. When executing my code I don't get a hyperlink in the corresponding column but rather something like:
<a href="C:tempupdate.bat""

I might have forgotton some other parameters. Could you help me out here? I hope the info I provided is sufficient.

Would really appreciate your help.

Regards,

hudehade

Link to comment
Share on other sites

  • 2 weeks later...

When executing my code I don't get a hyperlink in the corresponding column but rather something like:

<a href="C:tempupdate.bat""

 

Hi,

I have tested the issue with variable, and it's working fine:

$sLink = 'c:\test.txt'
$hSysLink  = _GUICtrlListView_SysLinkCreate($hListView, "Update", $sLink, 0, 1)

Perhaps something wrong with the index values, can you show me the full code? Or a part with the ListView and UDF called in a loop?

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
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
 Share

×
×
  • Create New...