BlazeLondon Posted February 24, 2006 Author Posted February 24, 2006 thanks looks great but i've got a big nightmare changing the code it's 500 lines long! is there no way of changing this routine? somehow?
crystalburner Posted February 25, 2006 Posted February 25, 2006 thanks looks great but i've got a big nightmare changing the code it's 500 lines long! is there no way of changing this routine? somehow?Ok guys dont worry I have worked it out. If this helps anyone else im posting it refer to full code at top of this thread $a = _FileSearch(@UserProfileDir & "\favorites\*.url",1) If $a[0] > 0 Then For $i = 1 to $a[0] $STR = StringSplit($a[$i], "\") $a[$i] = StringTrimRight($a[$i], StringLen($STR[$STR[0]])) ProgressOff() $answer = MsgBox(262148,"Backup", "Backup has found Microsoft Internet Explorer bookmarks (favorties) in the current Windows logon, would you like to add these to the backup?") if $answer = 6 Then _ArrayAdd ( $folders, $a[$i] ) GUICtrlSetData($mylist, $a[$i]) Endif If $a[0] = 160 Then Exitloop ; THIS LINE HALTS IT ON THE FIRST ONE FOUND Next ProgressOn("Searching for Internet favorties/bookmarks", "One moment please", "0 percent") ProgressSet( 95, 95 & " percent") EndIf
BlazeLondon Posted February 25, 2006 Author Posted February 25, 2006 Ok guys dont worry I have worked it out. If this helps anyone else im posting it refer to full code at top of this thread $a = _FileSearch(@UserProfileDir & "\favorites\*.url",1) If $a[0] > 0 Then For $i = 1 to $a[0] $STR = StringSplit($a[$i], "\") $a[$i] = StringTrimRight($a[$i], StringLen($STR[$STR[0]])) ProgressOff() $answer = MsgBox(262148,"Backup", "Backup has found Microsoft Internet Explorer bookmarks (favorties) in the current Windows logon, would you like to add these to the backup?") if $answer = 6 Then _ArrayAdd ( $folders, $a[$i] ) GUICtrlSetData($mylist, $a[$i]) Endif If $a[0] = 160 Then Exitloop ; THIS LINE HALTS IT ON THE FIRST ONE FOUND Next ProgressOn("Searching for Internet favorties/bookmarks", "One moment please", "0 percent") ProgressSet( 95, 95 & " percent") EndIf WOW! Thanks, thats it, job done.It scans all folders under the folder you tell it, then stops when it finds a file that matches the criteria. Thanks CB!! Works better tho if you just replace If $a[0] = 160 Then Exitloop ; THIS LINE HALTS IT ON THE FIRST ONE FOUND with a simple Exitloop Perfect Thank you to everybody!
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