
FreeRider
Active Members-
Posts
104 -
Joined
-
Last visited
About FreeRider
- Birthday 06/25/1967
Profile Information
-
Location
Paris (East suburb), France
-
Interests
Snow Ski (Free Ride) in the Alps - Mountain treks - Basket ball - Swimming - Travels
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
FreeRider's Achievements

Adventurer (3/7)
0
Reputation
-
Website-AutoLogin with Internet Explorer
FreeRider replied to funkey's topic in AutoIt Example Scripts
Nice job... What about a version working with Mozilla Firefox ? -
Be sure some of us are interested. I use W0uter's script and I even added functions but as it's not finished yet I cannot releasea "non-oprationale" script.
-
Hello Holger, First of all... GOOD JOB !!! The functions are very useful. However I'm trying to work with using the TrayEventMode set to 1 and I have difficulties to get the text of the Clicked Item. As the standard TrayCreateItem() function is not used I cannot perform a TrayItemGetText(). The problem is I Have an undefinied number of applications listed in an ini file (on application = one section with several items), therefore this produce a variable number of items in the tray menu (logical). The only way for me to run the appropriate application is to get the name from the control (last clicked tray item) and compare it to the name I've stored in the ini file. Would it be possible for you to include such function ?... or maybe have you already the answer to my question. Thanks for your help. FreeRider **** CANCEL THE ABOVE REQUEST ***** I found the way to get text of a control (_GetMenuText)... PlayZoneUK who's also asked for the same function is also alerted... So just our question.
-
Application Launcher (Array Problem)
FreeRider replied to PlayZoneUK's topic in AutoIt GUI Help and Support
Hi PlayZoneUK It appears that.... the custom tray with icons do not use standard trayfunctions... In the ModernMenuRaw.au3 file the equivalent function to "TrayItemGetText" is missing. As Tray Item was not created using standard function (TrayCreateItem) the TrayItemGetText(@TRAY_ID) cannot work... I'm still investigating... Bye EDIT N°1 **** Problem fixed..."TrayItemGetText" found !!! ***** Use Function _GetMenuText($nMenuItemID) which is included in the ModernMenuRaw.au3. When calling the function the "$nMenuItemID" is @GUI_CtrlID therefore syntax is $Text = _GetMenuText(@GUI_CtrlID). Don't forget to put Opt("GUIOnEventMode", 1) in the script, otherwise it will not work. I'll update Holger's item (as you also ask for the same question...) Ciao -
Application Launcher (Array Problem)
FreeRider replied to PlayZoneUK's topic in AutoIt GUI Help and Support
Hi PlayZoneUK At the moment... No Idea. Even with the sampes included in the topic "http://www.autoitscript.com/forum/index.php?showtopic=20967" It's not working and I don't have time now to go forward with that. As I'm interested in, I'll check that later and let you know what's the result. -
Application Launcher (Array Problem)
FreeRider replied to PlayZoneUK's topic in AutoIt GUI Help and Support
PlayZoneUK' Line 69... try replacing GUICtrlSetOnEvent(-1, "RunApplication") by TrayItemSetOnEvent(-1, "RunApplication") Bye. -
Save and Load contents of a listview
FreeRider replied to bobbo85's topic in AutoIt GUI Help and Support
Hi, I hope it's not too late... If you want to use the "_GUICtrlListView_AddArray" you may should use an ini file with sections instead of text file. This would be much more easy as you can use "IniReadSections" function to get all items for a section, and the result is already stored in a 2 dimentional array. Use "IniWriteSection" to update the ini file using Listview items values. Hope this will help. -
Application Launcher (Array Problem)
FreeRider replied to PlayZoneUK's topic in AutoIt GUI Help and Support
You'r right.. This line is important... However I have an other suggestion for you... Instead of use a Gui you should use the tray (see "TrayCreateMenu" and related function in the help file) to display the application list. This would allow you to always have the script running without to have the Gui activated. You only could activate the tray menu when clicking on the tray Icon. Note that in the tray you also can display icons included into the menu items. Bye -
Application Launcher (Array Problem)
FreeRider replied to PlayZoneUK's topic in AutoIt GUI Help and Support
It's me again... Here is a modified version of your script... and it works (I made the test)... Main modifications : - GuiOnEventMode activated instead of $GuiGetMsg - Application count automated (no need to maintain the related value in the "Parameters" section - An Exit function and a RunApplication function have been added to manager gui events Take a look and tell me if something's not OK and I'll try to help... #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> Opt("TrayIconHide", 1) Opt('MustDeclareVars', 1) Opt('GUIOnEventMode' , 1); **** THIS LINE WAS ADDED BY FREERIDER If @Compiled = 1 Then Local $list = ProcessList(@ScriptName) If $list[0][0] > 1 Then Exit EndIf ; Reading ini file Global $INI_File = @ScriptDir & "\config.ini" Global $WindowTitle = IniRead($INI_File, "Parameters", "GUITitle", "TS Launcher") Global $ApplicationCount = IniReadSectionNames ($INI_File) ; **** THIS LINE WAS ADDED BY FREERIDER $ApplicationCount = $ApplicationCount[0]-1; **** THIS LINE WAS ADDED BY FREERIDER _Main() Func _Main() Local $buttonclose, $ct Local $GUI,$GUI_Width,$GUI_Height,$GUI_Border,$X,$Y Local $AppButton[$ApplicationCount] Local $ApplicationName[$ApplicationCount] Local $ApplicationDescription[$ApplicationCount] Local $ApplicationPath[$ApplicationCount] Local $ApplicationExecutable[$ApplicationCount] $GUI_Width = 145 $GUI_Height = 62 + (40*$ApplicationCount) $GUI_Border = 5 $X = @DesktopWidth - ($GUI_Width + $GUI_Border) $Y = @DesktopHeight - ($GUI_Height + $GUI_Border) $GUI = GUICreate($WindowTitle, $GUI_Width, $GUI_Height, $X, $Y, $WS_BORDER, $WS_EX_TOOLWINDOW) Local $GUIButtonLayout = 0 Local $GUILabelLayout = 14 Local $ArrayStart = 0 For $AppID = 1 To $ApplicationCount $ApplicationName= IniRead($INI_File, "App" & $AppID, "Name", "Not Found") $ApplicationDescription = IniRead($INI_File, "App" & $AppID, "Description", "Not Found") $ApplicationPath = IniRead($INI_File, "App" & $AppID, "Path", "Not Found") $ApplicationExecutable = IniRead($INI_File, "App" & $AppID,"Executable", "Not Found") $AppButton = GUICtrlCreateButton ($ApplicationName, 0,$GUIButtonLayout,40,40,$BS_ICON) GUICtrlSetOnEvent(-1,"RunApplication") GUICtrlSetImage (-1, $ApplicationPath & $ApplicationExecutable,0) GUICtrlSetTip(-1,$ApplicationDescription,$ApplicationName) GUICtrlCreateLabel($ApplicationName,45, $GUILabelLayout, 200, 20) $ArrayStart+=1 $GUIButtonLayout+=40 $GUILabelLayout+=40 Next ;~ _ArrayDisplay($AppButton, "$AppButton set manually 1D") ;~ _ArrayDisplay($ApplicationName, "$ApplicationName set manually 1D") ;~ _ArrayDisplay($ApplicationDescription, "$ApplicationDescription set manually 1D") ;~ _ArrayDisplay($ApplicationPath, "$ApplicationPath set manually 1D") ;~ _ArrayDisplay($ApplicationExecutable, "$ApplicationExecutable set manually 1D") $buttonclose = GUICtrlCreateButton("Exit", 0, $GUIButtonLayout, 40, 40, $BS_ICON) GUICtrlSetOnEvent($buttonclose,"Quit"); **** THIS LINE WAS ADDED BY FREERIDER GUICtrlSetImage(-1, "shell32.dll", 28) GUICtrlSetTip(-1,"Exit") GUICtrlCreateLabel("Exit / Disconnect",45, $GUILabelLayout, 200 , 20) GUISetState() WinSetOnTop($GUI, "", 1) EndFunc ;==>_Main Func RunApplication () ; **** THIS FUNCTION WAS ADDED BY FREERIDER Local $ChoosenButton, $SectionContent $ChoosenButton = Guictrlread(@GUI_CtrlId); Gets the name of the application to run For $AppID = 1 To $ApplicationCount; Loops until desired application is found $SectionContent = IniReadSection($INI_File,"App" & $AppID ) If $SectionContent[1][1] = $ChoosenButton Then; Application section has been found (Name of the control = Name value in the ini file) Run ($SectionContent[3][1] & $SectionContent[4][1]); Runs the application Return; and returns EndIf Next EndFunc Func Quit () ; **** THIS FUNCTION WAS ADDED BY FREERIDER Exit EndFunc While 1 ; Main script loop Sleep (250) WEnd -
Application Launcher (Array Problem)
FreeRider replied to PlayZoneUK's topic in AutoIt GUI Help and Support
Hi my friend... First of all, try this in your code... Global $AppCount = IniReadSectionNames ($INI_File) ; Gets the names of all sections $AppCount = $AppCount[0]-1 ; $AppCount[0] = Total number of sections... except we want to exclude the "Parameters" one... That's why the "-1" is here It should avoid you to maintain the "AppCount" line in the "Parameters" section. Therfore you can add many applications (sections) without having the risk to omit to update the AppCount value. Regarding Events management... I have to look a bit more but I think it's possible. See you soon for the solution (I hope). Bye -
Hi gesller, Sorry for the response delay... I was not able to be connected for few days... "MyUDF.au3" includes some functions I use often... I include it immediately in the original post. Bye
-
Hi all, I needed a simple tool to test host availability on my company network. As it's simple and as it works I decided to share it (see attached file) I did not checked if such script already exists (probably yes), however I hope this will help some of you. Any question of improvement suggestion is welcome. Remark : If the host is located behind a firewall it's possible the mail function to not work (I'll perform tests on such kind of host later and I'll put an update if necessary). Enjoy Scripting... CHAST.au3 MyUDF.au3
-
Well done my friend... This could be useful for me in a near future... Many thanks ... and I give this script a 9,8/10 just to say better than weaponx Proposal of improvement : Make the function to accept wild cards ($avProcProps = _ProcessListProperties("Sy*.*"). If it's possible it could be nice to have this possibility. Bye,
-
Find replace in all files in multiple directories
FreeRider replied to glasglow's topic in AutoIt General Help and Support
Try this modified function... some of the line at bottom have been unactivated. I personaly use it and it work perfectly (ready to use with you own default parameters) Func _FileSearch($szRoot, $Szmask = "*.html", $nFlag = 3, $nOcc = 0) Local $hArray = $Szmask, $iRec, $iPath, $iSort Switch $nFlag Case 1 $iRec = 1 $iPath = 0 $iSort = 0 Case 2 $iRec = 0 $iPath = 1 $iSort = 0 Case 3 $iRec = 1 $iPath = 1 $iSort = 0 Case 4 $iRec = 0 $iPath = 0 $iSort = 1 Case 5 $iRec = 1 $iPath = 0 $iSort = 1 Case 6 $iRec = 0 $iPath = 1 $iSort = 1 Case Else $iRec = 1 $iPath = 1 $iSort = 1 EndSwitch If NOT IsArray($hArray) Then $hArray = StringSplit($hArray, '|') Local $Hfile = 0, $F_List = '' $szBuffer = "" $szReturn = "" $szPathlist = "*" For $I = 1 To Ubound($hArray)-1 $szMask = $hArray[$I] If NOT StringInStr ($Szmask, "\") Then $szRoot &= '' Else $iTrim = StringInStr ($Szmask, "\",0,-1) $szRoot &= StringLeft ($Szmask, $iTrim) $Szmask = StringTrimLeft ($Szmask, $iTrim) EndIf If $iRec = 0 Then $Hfile = FileFindFirstFile ($szRoot & $szMask) If $Hfile >= 0 Then $szBuffer = FileFindNextFile ($Hfile) While NOT @Error If $iPath = 1 Then $szReturn &= $szRoot If $szBuffer <> "." AND $szBuffer <> ".." Then $szReturn &= $szBuffer & "*" $szBuffer = FileFindNextFile ($Hfile) Wend FileClose ($Hfile) EndIf Else While 1 $Hfile = FileFindFirstFile ($szRoot & "*.*") If $Hfile >= 0 Then $szBuffer = FileFindNextFile ($Hfile) While NOT @Error If $szBuffer <> "." AND $szBuffer <> ".." AND StringInStr (FileGetAttrib ($szRoot & $szBuffer), "D") Then _ $szPathlist &= $szRoot & $szBuffer & "*" $szBuffer = FileFindNextFile ($Hfile) Wend FileClose ($Hfile) EndIf If StringInStr ($szReturn, $Szmask) > 0 AND $nOcc = 1 Then $szRoot = '' ExitLoop EndIf $Hfile = FileFindFirstFile ($szRoot & $szMask) If $Hfile >= 0 Then $szBuffer = FileFindNextFile ($Hfile) While NOT @Error If $iPath = 1 Then $szReturn &= $szRoot If $szBuffer <> "." AND $szBuffer <> ".." Then $szReturn &= $szBuffer & "*" $szBuffer = FileFindNextFile ($Hfile) Wend FileClose ($Hfile) EndIf If $szPathlist == "*" Then ExitLoop $szPathlist = StringTrimLeft ($szPathlist, 1) $szRoot = StringLeft ($szPathlist, StringInStr ($szPathlist, "*") - 1) & "\" $szPathlist = StringTrimLeft ($szPathlist, StringInStr ($szPathlist, "*") - 1) Wend EndIf Next If $szReturn = "" Then Return 0 Else ;$szReturn = StringReplace($szReturn,'\', '') $F_List = StringSplit (StringTrimRight ($szReturn, 1), "*") ;If $iSort = 1 Then _ArraySort($F_List) Return $F_List EndIf EndFunc;<===> _FileSearch() -
What you can do is read the keys in the inifile owned by the ta-program and then create an other inifile containing the "orignial" value. This will record the "original" value and you even don't need to insert the "ALREADYSENT" string. You just have to compare the value your get from the ta-program's file with the one you have in your own ini file. The problem is you have to read to files (it take more time)... But this is the only way. Bye,