AutoHotkey Community

It is currently May 27th, 2012, 3:40 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: July 3rd, 2009, 9:49 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
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 :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2009, 3:29 pm 
Offline

Joined: April 17th, 2009, 1:50 pm
Posts: 9
Location: Tampa, FL
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2009, 7:34 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
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 :wink:


Report this post
Top
 Profile  
Reply with quote  
PostPosted: November 20th, 2009, 4:49 pm 
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!


Report this post
Top
  
Reply with quote  
 Post subject: YES! Track users!
PostPosted: November 20th, 2009, 4:58 pm 
Offline

Joined: April 10th, 2009, 6:59 pm
Posts: 8
Location: Michigan, USA
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----


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 5:36 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Try here, looks to be not easy and will not work for all files I think :)
Using the Summary Information Stream (Windows) MSDN

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
PostPosted: July 10th, 2010, 6:16 am 
Offline

Joined: July 10th, 2010, 6:01 am
Posts: 4
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.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: July 10th, 2010, 9:29 am 
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!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 18th, 2010, 2:22 am 
Offline

Joined: July 18th, 2010, 2:17 am
Posts: 4
Location: China
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]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 18th, 2010, 11:29 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Can you try this one WatchDir_AHK_H.ahk.
You will need to use AutoHotkey_H

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 20th, 2010, 3:13 pm 
Offline

Joined: July 18th, 2010, 2:17 am
Posts: 4
Location: China
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 20th, 2010, 8:27 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
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?

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 21st, 2010, 5:45 am 
Offline

Joined: July 18th, 2010, 2:17 am
Posts: 4
Location: China
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.
Image
The files for test:
http://www.autohotkey.net/~jackchen/Test_Chinese.zip
including a test script and text files named in Chinese.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 21st, 2010, 8:31 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Can you try again this one, just double click WatchDirectory.exe (renamed AutoHotkey_H.exe) and do some changes to your files.

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 23rd, 2010, 10:54 am 
Offline

Joined: July 18th, 2010, 2:17 am
Posts: 4
Location: China
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?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: xXDarknessXx and 16 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