home = F:\400GB\ORCL\dddd\temp
Folders =
Loop, %home%\*.*,1,0
{
Folders = %Folders%`n%home%\%A_LoopFileName%
}
Sort, Folders
msgbox 0,,%Folders%,20
Loop, %home%\*.*,1,0
{
fb4 = %A_LoopFileName%
fa4 := RegExReplace(fb4, ".jpe?g", "")
msgbox, %fb4%`n%fa4%
fileMove, %home%\%A_LoopFileName%, %home%\%fa4%
}
;~ Loop, parse, Folders, `n
;~ {
;~ msgbox %A_LoopField%
;~ }
Folders =
Loop, %home%\*.*,1,0
{
Folders = %Folders%`n%home%\%A_LoopFileName%
}
Sort, Folders
msgbox 0,,%Folders%,20
ExitApp
/*
Click
Click Right
v
RButton::
MouseGetPos,,,, Control
IfInString, Control, Internet Explorer
Send {RButton}s{Enter}
IfInString, Control, Mozilla
Send {RButton}v{Enter}
Return
*/
Tuesday, May 31, 2011
Thursday, May 26, 2011
Sunday, May 15, 2011
WhichWindow, WhichControl
; This working example will continuously update and display the ; name and position of the control currently under the mouse cursor: Loop { Sleep, 100 MouseGetPos, , , WhichWindow, WhichControl ControlGetPos, x, y, w, h, %WhichControl%, ahk_id %WhichWindow% ToolTip, %WhichControl%`nX%X%`tY%Y%`nW%W%`t%H% }
How to get the Fullpath within the Open-Save-Dialog?
How to get the Fullpath within the Open-Save-Dialog?: "We found a solution in rexx's FolderMenu.
Thanks rexx for your quick help.
The Code has been modified in spots.
Code (Collapse):
#Persistent
SetTimer, Label_GetPathFromOpenSaveDialog, 100
Return
Label_GetPathFromOpenSaveDialog:
WinGet, w_WinID, ID, A
WinGet, w_WinMin, MinMax, ahk_id %w_WinID%
if w_WinMin = -1 ; Only detect windows not Minimized.
return
WinGetClass, w_Class, ahk_id %w_WinID%
if w_Class = #32770
{
ThisPath =
if A_OSVersion = WIN_VISTA
{
ControlGetPos, ToolbarPos,,,, ToolbarWindow322, ahk_id %w_WinID%
if ToolbarPos !=
{
Send, !d ; Set focus on addressbar to enable Edit2
Sleep, 100
ControlGetText, ThisPath, Edit2, ahk_id %w_WinID%
}
}
if ThisPath = ; nothing retrieved, maybe it's an old open/save dialog
{
ControlGetText, ThisFolder, ComboBox1, ahk_id %w_WinID% ; current folder name
ControlGet, List, List,, ComboBox1, ahk_id %w_WinID% ; list of folders on the path
Loop, Parse, List, `n ; create array and get position of this folder
{
List%A_Index% = %A_LoopField%
if A_LoopField = %ThisFolder%
ThisIndex = %A_Index%
}
Loop, % ThisIndex ; add path till root
{
Index0 := ThisIndex - A_Index + 1 ; ThisIndex ~ 1
IfInString, List%Index0%, : ; drive root
{
ThisPath := SubStr(List%Index0%, InStr(List%Index0%, ':')-1, 2) . '\' . ThisPath
break
}
ThisPath := List%Index0% . '\' . ThisPath
}
StringTrimRight, ThisPath, ThisPath, 1
}
ToolTip, %ThisPath%
}
else
ToolTip
Return
- Sent using Google Toolbar"
Thanks rexx for your quick help.
The Code has been modified in spots.
Code (Collapse):
#Persistent
SetTimer, Label_GetPathFromOpenSaveDialog, 100
Return
Label_GetPathFromOpenSaveDialog:
WinGet, w_WinID, ID, A
WinGet, w_WinMin, MinMax, ahk_id %w_WinID%
if w_WinMin = -1 ; Only detect windows not Minimized.
return
WinGetClass, w_Class, ahk_id %w_WinID%
if w_Class = #32770
{
ThisPath =
if A_OSVersion = WIN_VISTA
{
ControlGetPos, ToolbarPos,,,, ToolbarWindow322, ahk_id %w_WinID%
if ToolbarPos !=
{
Send, !d ; Set focus on addressbar to enable Edit2
Sleep, 100
ControlGetText, ThisPath, Edit2, ahk_id %w_WinID%
}
}
if ThisPath = ; nothing retrieved, maybe it's an old open/save dialog
{
ControlGetText, ThisFolder, ComboBox1, ahk_id %w_WinID% ; current folder name
ControlGet, List, List,, ComboBox1, ahk_id %w_WinID% ; list of folders on the path
Loop, Parse, List, `n ; create array and get position of this folder
{
List%A_Index% = %A_LoopField%
if A_LoopField = %ThisFolder%
ThisIndex = %A_Index%
}
Loop, % ThisIndex ; add path till root
{
Index0 := ThisIndex - A_Index + 1 ; ThisIndex ~ 1
IfInString, List%Index0%, : ; drive root
{
ThisPath := SubStr(List%Index0%, InStr(List%Index0%, ':')-1, 2) . '\' . ThisPath
break
}
ThisPath := List%Index0% . '\' . ThisPath
}
StringTrimRight, ThisPath, ThisPath, 1
}
ToolTip, %ThisPath%
}
else
ToolTip
Return
- Sent using Google Toolbar"
Finding Certain Text in File Properties
Finding Certain Text in File Properties: "Code:
F1::
WinActivate, ahk_class CabinetWClass
WinWaitActive, ahk_class CabinetWClass
ControlGetText, Path, Edit1, ahk_class CabinetWClass
Msgbox, %Path%
Return
- Sent using Google Toolbar"
F1::
WinActivate, ahk_class CabinetWClass
WinWaitActive, ahk_class CabinetWClass
ControlGetText, Path, Edit1, ahk_class CabinetWClass
Msgbox, %Path%
Return
- Sent using Google Toolbar"
Subscribe to:
Comments (Atom)