AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Get Current Explorer Path (solved)

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
bitcloud



Joined: 30 Oct 2008
Posts: 27

PostPosted: Fri Feb 19, 2010 4:14 am    Post subject: Get Current Explorer Path (solved) Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group