torels Posted May 8, 2009 Share Posted May 8, 2009 Hi there I have this problem: ;TraySetOnEvent($TRAY_EVENT_SECONDARYDOWN, "_populate") While 1 $aHwnd=_populate() For $i = 0 to UBound($aHwnd)-1 If TrayGetMsg()=$aHwnd[$i][0] And $aHwnd[$i][0]<>"" Then MsgBox(0,"",$aHwnd[$i][0]) MsgBox(0,"",$aHwnd[$i][1]) ShellExecute($aHwnd[$i][1]&"\") EndIf Next _destroy($aHwnd) WEnd Func _populate() $aDirs=IniReadSection(@TempDir&"\QD_settings.ini", "dirs") Dim $aHwnd[$aDirs[0][0]+1][2] For $i = 1 to $aDirs[0][0] $hTray=TrayCreateItem($aDirs[$i][1]) $aHwnd[$i-1][0]=$hTray $aHwnd[$i-1][1]=$aDirs[$i][1] Next Return $aHwnd EndFunc Func _destroy($aHwnd) For $i=0 to UBound($aHwnd)-1 TrayItemDelete($aHwnd[$i][0]) Next EndFunc this is because the ini can change at any moment and it has to automatically refresh this is terribly slow and even more inaccurate on 5 clicks' average it only takes 3 out of five how can I solve the problem (just to explain the code though it's rather simple... it gets some values from an INI and puts them in the tray menu) Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
Yashied Posted May 8, 2009 Share Posted May 8, 2009 Hi there I have this problem: ;TraySetOnEvent($TRAY_EVENT_SECONDARYDOWN, "_populate") While 1 $aHwnd=_populate() For $i = 0 to UBound($aHwnd)-1 If TrayGetMsg()=$aHwnd[$i][0] And $aHwnd[$i][0]<>"" Then MsgBox(0,"",$aHwnd[$i][0]) MsgBox(0,"",$aHwnd[$i][1]) ShellExecute($aHwnd[$i][1]&"\") EndIf Next _destroy($aHwnd) WEnd Func _populate() $aDirs=IniReadSection(@TempDir&"\QD_settings.ini", "dirs") Dim $aHwnd[$aDirs[0][0]+1][2] For $i = 1 to $aDirs[0][0] $hTray=TrayCreateItem($aDirs[$i][1]) $aHwnd[$i-1][0]=$hTray $aHwnd[$i-1][1]=$aDirs[$i][1] Next Return $aHwnd EndFunc Func _destroy($aHwnd) For $i=0 to UBound($aHwnd)-1 TrayItemDelete($aHwnd[$i][0]) Next EndFuncoÝ÷ ÚØb²+yÆ®±ëaz)âq©Ü©ày«Z)¨éíjwb¶¬¶®¶¶'«yúÞ²aȬµêë¹r²Z0jw^½é梷¢§º¶zùrXÍýj÷«j¢¶åÊÖ¤zÍèºÚ~+Þjr,¢[Þ¶©®åzhî²Ûh{ej)íç(uëa¢è!Ýý²¶êìjez+`zÛ,¢g¯j[±úè©È4§v²Ø^)íëkk)ïêº^N¼+ºÚ"µÍÚ[HB ÌÍØRÛWÜÜ[]J BIÌÍÓÙÈH^QÙ]ÙÊ BÜ ÌÍÚHHÈPÝ[ ÌÍØRÛ KLBY ÌÍÓÙÏIÌÍØRÛÉÌÍÚWVÌH[ ÌÍØRÛÉÌÍÚWVÌIÉÝÉ][ÝÉ][ÝÈ[ÙÐÞ ][ÝÉ][ÝË ÌÍØRÛÉÌÍÚWVÌJBÙÐÞ ][ÝÉ][ÝË ÌÍØRÛÉÌÍÚWVÌWJBÚ[^XÝ]J ÌÍØRÛÉÌÍÚWVÌWI[É][ÝÉÌLÉ][ÝÊB[Y^ÙÝÞJ ÌÍØRÛ BÑ[ My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted May 8, 2009 Share Posted May 8, 2009 NOTE: Always read the file in a loop is not a good idea. It may be better to check first the date of modification. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
torels Posted May 8, 2009 Author Share Posted May 8, 2009 thanks for your help it's much quicker now Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now