Jump to content

@currentDir


Recommended Posts

basically, here i need a way to get the current directory that is ACTIVE, i want to create a function/service/shortcut that is similar to the "CTRL+SHIFT+N" that exists in window 7 that makes a new folder, i want to make a new text document, when you "CTRL+SHIFT+T" i cannot get the @WorkingDir to work. any help would be appreciated.

Link to comment
Share on other sites

http://www.autoitscript.com/autoit3/docs/macros.htm

i cannot get the @WorkingDir to work. any help would be appreciated.

? ... Just use it as you would use a variable. (more information -> more help.) Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

well, im not sure the best way to do this, as a service or a shortcut, but for testing, i just need to make it work first, so i tired this

#include<File.au3>  

HotKeySet("^+t", "_NewTextFile")  

Func _NewTextFile()     
     _FileCreate(@WorkingDir & "\New Text File.txt")  
EndFunc  

While 1         
     Sleep(100)      
WEnd

and i tried putting a msgbox in the "while" statement, but the while statement stays @ScriptDir, im sure im just misusing the @WorkingDir but, as i said, any help would be appreciated.

Edited by redLabel
Link to comment
Share on other sites

Every application keeps/has its own separate active working folder.

And in general that working folder, when the application is started, is the location where the application executable exists. -> @ScriptDir

So until you actually change the active working folder, with FileChangeDir() for example, the @WorkingDir will be the same as @ScriptDir.

Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

I think Label wants the "current folder" from a explorer window. There has been examples on that, but I don't have one in front of me, so good luck searching!

Link to comment
Share on other sites

  • 2 months later...
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...