| View previous topic :: View next topic |
| Author |
Message |
a_h_k
Joined: 02 Feb 2008 Posts: 344
|
Posted: Sun Nov 22, 2009 4:36 pm Post subject: Retrieve full pathname of document opened in Notepad |
|
|
I need this so that i can know if the file opened is an .ahk or not
* My file extensions = hidden in Explorer options (so dont show in Notepad titlebar) |
|
| Back to top |
|
 |
i3egohan
Joined: 18 Jul 2006 Posts: 401
|
Posted: Sun Nov 22, 2009 4:54 pm Post subject: |
|
|
Get the notepad title.. Then append .ahk to end of it..
Then use IfFileExist..
NotePadTitle .= .ahk |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 344
|
Posted: Sun Nov 22, 2009 5:10 pm Post subject: |
|
|
Actually it's a little more involved than i implied..
--> I do not know the wherabouts of the file opened (ie explorer is not opened at that location - is just Notepad window & no explorer window) |
|
| Back to top |
|
 |
i3egohan
Joined: 18 Jul 2006 Posts: 401
|
Posted: Sun Nov 22, 2009 5:24 pm Post subject: |
|
|
if the AHK file has a GUI, you could use ControlGet to deterime if its a ahk program/script or not.
There are numerous ways using ahk_class etc.. You tried these?
Or maybe im still not understanding |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 344
|
Posted: Sun Nov 22, 2009 5:34 pm Post subject: |
|
|
| i3egohan wrote: | | if the AHK file has a GUI, you could use ControlGet to deterime if its a ahk program/script or not | No, no Gui is running, am just editing the script
Am currently searching for a 3rd-party command-line tool which will provide this info (but which quite probably doesnt exist) |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 7159
|
Posted: Sun Nov 22, 2009 7:57 pm Post subject: |
|
|
| Please search the forum for getremotecommandline |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 344
|
Posted: Mon Nov 23, 2009 2:03 am Post subject: |
|
|
Brilliant!! Thanks for that SKAN !!  |
|
| Back to top |
|
 |
|