| View previous topic :: View next topic |
| Author |
Message |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4647 Location: AHK Forum
|
Posted: Fri Jul 03, 2009 8:49 pm Post subject: |
|
|
| Roland wrote: | Hi HotKeyIt,
Thanks for the great function.
I think I found a bug in the new function.
| Code: | If (Dir%r%T!="")
SetTimer,TimerDirectoryChanges, %T%
|
should be
| Code: | If (Dir%r%T!="")
SetTimer,TimerDirectoryChanges, % Dir%r%T
|
It seems %T% is blank and therefore the timer is always created with the default (250 ms). |
Many thanks Roland, I have corrected this  _________________ AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun  |
|
| Back to top |
|
 |
e1miran
Joined: 17 Apr 2009 Posts: 9 Location: Tampa, FL
|
Posted: Tue Oct 13, 2009 2:29 pm Post subject: |
|
|
Great script. However, I'm having trouble getting it to detect anything on a network drive here at work.
I've tried both scripts (initial one and the revised with more options) and both work fine monitoring a directory on my local machine. But when I try to monitor a directory such as "\\10.202.0.150\vol1\SHARED"... nothing. This is a shared directory on the server here at work. Any ideas? |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4647 Location: AHK Forum
|
Posted: Tue Oct 13, 2009 6:34 pm Post subject: |
|
|
| e1miran wrote: | Great script. However, I'm having trouble getting it to detect anything on a network drive here at work.
I've tried both scripts (initial one and the revised with more options) and both work fine monitoring a directory on my local machine. But when I try to monitor a directory such as "\\10.202.0.150\vol1\SHARED"... nothing. This is a shared directory on the server here at work. Any ideas? |
It works fine for me at home and work.
Try to map a network drive and see if that works? _________________ AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun  |
|
| Back to top |
|
 |
Cristobal16 Guest
|
Posted: Fri Nov 20, 2009 3:49 pm Post subject: Any way to have WatchDirectory display the modifying user? |
|
|
| This works great for me, but I would really like to be able to see which users do the modification / file creation. Is there any way that the user that modifies the file could pop up as part of the tooltip message? Thanks! |
|
| Back to top |
|
 |
Ender
Joined: 10 Apr 2009 Posts: 8 Location: Michigan, USA
|
Posted: Fri Nov 20, 2009 3:58 pm Post subject: YES! Track users! |
|
|
That is something I have been wondering about for a while too - is this possible? Please help! _________________ This catacomb has got me by the throat.
--Sers, Depp. Ich will WORSCHT.--
----Tu madre tiene un bigote---- |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4647 Location: AHK Forum
|
|
| Back to top |
|
 |
sandman596
Joined: 10 Jul 2010 Posts: 4
|
Posted: Sat Jul 10, 2010 5:16 am Post subject: Watchdirectory issues yet |
|
|
OK, newbie here, but learning.
I cannot get past the static error no matter what I do. I have tried for several hours to figure out how to get this to monitor a directory but to no joy.
Can someone give exact instructions on what needs to be done, where and how to create the ahk file?
My ultimate goal is to monitor a directory with multiple subdirs. When a new image(s) is\are detected in one of the dirs, the script will rename the file based on part of the dir name and part of the original file name.
But to get to the renaming, I need to get the monitoring working first.
The new file the is incoming will have the same prefix, so it can be easily searched/filtered for.
Any help would be greatly appreciated. |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Jul 10, 2010 8:29 am Post subject: Re: Watchdirectory issues yet |
|
|
| sandman596 wrote: | | I cannot get past the static error no matter what I do. | What is "the static error"? I can only guess you're trying to run the script on a rather old version of AutoHotkey which does not support assume-static. In that case, upgrade to a more recent version of AutoHotkey.
| Code: | if A_AhkVersion < 1.0.48
MsgBox You'd better upgrade!
|
|
|
| Back to top |
|
 |
jackchen
Joined: 18 Jul 2010 Posts: 4 Location: China
|
Posted: Sun Jul 18, 2010 1:22 am Post subject: |
|
|
I tried both FolderSpy and WatchDirectory(),neither supprots file names or folder names in Chinese.This function reports only partial file name or folder name,the rest of the name are missed.I guess the script does not support Unicode characters.
I dont understand API at all,can someone point out the problem and give me a solution?[/img] |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4647 Location: AHK Forum
|
|
| Back to top |
|
 |
jackchen
Joined: 18 Jul 2010 Posts: 4 Location: China
|
Posted: Tue Jul 20, 2010 2:13 pm Post subject: |
|
|
| HotKeyIt wrote: | Can you try this one WatchDir_AHK_H.ahk.
You will need to use AutoHotkey_H |
It's too complex to me.I replaced AHK with AHK_H and tried to run Watchdir_AHK_H.ahk,but it didnt work.
I've made a script to monitor some new files by WatchDirectory() then add the file info into an index file.It works perfectly with files and folders in English,but fails in Chinese. I've asked for help in an AHK forum in China,unfortunately no one can solve the problem.
I dont understand DllCall as well as API,I suspected this line in WatchDirectory() was the key:
FileNameLen := NumGet( PointerFNI + 8 )
and changed it to:
FileNameLen := NumGet( PointerFNI + 32 )
Then it reported full file names in Chinese,while other problems occured.Sometimes the reported file name lapped over previous one... |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4647 Location: AHK Forum
|
|
| Back to top |
|
 |
jackchen
Joined: 18 Jul 2010 Posts: 4 Location: China
|
Posted: Wed Jul 21, 2010 4:45 am Post subject: |
|
|
| Quote: | | If you copy the filename into clipboard and run MsgBox % Clipboard, can you see the name displayed correctly, btw. what encoding is it?Can you upload an empty text file named in Chinese so I can use it as example? |
MsgBox displays filename in clipboard correctly.
WatchDirectory() reports incorrect filename as below.The last chararcter and the Ext .txt are missing.
The files for test:
http://www.autohotkey.net/~jackchen/Test_Chinese.zip
including a test script and text files named in Chinese. |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4647 Location: AHK Forum
|
|
| Back to top |
|
 |
jackchen
Joined: 18 Jul 2010 Posts: 4 Location: China
|
Posted: Fri Jul 23, 2010 9:54 am Post subject: |
|
|
| HotKeyIt wrote: | | Can you try again this one, just double click WatchDirectory.exe (renamed AutoHotkey_H.exe) and do some changes to your files. |
This one works.Thanks.
Sorry HotKeyIt,I found I've made a mistake.I tested WatchDir_AHK_H.ahk with AutoHotkey_H ReleaseA couple days ago and got wrong report.I tested it again just now with ReleaseU,it reported correctly!
But it seems that WatchDir_AHK_H.ahk is a little bit more complex...
And I find my script,which consists of near 1000 lines,does not work with AutoHotkey_H. I 'm not capable to change it to be compatible with AutoHotkey_H...
I was wondering if it's possible to make a little change to WatchDirectory and let it work with Chinese with original AutoHotkey? |
|
| Back to top |
|
 |
|