Jump to content

Recommended Posts

Posted

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.

Posted (edited)

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 ...
 

Posted (edited)

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
Posted (edited)

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 ...
 

  • 2 months later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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