Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

GUIListViewSysLink UDF!

GUI ListView SysLink UDF

  • Please log in to reply
17 replies to this topic

#1 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,251 posts

Posted 10 October 2008 - 12:20 AM

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:
AutoIt         
#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!

Attached File  GUIListViewSysLink_1.2.zip   5.38KB   279 downloads
Attached File  ListView_SysLink_1.1.zip   5.18KB   376 downloads
Attached File  ListView_SysLink_1.0.zip   2.94KB   202 downloads

Test Version (with Label control):
Attached File  ListView_Link_TestVersion.zip   2.91KB   527 downloads

History version:
Spoiler



Enjoy! Posted Image

Edited by MrCreatoR, 13 January 2013 - 01:21 AM.

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

Posted Image AutoIt Russian CommunityPosted Image Projects: 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 ProgramPosted Image UDFs: 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 UDFPosted Image Examples: 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 DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team








#2 rasim

rasim

    Gray Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 1,708 posts

Posted 10 October 2008 - 04:36 AM

MrCreatoR
Good work. Thank you! :P
OS: Windows XP SP3, AutoIt version: 3.3.0.0Posted Image My Projects: Free_Resources | Splitter | wgetGUI | UnRARIt | USBMon | CDROM-Control | Volume Serial Changer | WinTrayPosted Image My UDFs: _ScreenSetting | ListView_Progress | ContextHelp | ToolTip_UDF | UnRAR | Zip32 | BassMod | ShellTreeView | GuiHotKey | 7ZipPosted Image My Examples: TrayIcon_Click | SystemTray_Refresh | _ListView_Sort | CPUmonLike above scripts? Please rate the topic Posted Image

#3 gseller

gseller

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,057 posts

Posted 10 October 2008 - 05:50 AM

Very Nice! Thanks!

#4 ptrex

ptrex

    Universalist

  • MVPs
  • 2,413 posts

Posted 10 October 2008 - 06:57 AM

@MrCreatoR

This is realy perfect.

Great job !! :P

Thanks again.

Regards,

ptrex

#5 SmOke_N

SmOke_N

    It's not what you know ... It's what you can prove!

  • Moderators
  • 15,730 posts

Posted 10 October 2008 - 10:53 AM

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.


#6 ptrex

ptrex

    Universalist

  • MVPs
  • 2,413 posts

Posted 10 October 2008 - 11:10 AM

@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

#7 SmOke_N

SmOke_N

    It's not what you know ... It's what you can prove!

  • Moderators
  • 15,730 posts

Posted 10 October 2008 - 11:47 AM

@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.


#8 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,251 posts

Posted 10 October 2008 - 03:54 PM

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, 10 October 2008 - 05:07 PM.

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

Posted Image AutoIt Russian CommunityPosted Image Projects: 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 ProgramPosted Image UDFs: 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 UDFPosted Image Examples: 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 DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#9 wraithdu

wraithdu

    this noise inside my head

  • MVPs
  • 2,396 posts

Posted 10 October 2008 - 05:24 PM

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

#10 SmOke_N

SmOke_N

    It's not what you know ... It's what you can prove!

  • Moderators
  • 15,730 posts

Posted 10 October 2008 - 10:06 PM

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 :
Plain Text         
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.


#11 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,251 posts

Posted 11 October 2008 - 01:17 AM

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: ).
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: 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 ProgramPosted Image UDFs: 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 UDFPosted Image Examples: 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 DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#12 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,251 posts

Posted 20 October 2008 - 10:19 PM

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.
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: 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 ProgramPosted Image UDFs: 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 UDFPosted Image Examples: 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 DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#13 FMS

FMS

    Prodigy

  • Active Members
  • PipPipPip
  • 157 posts

Posted 17 May 2011 - 02:54 PM

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


#14 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 10,032 posts

Posted 17 May 2011 - 05:11 PM

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, 17 May 2011 - 05:12 PM.

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 an XP machine, 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!

 

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 editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.
GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips. Latin Square password generator

 

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.


#15 Syed23

Syed23

    Mass Spammer! - It's Me

  • Active Members
  • PipPipPipPipPipPip
  • 544 posts

Posted 12 September 2011 - 06:43 PM

This is awesome and it helped me to create a link for my tool... but if i click on the link nothing happens how to make work ?
Thank you,Regards,K.Syed Ibrahim.

#16 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,251 posts

Posted 13 January 2013 - 01:24 AM

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.


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

Posted Image AutoIt Russian CommunityPosted Image Projects: 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 ProgramPosted Image UDFs: 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 UDFPosted Image Examples: 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 DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#17 ahidehudehade

ahidehudehade

    Seeker

  • Normal Members
  • 1 posts

Posted 09 August 2013 - 10:36 PM

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:\temp\update.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:\temp\update.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

 



#18 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,251 posts

Posted 21 August 2013 - 09:22 PM

When executing my code I don't get a hyperlink in the corresponding column but rather something like:
<a href="C:\temp\update.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?


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

Posted Image AutoIt Russian CommunityPosted Image Projects: 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 ProgramPosted Image UDFs: 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 UDFPosted Image Examples: 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 DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team






Also tagged with one or more of these keywords: GUI, ListView, SysLink, UDF

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users