Ok, I finally got it to work my way
Here is how:
Code:
Strip( _String )
{
StringReplace, _String, _String, `r`n, , All
StringReplace, _String, _String, `r, , All
StringReplace, _String, _String, `n, , All
_String = %_String%
Return, _String
}
ifwinexist, ahk_class CabinetWClass
{
ControlGetText, OutputVar, toolbarwindow322, ahk_class CabinetWClass
stringreplace, address, OutputVar, Address:
address := Strip( address )
SetWorkingDir, %address%
}
$DirectoryList=
Loop *.*,2,1
$DirectoryList=%$DirectoryList%%A_LoopFileFullPath%`r`n
Sort $DirectoryList
$DeleteTotal=0
$LoopCount=0
Loop 99
{
$LoopCount:=$LoopCount + 1
$DeleteCount=0
Loop parse,$DirectoryList,`n,`r
{
if A_LoopField= ;-- Ignore blank item
continue
IfExist %A_LoopField%
{
FileRemoveDir %A_LoopField%
if errorlevel=0
$DeleteCount:=$DeleteCount + 1
}
}
$DeleteTotal:=$DeleteTotal + $DeleteCount
If $DeleteCount=0
break
}
Return
Quote:
can you open window spy & point at the address bar?...& tell me the class name?
Code:
Edit1
As for upgrading I never recommend it, I fix computers all the time, never upgraded, always format and fresh windows installation, better. It is alot of work installing programs all over again, but its not something you do everyday.