AutoHotkey Community

It is currently May 27th, 2012, 5:43 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: March 16th, 2010, 11:58 pm 
Offline

Joined: February 16th, 2010, 2:49 am
Posts: 29
I am not sure if variable is the correct term, but I need a way to when I double click a file extension it remembers that files name.
Example if I double click test.doc it needs to remember the test so I can use it in later parts of the program. Is this possible? If so how would one code this?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2010, 12:25 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
I'll let you figure out the double click part, but here's an example that will get you the file name when you click on it:
Code:
~LButton::
MouseGetPos, , , win, control
ControlGet, hwnd, hwnd, , %control%, ahk_id %win%
Acc := COM_AccessibleObjectFromWindow( hwnd )
itemNum := Acc.accSelection
fileName := Acc.accName( itemNum )
MsgBox, %fileName%

**NOTE** - this example uses AHKL & COM_L

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, Bing [Bot], Google Feedfetcher, HotkeyStick, mrhobbeys, rbrtryn and 60 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group