bitcloud
Joined: 30 Oct 2008 Posts: 27
|
Posted: Fri Feb 19, 2010 4:14 am Post subject: Get Current Explorer Path (solved) |
|
|
Hi Guys,
I'm struggling with this script to determine the current explorer path.
WhatFolder.ahk
| Code: |
WinGetClass explorerClass, A
ControlGetText currentexpPath, Edit1, ahk_class %explorerClass%
if (currentexpPath == A_ScriptDir . "\WhatFolder.ahk")
{
;This is where the problem is. If this message is coming up, it's not getting the right variable
msgbox Error - Path is the same as script location
exit
}
msgbox %currentexppath%
|
I'm running this, not as a hotkey, but as a standalone app, called via another interface - not that I think it affects anything.
The weird part, is that the first few times I run it, it get's the correct variable... then after it's run a few times, it keeps just outputting it's own script location (including the ahk file name)
Anyone have any ideas on why it's bugging out for me?
cheers
EDIT: yes. turns out the other script was interferring with the edit value before this one extracted it.
Strange issue involving vista that others on the forum have encountered - basically what's DISPLAYED in the vista location bar isn't necessarily what's CONTAINED there... eg, you can paste anything into that edit bar, but the "friendly folders" thing they've replaced the standard location bar with will overwrite it. |
|